ctx_pointer.getPointer(0x484) 取偏移0x484处的值,将其作为指针返回
ctx_pointer.share(0x484L) 偏移0x484,将其作为指针返回
| # (HTTP and SOCKS5 in one port) | |
| mixed-port: 7890 | |
| # RESTful API for clash | |
| external-controller: 127.0.0.1:9090 | |
| allow-lan: false | |
| mode: global | |
| log-level: info | |
| #bind-address:* | |
| dns: | |
| enable: true |
| function hook_libc(){ | |
| let fgets_ptr = Module.findExportByName("libc.so", "fgets"); | |
| let fgets = new NativeFunction(fgets_ptr, "pointer", ["pointer", "int", "pointer"]); | |
| let popen_addr = Module.findExportByName("libc.so", "popen"); | |
| console.log(`popen_addr => ${popen_addr}`); | |
| Interceptor.attach(popen_addr, { | |
| onEnter: function(args){ | |
| let command = args[0].readUtf8String(); | |
| let mode = args[1].readUtf8String(); | |
| console.log(`[popen] [onEnter] command=${command} mode=${mode}`) |
| Java.perform(function() { | |
| const System = Java.use('java.lang.System'); | |
| const Runtime = Java.use('java.lang.Runtime'); | |
| const SystemLoad_2 = System.loadLibrary.overload('java.lang.String'); | |
| const VMStack = Java.use('dalvik.system.VMStack'); | |
| SystemLoad_2.implementation = function(library) { | |
| send("Loading dynamic library => " + library); | |
| try { | |
| const loaded = Runtime.getRuntime().loadLibrary0(VMStack.getCallingClassLoader(), library); |
| // https://www.cnblogs.com/c-x-a/p/15192821.html | |
| function main(){ | |
| write_file1() | |
| write_File2() | |
| } | |
| function write_file1(){ | |
| //使用firda的自带api | |
| var file = new File("/data/local/tmp/mytest.dat") | |
| file.write("1234"); | |
| file.flush(); |
ctx_pointer.getPointer(0x484) 取偏移0x484处的值,将其作为指针返回
ctx_pointer.share(0x484L) 偏移0x484,将其作为指针返回
| #! /bin/sh | |
| #进程名字可修改 | |
| #脚本逻辑 -> 存在端口 pass 不存在则检查小红书在不在 在就注入 否则-f启动或者点击方式启动 然后循环 | |
| #用frida加载androidAsync.dex在APP跑了个http服务对外提供接口,PORT是http服务监听的端口,用的是frida-inject注入js | |
| #如果是frida-server那么可以改为用ps判断frida-server在不在 | |
| #启动命令 sh -T- /data/local/tmp/daemon.sh | |
| PORT=45459 | |
| CURRENT_WINDOW_COUNT=0 | |
| PRO_NAME=com.xingin.xhs |
| cp mitm.pem `openssl x509 -inform PEM -subject_hash_old -noout -in mitm.pem`.0 | |
| mount -o rw,remount /system | |
| mv abcdef00.0 /system/etc/security/cacerts/ | |
| chmod 644 /system/etc/security/cacerts/abcdef00.0.0 |
settings put global captive_portal_https_url https://connect.rom.miui.com/generate_204
settings put global captive_portal_http_url http://connect.rom.miui.com/generate_204| const utils = { | |
| colors: { | |
| red: function(string) { | |
| return '\x1b[31m' + string + '\x1b[0m'; | |
| }, | |
| green: function(string) { | |
| return '\x1b[32m' + string + '\x1b[0m'; | |
| }, |