首页
社区
课程
招聘
[分享]Adndroid逆向的基础环境准备 的一些记录 , 抄袭royuse的课 第3课
2023-11-2 18:23 4118

[分享]Adndroid逆向的基础环境准备 的一些记录 , 抄袭royuse的课 第3课

2023-11-2 18:23
4118

入门学习逆向的个人笔记,预览(欢迎探讨)

[原创] 肉丝的r0env2022(kali linux)配置xrdp远程桌面,以及Genymotion安卓11的ssh登陆问题和11系统amr64转译问题.
[分享] (Android) 逆向入门记录 一篇杂文, 记录.
[分享] Adndroid逆向的基础环境准备 的一些记录 , 抄袭royuse的课 第3课
[分享] 安卓逆向课题之4, Activity,service,content provider,broadcast receiver和实例演示,完毕
[分享] 安卓逆向课题之5, mobile spider get started. 两天高度集中学习, 承上启下的流程,a明白,b上手练.(5th完结)
[分享] 安卓逆向课题之6, mobile spider get started. Object的自动化动态分析和快速定位(笔记完毕)
[分享] 安卓逆向课题之7, mobile spider get started. 看电视直播App(未加固)去广告升级 (笔记待完善)
[分享] 安卓逆向课题之8, 真实App实操带壳App重打包去强制升级(部分抄袭别人笔记)(一次不完美的实践)
[讨论] Android Reverse Project No.9, "Types of App Security Protection, Identification and Handling Methods"
[原创] Android Reverse Project No.9, "Types of App Protection“ ---- Video Course


安卓手机刷机方法论
线刷谷歌官方系统
Twrp/Magisk/FridaServer
Twrp/SuperSU/KaliNethunter
从内核的上帝视角对App全面监控

线刷谷歌官方系统,Twrp/Magisk/FridaServer

fastboot --version
下载谷歌官方镜像,
开机+ 音量向下键, 进入 bootloader 模式下, (unlocked), 必须先解锁.

7z x bullhead-om1.171019.011-factory-3be6fd1c.zip

nextus5, 接入虚拟机.
Flash_all.sh.

└─# fastboot --version
fastboot version 33.0.3-debian
Installed as /usr/lib/android-sdk/platform-tools/fastboot

download , 匹配的 twrp (Nextus 5x)代号 bullhead,
proxychains wget http://eu.dl.twrp.me/bullhead/twrp-3.3.1-0-bullhead.img

sha256sum bullhead-opm1.171019.011-factory-3be6fd1c.zip
//刷机前先校验 sha256 hash 是否正确.

adb reboot bootloader

fastboot flash recovery twrp-3.3.1-0-bullhead.img

proxychains wget https://guthub.com/topjohnwu/Magisk/releases/download/v20.4/Magisk-v20.4.zip

adb push Magisk-v20.4.zip /sdcard/

proxychains wget https://github.com/frida/frida/releases/download/12.11.7/frida-server-12.11.7-android-arm64.xz

file frida-server-12.11.7-android-arm64.xz
7z x frida-server-12.11.7-android-arm64.xz
file frida*

google search . Nexus 5x, wiki
arm64, armv8-a

adb push frida-server-12.11.7-android-arm64 /data/local/tmp/
unxz frida-server.xz
adb root # might be required
$ adb push frida-server /data/local/tmp/

twrp下面 update.zip, 使用 Magisk-v20.4.zip刷机包 ,root 系统.

adb install c:\Users\xwq\download\com.ttxapps.wifiadb_2.1.3.apk
launch wifi-adb , give it root priverta.
useing Qtscrcpy. connect the wifi devices.
adb connect 192.168.1.102
clike 允许. 一律信任这台设备

su
授权root
$ adb shell "chmod 755 /data/local/tmp/frida-server"
$ adb shell "/data/local/tmp/frida-server &"

恢复系统, 线刷,

flash_all.sh

Twrp/SuperSU/Kali Nethunter

proxychains wget https://down.nethunter-2020.2-bullhead-oreo-kalifsfull.zip

avoid. 避开 移动叔叔刷机, 避开系统折腾, 目标app逆向

adb reboot bootloader
power key + volume down , fastboot model enter.
fastboot flash recovery twrp-3.3.1-0-ullhead.img

