Quantcast
Channel: Frida • A world-class dynamic instrumentation toolkit
Viewing all articles
Browse latest Browse all 218

Frida 1.0.10 Released

$
0
0

This release brings a few improvements:

  • Interceptor is now compatible with a lot more functions on iOS/ARM.
  • A new CLI tool called frida-repl provides you with a basic REPL to experiment with the JavaScript API from inside a target process.
  • onLeave callback passed to Interceptor.attach() is now able to replace the return value by calling retval.replace().
  • Both onEnter and onLeave callbacks passed to Interceptor.attach() can access this.errno (UNIX) or this.lastError (Windows) to inspect or manipulate the current thread’s last system error.

Here’s how you can combine the latter three to simulate network conditions for a specific process running on your Mac:

~ $ frida-repl TargetApp

Then paste in:

callbacks = { \
    onEnter: function onEnter(args) { \
        args[0] = ptr(-1); // Avoid side-effects on socket \
    }, \
    onLeave: function onLeave(retval) { \
        var ECONNREFUSED = 61; \
        this.errno = ECONNREFUSED; \
        retval.replace(-1); \
    } \
}; \
Module.enumerateExports("libsystem_kernel.dylib", { \
    onMatch: function (exp) { \
        if (exp.name.indexOf("connect") === 0 && exp.name.indexOf("connectx") !== 0) { \
            Interceptor.attach(exp.address, callbacks); \
        } \
    }, \
    onComplete: function () {} \
});

Enjoy!


Viewing all articles
Browse latest Browse all 218

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>