frida
Auth/lab ref: Dynamic instrumentation toolkit for hooking functions, tracing APIs, and manipulating running processes across Windows, Linux, macOS, Android, and iOS.
v2026.11.13-21cd5683 installs+3 in 7 days39 StarsMITsynced 10 hours ago
Install
No NotHoly CLI yet? Install it first.
$ curl -fsSL https://notholy.com/install.sh | sh$ notholy skills install aeondave/fridaWrites to ~/.notholy/skills after checking the signature and the SHA-256.
SignatureSigned, ed25519
Packaged27689a8…43a39929
d27689a8fcc2…6d0743a399292 files · 8.3 KBScanLow1 finding
- Links to outside domains
Sourcegithub.com/AeonDave/malskill/tree/main/offensive-tools/rev/frida@21cd568
On this page
Frida 17+ API: Resolve exports via module instances (
Process.getModuleByName(name).getExportByName(sym)) orModule.getGlobalExportByName(sym); use NativePointer methods (ptr.readByteArray(),ptr.writeByteArray()).
Dynamic instrumentation — inject JavaScript into running processes to hook, trace, and modify behavior at runtime.
Installation
# CLI tools
pip install frida-tools
# Python bindings
pip install frida
# For Android: push frida-server to device
# Download from https://github.com/frida/frida/releases (match arch)
adb push frida-server /data/local/tmp/
adb shell chmod 755 /data/local/tmp/frida-server
adb shell /data/local/tmp/frida-server &Quick Start
# List running processes
frida-ps # Local
frida-ps -U # USB (Android/iOS)
# Attach to process
frida -p PID
frida -n process_name
# Spawn and attach
frida -f /path/to/binary
# Run a script
frida -p PID -l hook.js
# Trace functions matching pattern
frida-trace -i "recv*" -p PID
frida-trace -i "open*" -f ./binaryCore JavaScript API
Interceptor — Hook Functions
// Hook a native function
Interceptor.attach(Module.getGlobalExportByName('connect'), {
onEnter(args) {
const sockaddr = args[1];
const family = sockaddr.readU16();
if (family === 2) { // AF_INET
const port = (sockaddr.add(2).readU8() << 8) | sockaddr.add(3).readU8();
const ip = [
sockaddr.add(4).readU8(), sockaddr.add(5).readU8(),
sockaddr.add(6).readU8(), sockaddr.add(7).readU8()
].join('.');
console.log(`[connect] ${ip}:${port}`);
}
},
onLeave(retval) {
console.log(`[connect] returned ${retval}`);
}
});Replace Function Return
// Force IsDebuggerPresent to return 0 (Windows anti-debug bypass)
Interceptor.attach(Process.getModuleByName('kernel32.dll').getExportByName('IsDebuggerPresent'), {
onLeave(retval) {
retval.replace(ptr(0));
}
});Module and Memory
// List loaded modules
Process.enumerateModules().forEach(m => {
console.log(`${m.name} @ ${m.base} size=${m.size}`);
});
// Find export
const addr = Process.getModuleByName('libc.so').getExportByName('open');
// Read/write memory
const buf = ptr(0x401000).readByteArray(64);
ptr(0x401000).writeByteArray([0x90, 0x90, 0x90]);
// Scan memory for pattern
Memory.scan(module.base, module.size, 'MZ', {
onMatch(address, size) { console.log(`Found MZ at ${address}`); },
onComplete() { console.log('Scan done'); }
});Stalker — Instruction Tracing
Stalker.follow(Process.getCurrentThreadId(), {
events: { call: true, ret: true },
onCallSummary(summary) {
for (const [addr, count] of Object.entries(summary)) {
const mod = Process.findModuleByAddress(ptr(addr));
if (mod) console.log(`${mod.name}+${ptr(addr).sub(mod.base)}: ${count} calls`);
}
}
});Common Workflows
Malware — trace network calls (Linux)
['connect', 'send', 'sendto', 'recv', 'recvfrom'].forEach(fn => {
const p = Module.findGlobalExportByName(fn);
if (p) {
Interceptor.attach(p, {
onEnter(args) {
console.log(`[${fn}] fd=${args[0]}, buf=${args[1]}, len=${args[2]}`);
if (fn.startsWith('send')) {
console.log(hexdump(args[1], { length: Math.min(args[2].toInt32(), 128) }));
}
}
});
}
});Malware — intercept crypto (Windows)
Interceptor.attach(Process.getModuleByName('bcrypt.dll').getExportByName('BCryptEncrypt'), {
onEnter(args) {
this.plaintext = args[1];
this.len = args[2].toInt32();
console.log(`[BCryptEncrypt] plaintext (${this.len} bytes):`);
console.log(hexdump(this.plaintext, { length: Math.min(this.len, 256) }));
}
});Android — bypass SSL pinning
Java.perform(() => {
const TrustManager = Java.registerClass({
name: 'com.frida.TrustManager',
implements: [Java.use('javax.net.ssl.X509TrustManager')],
methods: {
checkClientTrusted(chain, authType) {},
checkServerTrusted(chain, authType) {},
getAcceptedIssuers() { return []; }
}
});
const SSLContext = Java.use('javax.net.ssl.SSLContext');
const ctx = SSLContext.getInstance('TLS');
ctx.init(null, [TrustManager.$new()], null);
SSLContext.getInstance.overload('java.lang.String').implementation = function(protocol) {
return ctx;
};
console.log('[bypass] SSL pinning disabled');
});Android — hook Java methods
Java.perform(() => {
const clazz = Java.use('com.example.app.LoginActivity');
clazz.validatePassword.implementation = function(password) {
console.log(`[hook] validatePassword("${password}")`);
const result = this.validatePassword(password);
console.log(`[hook] returned ${result}`);
return result;
};
});Windows — trace injection APIs
const apis = ['VirtualAlloc', 'VirtualProtect', 'CreateRemoteThread',
'WriteProcessMemory', 'CreateProcessW'];
apis.forEach(api => {
const p = Process.getModuleByName('kernel32.dll').getExportByName(api);
if (p) {
Interceptor.attach(p, {
onEnter(args) {
console.log(`[${api}] called from ${this.returnAddress}`);
console.log(` args: ${args[0]}, ${args[1]}, ${args[2]}, ${args[3]}`);
},
onLeave(retval) {
console.log(`[${api}] returned ${retval}`);
}
});
}
});frida-trace
# Trace all open* calls
frida-trace -i "open*" -f ./binary
# Trace specific library functions
frida-trace -i "SSL_*" -f ./binary
# Trace ObjC methods (iOS/macOS)
frida-trace -m "-[NSURLSession *]" -p PID
# Trace Java methods (Android)
frida-trace -j "com.example.app.LoginActivity!*" -U -f com.example.appPython API
import frida
def on_message(message, data):
if message['type'] == 'send':
print(f"[*] {message['payload']}")
device = frida.get_local_device()
session = device.attach("target_process")
script = session.create_script("""
Interceptor.attach(Module.getGlobalExportByName('connect'), {
onEnter(args) { send('connect called'); }
});
""")
script.on('message', on_message)
script.load()
input("Press Enter to detach...")
session.detach()Resources
| File | When to load |
|---|---|
| references/android-ios.md | Mobile-specific instrumentation: SSL bypass, root bypass, Gadget embedding, JNI/native hooking, anti-Frida evasion |
See Also
mobile-technique— full mobile pentest methodology; routes here for dynamic instrumentationsmali-dex-patching— static APK patching alternative; loadsmali-dex-patching/references/hooking-vs-patching.mdto decide which approachandroid-jni-ndk— JNI mechanics, NDK debugging, Rust-on-Android; needed when reversing native.soloaded via Frida hookssmali-dex-patching/references/dynamic-dex-and-native-loaders.md— hybrid loader patterns (DexClassLoader + native bootstrap + second-stage recovery)reversing-technique— when Frida tracing leads to a native binary requiring static RE (Ghidra/IDA/r2)
Files in this version
references/118.1 KB
- android-ios.md18.1 KB
- SKILL.md7.7 KB
Permissions
| Permission | Declared | Found by the scan |
|---|---|---|
| Reads files | No | No |
| Writes files | Yes | Yes |
| Runs shell commands | Yes | Yes |
| Uses the network | Yes | Yes |
| Uses connectors | No | No |
| Drives a browser | No | No |
Scan findings
Reviewed on Nov 13, 2026
- InfoLink · Links to outside domains
A clean scan lowers the risk but does not prove a package is safe. Read what you install.
| Version | Published | Commit | SHA-256 | Signature | Permission change |
|---|---|---|---|---|---|
| v2026.11.13-21cd568 | Nov 13, 2026 | 21cd568 | d27689a8 | Signed | – |
More from AeonDave
All from this publisherMore in Mobile, firmware and hardware
See the categoryAsk anything your scope allows.
Create an account, add credits and ask the first question in the chat or the terminal.
- 1/3
Create the account
Individual or company. You can switch to a company later without losing balance or keys.
IndividualCompany - 2/3
Add credits
By card. Pay per token, no subscription.
$5.00minimum deposit - 3/3
Ask
In the chat, or install the CLI and run notholy login in your terminal.
$ notholy login