iOS Proxy detection bypass
5 views
42d97ab9...
Description
Frida script to bypass proxy/VPN detection is iOS implemented via the CFNetworkCopySystemProxySettings function using CFNetwork Module
How to Use
Download the script and run it with Frida CLI:
Download ScriptThen run with Frida:
frida -U -f YOUR_PACKAGE_NAME -l ios-proxy-detection-bypass.js
Replace YOUR_PACKAGE_NAME with the target app's package name.
Source Code
JavaScript
/*
Author: Vineet Nair (electrondefuser), Siddharth Saxena (s1dds)
Organization: XYSec Labs (Appknox)
*/
const CFNetwork = Module.getExportByName('CFNetwork', 'CFNetworkCopySystemProxySettings');
console.log("[+] Found CFNetwork as " + ptr(CFNetwork))
Interceptor.attach(CFNetwork, {
onEnter(args) {
console.log("[+] Detected Proxy Check");
},
onLeave(retval) {
var NSDict = ObjC.classes.NSMutableDictionary.alloc().init();
var data = getDefaultNetworkingConfig();
var keys = Object.keys(data);
for (var i = 0; i < keys.length; i++) {
NSDict.setObject_forKey_(keys[0], data[keys[0]]);
}
console.log("[+] Bypassing with iOS default networking values")
retval.replace(NSDict)
}
});
function getDefaultNetworkingConfig() {
var config = {
"FTPPassive": "1",
"ExceptionsList": "(\"*.local\", \"169.254/16\")",
"__SCOPED__": "{ en0 = {ExceptionsList = (\"*.local\", \"169.254/16\"); FTPPassive = 1; }; }"
}
return config
}
Comments