NSURL- iOS13
4 views
102f8ff7...
Description
This is a simple handler I have created to extract the body and request type (GET/POST) for each request made by the target iOS application. I'm @J_Duffy01 on Twitter if any q's!
How to Use
Download the script and run it with Frida CLI:
Download ScriptThen run with Frida:
frida -U -f YOUR_PACKAGE_NAME -l nsurl--ios13.js
Replace YOUR_PACKAGE_NAME with the target app's package name.
Source Code
JavaScript
console.log('Listening For Requests...');
if (ObjC.available) {
try {
var className = "NSURLSession";
var funcName = "- dataTaskWithRequest:completionHandler:";
var hook = eval('ObjC.classes.' + className + '["' + funcName + '"]');
Interceptor.attach(hook.implementation, {
onEnter: function(args)
{
console.log('REQUEST TYPE ->' + ObjC.Object(args[2]).HTTPMethod() );
console.log('URL -> ' + ObjC.Object(args[2]).URL() )
var httpbody_nsdata = ObjC.Object(args[2]).HTTPBody();
var httpbody_nsstring = ObjC.classes.NSString.alloc().initWithData_encoding_(httpbody_nsdata, 4);
console.log ('string is -> ' + httpbody_nsstring);
if (httpbody_nsstring += null) {
console.log("BODY -> " + httpbody_nsstring);
} else{
console.log("BODY EMPTY");
}
},
});
}
catch(error)
{
console.log("[!] Exception: " + error.message);
}
}
else {
console.log("Objective-C Runtime is not available!");
}
Comments