善用命令行,快速验证你的想法。 -----箴言-----
使用CLI工具连接并注入到app中,app必须是已经在运行的app。
1. 连接并注入到app中:
frida -U -n com.example.appmsyhudiddemo
2. Process实战函数:
isDebuggerAttached
hasOwnProperty
[Android Emulator 5554::com.example.appmsyhudiddemo]-> Process
{
"arch": "ia32",
"codeSigningPolicy": "optional",
"id": 1418,
"pageSize": 4096,
"platform": "linux",
"pointerSize": 4
}
[Android Emulator 5554::com.example.appmsyhudiddemo]-> Process.isDebuggerAttached()
false
[Android Emulator 5554::com.example.appmsyhudiddemo]-> this.hasOwnProperty('Frida')
true
[Android Emulator 5554::com.example.appmsyhudiddemo]-> this.hasOwnProperty('Fridax')
false
[Android Emulator 5554::com.example.appmsyhudiddemo]->
代码说明:
(1)Process:查看进行信息,其中:
进程信息字段说明:
arch:cpu架构,字符串ia32,x64,arm 或arm64
codeSigningPolicy:策略
id:进程id
pageSize:页大小,即虚拟内存页面大小(以字节为单位)
platform:平台,其实就是系统,例如,字符串windows, darwin,linux或qnx
pointerSize:指针大小(以字节为单位)
Process.isDebuggerAttached:进程是否在调试
(2)this.hasOwnProperty(string):检测python是否有参数指定的模块。
喜欢本文,随手点个赞呗 :)