我正在使用 Trustkit 为我的应用程序处理 SSL Pinning。
但是无论我多么努力,它仍然被使用 Objection 绕过
我尝试添加检查 SSLHooked 功能,但它似乎也不起作用
void* (*createTrustFunc)() = dlsym(RTLD_DEFAULT, "tls_helper_create_peer_trust");
if(createTrustFunc == 0x0){
// Unable to find symbol, assume function is hooked.
return 1;
}
unsigned int * createTrustFuncAddr = (unsigned int *) createTrustFunc;
// Verify if one of first three instructions is an unconditional branch
// to register (BR Xn), unconditional branch with link to register
// (BLR Xn), return (RET).
for(int i = 0; i < 3; i++){
int opCode = createTrustFuncAddr[i] & 0xfffffc1f;
if(opCode == 0xD61F0000){
// Instruction found, function is hooked.
return 1;
}
}
// Function is not hooked through a trampoline.
return 0;
任何建议请
谢谢。