Android静态安全检测 -> Intent Scheme URL 漏洞
16lz
2021-01-26
Intent Scheme URL 漏洞 - parseUri方法
一、Intent scheme URL的解析及过滤
1. 利用 Intent.parseUri 解析uri,获取原始的intent对象
2. 对intent对象设置过滤规则,不同的浏览器有不同的策略
3. 通过Context.startActivityIfNeeded或者Context.startActivity发送intent
4. 其中,步骤2起关键作用,过滤规则缺失或者存在缺陷都会导致Intent Schem URL攻击
二、触发条件
1. Intent.parseUri()
【1】对应到smali中的特征:Landroid/content/Intent;->parseUri(
【2】缺失过滤规则:
Intent.addCategory("android.intent.category.BROWSABLE")
Intent.setComponent(null)
Intent.setSelector(null)
三、漏洞原理
【1】如果浏览器支持Intent Scheme Uri语法,如果过滤不当,那么恶意用户可能通过浏览器js代码进行一些恶意行为,比如盗取cookie等。如果使用了Intent.parseUri函数,获取的intent必须严格过滤,intent至少包含addCategory(“android.intent.category.BROWSABLE”),setComponent(null),setSelector(null)3个策略
【2】详细的原理&POC,参考链接:
Android Intent Scheme URLs攻击
http://wolfeye.baidu.com/blog/intent-scheme-url/
http://drops.wooyun.org/papers/2893
四、修复建议
Intent Scheme URL 漏洞_第1张图片" width="650" height="265" style="border:1px solid black;">
更多相关文章
- android浏览器研究-UserAgent
- ColorMatrixColorFilter颜色过滤(离线用户的灰色头像处理)
- Android--调用内置的浏览器
- 全球十个最佳Android应用
- 从 Chrome 谈到 Adobe
- Android(安卓)logcat保存当前应用程序的日志并上传服务器或指定
- Android常见漏洞介绍(1):Intent Scheme URL 攻击
- 2013.09.04——— android Location 过滤最佳的位置
- APPS大乱斗:4大Android文件浏览器横评(七)