Frida 1.0.10 Released ∞
release
This release brings a few improvements:
Interceptoris now compatible with a lot more functions on iOS/ARM.- A new CLI tool called
frida-replprovides you with a basic REPL to experiment with the JavaScript API from inside a target process. onLeavecallback passed toInterceptor.attach()is now able to replace the return value by callingretval.replace().- Both
onEnterandonLeavecallbacks passed toInterceptor.attach()can accessthis.errno(UNIX) orthis.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 TargetAppThen paste in:
callbacks = { \
onEnter(args) { \
args[0] = ptr(-1); // Avoid side-effects on socket \
}, \
onLeave(retval) { \
const ECONNREFUSED = 61; \
this.errno = ECONNREFUSED; \
retval.replace(-1); \
} \
}; \
Module.enumerateExports("libsystem_kernel.dylib", { \
onMatch(exp) { \
if (exp.name.indexOf("connect") === 0 && exp.name.indexOf("connectx") !== 0) { \
Interceptor.attach(exp.address, callbacks); \
} \
}, \
onComplete() {} \
});Enjoy!
oleavr