enter twrp mode
adb push SR5-SuperSu-v2.82-SR5-20171001224502.zip /sdcard/
adb install c:\Users\xwq\download\com.ttxapps.wifiadb_2.1.3.apk
adb shell
su. //get the root power
adb push F:\n5x_nethunter\nethunter-bullhead-oreo-kalifs-full-2020.1.zip /sdcard/
adb reboot bootloader
enter twrp model
flash nethunter-bullhead-oreo-kalifs-full-2020.1.zip on twrp.

从内核的上帝视角对App全面监控

jnettop, 得到通讯 ip, 端口,URL, 速率信息
nethogs: 按进程,端口,PID分类整理收发包速率
htop: 当前系统负载,前台活跃进程, 线程和占用
netstat -tunlp: 端口对应进程号,监听,收发包端口
tcpdump 网口收发包转储工具, 后续供wireshark 分析
wireshark: 网络封包分析软件, 网络数据瑞士军刀
mitmproxy/Charles/BurpSuite:应用层协议分析工具
iwlist/aircrack-ng/HID; 网卡, 无线网络, 无线键盘等驱动.

adb connect 192.168.0.17
adb shell
ssh root@192.168.0.17
apt update
apt install neofetch jnettop htop nethogs

java 是 c++ 写的, art.so 就是 运行时.
安卓使用, bionic-C库封装的函数, 间接使用系统调用.
Linux系统上, 使用 glibc库封装函数, 间接使用系统调用.

nano 1.txt
cat 1.txt
strace cat 1.txt
apt install strace
strace cat 1.txt
ps -e //android using
ps aux // linux using
ps aux | grep -i ilulu
ps -e | grep -i ilulu // not complete
strace -p 1431
strace -p 1431 -o 10756.txt //  操作视频ap
du -h * // looking size of file.
cat 27531.txt |grep -i open
-e trace=process 和进程管理相关的调用,比如fork/exec/exit_group
-e trace=network 和网络通信相关的调用,比如socket/sendto/connect
-e trace=signal 信号发送和处理相关,比如kill/sigaction
-e trace=desc 和文件描述符相关,比如write/read/select/epoll等
-e trace=ipc 进程见同学相关,比如shmget等
lsof -p 10694 > 10694.txt

cat 10694.txt |grep TCP //可以直接看到App与远程服务器的通行信息;
cat 10694.txt |grep ".so" //可以直接看到打开的so文件
cat 10694.txt |grep "/data" • 可以直接看到/data/data目录下的相关信息,包括音视频缓存、数据库等。

线刷, 回到官方的, 系统
修改源码,没有大规模使用,就无法检测 .

参考 AD 附上 , (抄自肉丝的课)

狗皮膏药


[CTF入门培训]顶尖高校博士及硕士团队亲授《30小时教你玩转CTF》,视频+靶场+题目!助力进入CTF世界

最后于 2024-1-19 23:04 被calleng编辑 ,原因:
收藏
点赞1
打赏
分享
最新回复 (2)
雪    币: 80
活跃值: (2526)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
calleng 2023-12-31 21:38
2
0

修订中 --2023-12-31 刷机的出错。


└─# fastboot flash recovery twrp-3.3.1-0-bullhead.img                                                                                                                                                
Sending 'recovery' (6 KB)                          OKAY [  0.093s]
Writing 'recovery'                                 FAILED (remote: 'image is not a boot image')
fastboot: error: Command failed

download error, check the file size. 

┌──(root㉿r0env)-[~/bull]
└─# fastboot flash recovery twrp-3.3.1-0-bullhead.img
Sending 'recovery' (16321 KB)                      OKAY [  0.759s]
Writing 'recovery'                                 OKAY [  0.146s]
Finished. Total time: 0.951s

download again from Browser. and upload the Kali Linux.  Done.

雪    币: 80
活跃值: (2526)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
calleng 2023-12-31 21:48
3
0

Flash Custom ROM with ADB sideload command
To flash the custom ROM zip package file, enter the below command in the CMD:
adb sideload LineageOS18.zip


flash magisk  for 5x  with ADB Sideload !


└─# proxychains wget https://github.com/topjohnwu/Magisk/releases/download/v20.4/Magisk-v20.4.zip

┌──(root㉿r0env)-[~/bull]
└─# adb sideload Magisk-v20.4.zip                                                                                                                                                                    
Total xfer: 1.79x     

┌──(root㉿r0env)-[~/bull]
└─# adb devices
List of devices attached
02565c4f18882e19        recovery


游客
登录 | 注册 方可回帖
返回