Skip to content

Commit

Permalink
Remove SecTrustEvaluate SSL pinning bypass hook.
Browse files Browse the repository at this point in the history
Hooking this method was causing other pinning bypasses to fail.
  • Loading branch information
leonjza committed Nov 10, 2017
1 parent 305a8fc commit 407d4a9
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions objection/hooks/ios/pinning/disable.js
Original file line number Diff line number Diff line change
Expand Up @@ -445,34 +445,6 @@ Interceptor.replace(SSLHandshake, new NativeCallback(function (context) {
}
}, 'int', ['pointer']));

// SecTrustEvaluate
// Refs:
// https://github.com/vtky/Swizzler2/blob/159a5eaf64bc56d92f823b028fd1c11b71324e90/SSLKillSwitch.js#L92
send({
status: 'success',
error_reason: NaN,
type: 'ios-ssl-pinning-bypass',
data: 'Hooking lower level method: SecTrustEvaluate'
});

var SecTrustEvaluate = new NativeFunction(
Module.findExportByName('Security', 'SecTrustEvaluate'),
'int', ['pointer', 'pointer']
);

Interceptor.replace(SecTrustEvaluate, new NativeCallback(function (trust, result) {

quiet_send({
status: 'success',
error_reason: NaN,
type: 'ios-ssl-pinning-bypass',
data: '[SecTrustEvaluate] Called SecTrustEvaluate()'
});

return errSecSuccess;

}, 'int', ['pointer', 'pointer']));

// iOS 10

// tls_helper_create_peer_trust
Expand Down

0 comments on commit 407d4a9

Please sign in to comment.