当前位置:网站首页>Analysis sample of a video app
Analysis sample of a video app
2022-07-22 15:05:00 【Passers by. Hello】
1, Grab the bag
Charles+Postern
2, Search for sign, There are too many search results . Another key word ,s_locale, Just two . Last to
com.xxxxxxi.okretro.f.a
First look at d() Method
At the end of the day native s()
Look again c()
Finally, it will also come to
frida hook once
var LibBili=Java.use("com.xxxxx.nativelibrary.Libxxx");
var treemap=Java.use("java.util.TreeMap")
LibBili.s.implementation=function(map){
console.log("com.xxxxx.nativelibrary.Libxxx map==>",treemap.$new(map))
var retval=this.s(map)
console.log("com.xxxxx.nativelibrary.Libxxx retval==>",retval)
return retval
}
Print the results :
// com.xxxxx.nativelibrary.Lixxx map==> {aid=799065621, appkey=1d8b6e7d45233436, build=6180500, c_locale=zh-Hans_CN, channel=shenma069, cid=292549658, mobi_app=android, platform=android, s_locale=zh-Hans_CN, statistics={"appId":1,"platform":3,"version":"6.18.0","abtest":""}}
// com.xxxxx.nativelibrary.Lxxxx retval==> aid=799065621&appkey=1d8b6e7d45233436&build=6180500&c_locale=zh-Hans_CN&channel=shenma069&cid=292549658&mobi_app=android&platform=android&s_locale=zh-Hans_CN&statistics=%7B%22appId%22%3A1%2C%22platform%22%3A3%2C%22version%22%3A%226.18.0%22%2C%22abtest%22%3A%22%22%7D&ts=1657861030&sign=a52cd09b0a83f96daa5d0c0125151804
Obviously sign It's already out .
Let's take the initiative to call native s(), It's so convenient mode , Don't click on the machine
function invoke(){
Java.perform(function(){
var treemap=Java.use("java.util.TreeMap")
var LibBili=Java.use("com.xxxxxx.nativelibrary.Libxxxx");
var map=treemap.$new()
map.put("aid", "728305240");
map.put("appkey", "1d8b6e7d45233436");
map.put("autoplay_card","11");
map.put("banner_hash","10687342131252771522");
map.put("build","6180500");
map.put("c_locale","zh-Hans_CN");
map.put("channel","shenma069");
map.put("cid","292549658");
map.put("mobi_app","android");
map.put("device_type","0");
map.put("flush","6");
console.log(map)
var sign=LibBili.s(map)
console.log("invoke sign ==>",sign)
})
}
2,so File analysis
open ida, Export table , There is no such method , Dynamic registration ,hook RegisterNatives
If the feeling looks more , You can modify the source code , Just add a judgment .
if(class_name.indexOf("com.xxxxx.nativelibrary.LibBili")>=0)
hook Add -o xxxx.txt. You can save the log
frida -U -f tv.xxxx.xxx -l hook_RegisterNatives.js --no-pause -o registerNatives.txt
[RegisterNatives] java_class: com.xxxxx.nativelibrary.LibBili name: s sig: (Ljava/util/SortedMap;)Lcom/bilibili/nativelibrary/SignedQuery; fnPtr: 0xbc753c97 fnOffset: 0x1c97 callee: 0xbc753b8f libbili.so!JNI_OnLoad+0x66
Know the offset address offset=0x1c97
stay ida Press G Jump
Get into sub_2F88
Press Y modify sub_2F88
And look down
sub_6680 It's a JNI Call yes CallBooleanMethod. call java The method in returns Boolean in native To jboolean
hook once Active call Algorithm . return 0.
var sub_2F88=addr.add(0x2F88+1)
Interceptor.attach(sub_2F88,{
onEnter:function(args){
},onLeave:function(retval){
console.log("sub_2F88 onLeave:",ptr(retval))
}
})
Then enter sub_3414();
Keep going
Of this class called r() Method
Will be map To & The string of the connection
So let's look down
hook sub_22B0()
//sub_22B0
var sub_22B0=addr.add(0x22B0+1)
Interceptor.attach(sub_22B0,{
onEnter:function(args){
console.log("0x22B0 onEnter:",hexdump(args[1], {length: args[2].toInt32()}));
console.log("\n0x22B0 Length:"+args[2]);
},onLeave:function(retval){
console.log("0x22B0 onLeave:",ptr(retval))
}
})
Algorithm restoration
sub_22B0() That is to say MD5 Will be called 7 Time
Respectively in
Call the algorithm many times , These four data blocks are found to be fixed , Parameters and four data blocks are spliced together MD5
Last 5 Time MD5 Splicing together , Namely sign
aid=728305240&appkey=1d8b6e7d45233436&autoplay_card=11&banner_hash=10687342131252771522&build=6180500&c_locale=zh-Hans_CN&channel=shenma069&cid=292549658&device_type=0&flush=6&mobi_app=android&ts=1657877030&sign=71739fc69a301b43ad920e2820e97b31
Enter the reference :aid=728305240&appkey=1d8b6e7d45233436&autoplay_card=11&banner_hash=10687342131252771522&build=6180500&c_locale=zh-Hans_CN&channel=shenma069&cid=292549658&device_type=0&flush=6&mobi_app=android&ts=1657877030
Restore complete
边栏推荐
- Qpprocess class
- How to review the PMP Exam
- HCIA-R&S自用笔记(16)DR与BDR、OSPF度量值、OSPF 配置、OSPF综合实验(认证+缺省路由发布)
- Hcia-r & s self use notes (17) OSPF experiment and routing comprehensive experiment
- [harmonyos] [FAQ] Hongmeng problem collection 4
- [harmony OS] [ark UI] ETS list implementation, pull-down refresh function implementation
- HCIA-R&S自用笔记(15)OSPF基础、OSPF核心工作流程、OSPF数据包类型、OSPF邻居建立条件及过程
- [HMS core] [ml kit] FAQ of machine learning service (II)
- 109. Ordered linked list transformation binary search tree ●●
- 【独立站运营】Shopify卖家:如何改善店铺体验?两招搞定!
猜你喜欢
【HMS core】【FAQ】【Account Kit】典型问题集2
Configuring laradock under winodos
Goodbye attention: a new paradigm for modeling users' long-term interests
某视频app分析样本
2022.7.11-7.17 AI industry weekly (issue 106): just try your best
Introduction to AOSP ~ camera - YUV format
Recall to order: multi-objective sorting distillation recall
【Harmony OS】【ARK UI】ETS的List实现下拉刷新功能实现
[MySQL series] addition, deletion, modification and query of MySQL tables (basic)
滑环的分类以及用途
随机推荐
Configuring laradock under winodos
【MySQL系列】“一勞永逸“ 解决MySQL中 “插入中文數據“出錯的問題
Escape methods of special characters in URL links
心肌黄酶丨Worthington克氏梭菌心肌黄酶的特性
测试下投票的功能
2022-07-13 mysql/stonedb的快速子查询和慢子查询执行对比
[must see for developers] [push kit] collection of typical problems of push service 1
Tencent cloud deploys Devops
PMP备考指南之相关事项介绍
1.openpyxl 打开工作簿
2022-07-18 反思
某东分析样本
Spark总结
Summary of optimistic lock, pessimistic lock and distributed lock
HCIA-R&S自用笔记(16)DR与BDR、OSPF度量值、OSPF 配置、OSPF综合实验(认证+缺省路由发布)
QProcess类
2022-07-20 MySQL hashjoin description
AOSP ~ camera - rk hal3 (II)
这一次,彻底梳理各种布局问题
1567. 乘积为正数的最长子数组长度 ●●