破解某抢票软件的VPN抓包
2021-09-05 18:59:00 Author: mp.weixin.qq.com(查看原文) 阅读量:64 收藏

看雪论坛作者ID:Mr.YX
打开VPN后抓包,发现软件提示网络错误,关闭VPN网络连接正常,猜测软件可能有VPN检测。直接dump出dex文件。
 
在dex文件中搜索"vpn"
用GDA打开其中一个文件,继续搜索"VPN"关键字。
根据函数名基本可以确定VPN检测函数:
此处函数相当可疑,进入此函数:
 
此处有判断,hasTransport()这个函数用于判断是否有目标传输类型,目标传输类型值为4,查一查常见传输类型对应的值。
/**   * Indicates this network uses a Cellular transport.   */  public static final int TRANSPORT_CELLULAR = 0;   /**   * Indicates this network uses a Wi-Fi transport.   */  public static final int TRANSPORT_WIFI = 1;   /**   * Indicates this network uses a Bluetooth transport.   */  public static final int TRANSPORT_BLUETOOTH = 2;   /**   * Indicates this network uses an Ethernet transport.   */  public static final int TRANSPORT_ETHERNET = 3;   /**   * Indicates this network uses a VPN transport.   */  public static final int TRANSPORT_VPN = 4;
nNetworkCapa.hasTransport(4)这个函数判断当前是否为VPN传输,SecurityUtil.hasVpnTransport()这个函数即为检测函数,猜测有VPN时返回true。用Objection hook SecurityUtil.hasVpnTransport函数验证一下猜想。
打开VPN时返回值为true,关闭时为none。猜想验证正确,开始编写脚本。
function hook_vpn() {    Java.perform(function () {      var SecurityUtil = Java.use("com.taihebase.activity.utils.SecurityUtil");        SecurityUtil.hasVpnTransport.implementation = function (arg0, arg1) {            var result = this.hasVpnTransport(arg0, arg1);            console.log("start....");            console.log(result);            console.log("end....");            return false;        }    })} setImmediate(hook_vpn);

运行脚本,发现无网络错误提示,charles上成功抓包。

最后,再次恭喜高研班学员id:咸鱼炒白菜,拿到远超3W的offer噢!

优秀毕业生寄语回顾:

恭喜“鱼鱼”月薪远超3w!【看雪高研班】优秀毕业生 前来报到~

 

看雪ID:Mr.YX

https://bbs.pediy.com/user-home-853873.htm

*本文由看雪论坛 Mr.YX 原创,转载请注明来自看雪社区

# 往期推荐

1. 祥云杯2021 Windows R0题 Rev_APC

2. Android APK的加固方法

3. InCTF 内核Pwn之 Kqueue

4. HITB CTF 2018 gundam分析

5. CVE-2010-2883漏洞分析与复现

6. D-Link DIR-645路由器溢出分析

公众号ID:ikanxue
官方微博:看雪安全
商务合作:[email protected]

球分享

球点赞

球在看

点击“阅读原文”,了解更多!


文章来源: http://mp.weixin.qq.com/s?__biz=MjM5NTc2MDYxMw==&mid=2458392229&idx=1&sn=342ccf38f30e4abd2a756c4c391f4b9b&chksm=b18f262f86f8af39b76e1fcf1e334e2c9da181f97b1cbeded24a7a8966764f296b9f39e764d1#rd
如有侵权请联系:admin#unsafe.sh