跳到主要内容

frida


pip install frida-tools

frida-server 安装
https://github.com/frida/frida/releases/download/16.5.1/frida_16.5.1_iphoneos-arm64.deb

dpkg -i frida_16.5.1_iphoneos-arm64.deb

frida-ps -U


objection
注意与frida的兼容性
(可能 Pygaments 版本不兼容)

objection -g 进程名(pid) explore

objetion log 文件位置 users/Administrator/.objection

objection

查找描述文件
security find-identity

加载Frida Gadget动态库,以便能在运行时修改应用程序
objection patchipa -s netspi_test.ipa -c 0[REDACTED]C
其中-s参数是IPA文件,-c参数是代码签名证书。

安装 app
https://github.com/ios-control/ios-deploy
ios-deploy -W -b ./Payload/NetSPI.app

绕过iOS SSL验证
ios sslpinning disable

同类型软件
SSLKillSwitch:https://github.com/nabla-c0d3/ssl-kill-switch2
Burp Mobile Assistant:https://portswigger.net/burp/help/mobile_testing


frida-trace -U -i -p
-U usb 设备
-i c函数
-p pid
-F 前台应用
-j java 函数
-h objc 函数


越我插件开发
theos配置
Tweak hook
Tweak原理
Logos语法

各种裣测
抓包检測与绕过
抓包原理
证书检測 Objection ssIpinning
双向驗证 找p12证书 找密码
代理检測 不走代理
frida栓渊与绕过
越弒检測与绕过
非越就设备上的選向
iOS签名机制
重签名
代码逢入
免越狱使用frida
各种逆向实战
知识的共性


Reveal 查看界面

substate



frida-ps -U
正在运行的进程名称和PID

frida-ps -Uai
所有已安装的应用程序

frida-ps -Ua
列出USB设备上所有正在

frida-ls-devices
所有连接的设备

frida-trace -U Twitter -i "*URL*"
跟踪原生API

frida-trace -U Twitter -m "-[NSURL* *HTTP*]"
Tracing Objective-C APIs

log('\tBacktrace:\n\t' + Thread.backtrace(this.context,
Backtracer.ACCURATE).map(DebugSymbol.fromAddress)
.join('\n\t'));
回溯一个Objective-C 方法调用




将数据写入文件
agent.js
const data = { foo: 'bar' };
send(data);

app.py:
import frida

def on_message(message, data):
print(message['payload'])


调用本机函数
const address = Module.getExportByName('libsqlite3.dylib', 'sqlite3_sql');
const sql = new NativeFunction(address, 'char', ['pointer']);
sql(statement);



frida -U -n Twitter -l demo1.js
-n 指定要附加到的进程名称

var encryptFunc = ObjC,classes.EncryptManagerl'- encrypt:encryptorDecrypt:key:tag:"].implementation;
console.log (encryptFunc);
//objC.classes['EncryptManager;]
Interceptor.attach (encryptFunc, callbacksOrfrobe {
onEnter: function (arns:lnvocationArguments
console.log("xiaojianbang onEnter arp);
}, onLeave: function (retval ImvocationRetunValie ) {
console.log("xiaojlanbang onLeave");
};
{
onEnter(log, args, state) {
log('CC_SHA1() onEnter: ' + args[0].readCString(args[1].toInt32()));
this.args2 = args[2];
},


onLeave(log, retval, state) {
log('CC_SHA1() onLeave: ' + hexdump(this.args2, {length: 20}));
}
}