博文

目前显示的是 2025的博文

8kSec DroidView Ultimate Private Browsing Solution writeup

图片
题目要求 漏洞利用程序应禁用 Tor 路由,然后将用户重定向到一个由攻击者控制的页面。分析代码的时候发现有两种方法。 解法一: 当action为ACTION_TOGGLE_SECURITY时,MainActivity的onNewIntent会调用handleSecurityToggle handleSecurityToggle会调用setSecurityEnabled 当参数为false的时候,setSecurityEnabled会调用unregisterReceiver注销tor状态监听器 看看torStatusReceiver的定义 所以可以如下命令 禁用 Tor 路由: adb shell am start -a com.eightksec.droidview.TOGGLE_SECURITY -n com.eightksec.droidview/.MainActivity --ez enable_security false --activity-single-top 需要注意的是,要添加 --activity-single-top参数触发onNewIntent函数 接着将用户重定向到一个由攻击者控制的页面 adb shell am start -a com.eightksec.droidview.LOAD_URL  -n com.eightksec.droidview/.MainActivity --es url "httpx://www.xxx.com"   --activity-single-top 解法二: 在AndroidManifest.xml中可以到导出了一个com.eightksec.droidview.TokenService服务, TokenService提供了返回当前token的方法getSecurityToken 所以可以绑定到 TokenService 获取token。 这里尝试通过frida动态绑定到TokenService    console . log ( "Script loaded. Waiting for MainActivity to be created..." ); Java . perform ( function () {     let l...

8kSec BorderDroid International Border Protection writeup

图片
 查看AndroidManifest.xml发现com.eightksec.borderdroid.receiver.RemoteTriggerReceiver是导出的,可以通过adb 发送广播解锁,但是题目的要求说 攻击不应要求设备具有 root 权限,启用 USB 调试可用于侦查,但为使其符合实际情况,本挑战的解决方案应坚持使用 "非 USB 攻击",所以这不是最优解。但是题目又提到“ 设备被扣押时,仍连接到不安全的机场 WiFi 网络 ”,推测大概是通过网络层面发起攻击。这里注意到一个服务com.eightksec.borderdroid.service.HttpUnlockService,虽然没有导出。  服务启动的时候会监听8080端口  netstat看下 当收到/unlock请求且post数据包是json格式时,形如:{"pin": 111111},会调用broadcastVulnerableUnlockIntentWithPin 显然这个broadcastVulnerableUnlockIntentWithPin函数会发送广播到RemoteTriggerReceiver RemoteTriggerReceiver验证pin值是对的后会调用performUnlockActions解锁屏幕 poc演示,当pin值正确时成功远程解锁: 当然,题目说“ 使用硬编码秘密来解决挑战也不是解决挑战的正确方法 ”,因为pin值是6位数,可遍历pin值爆破发送解锁请求。

windows虚拟机中Android Studio启动模拟器踩坑记录

windows虚拟机中Android Studio启动模拟器状态一直是Booting,通过命令行C:\Android\Sdk\emulator\emulator.exe -netdelay none -netspeed full -avd Medium_Phone_API_35 -qt-hide-window -grpc-use-token -idle-grpc-timeout 300 启动emulator输出报错:USER_WARNING | Suggested minimum number of CPU cores to run avd 'Medium_Phone_API_35' is 4 (available: 2) ,通过搜索修改虚拟机cpu core的数为4即可。再次命令行启动输出报错:Android Studio Emulator Failed to load [vulkan-1.dll],通过搜索把C:\Android\Sdk\emulator\lib64\vulkan\vulkan-1.dll 拷贝一份到C:\Android\Sdk\emulator\lib64\ 目录下 或C:\Windows\System32即可。 然后直接在Android Studio界面可成功启动模拟器,但是模拟器会不停弹窗提示The system ui isn't responding in android emulator, 通过搜索把$HOME/.android/avd/MyAvdName.avd/config.ini文件中的hw.gpu.mode的值从auto 改为host,还有的建议是从"hw.gpu.enabled=no hw.gpu.mode=auto"改为"hw.gpu.enabled=no hw.gpu.mode=off" 或者"hw.gpu.enabled=yes hw.gpu.mode=host",重新启动,稍等几分钟后就不再提示isn't responding。     参考:      https://stackoverflow.com/a/71668492 https://stackoverflow.com/a/68233639 https...