rev-dex-dumper
Dump DEX files from a running Android app for unpacking/deobfuscation. Activate when the user wants to unpack an Android APK,…
Generate Frida hook scripts using modern Frida API. Activate when the user wants to write Frida scripts, hook functions at runtime, trace calls or arguments or return values, intercept native or ObjC or Java methods, dump memory or exports, or handle native module load timing
$ npx -y skills add p4nda0s/reverse-skills --skill rev-frida --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/rev-fridaContext preview
The summary Claude sees to decide when to auto-load this skill.
Generate Frida hook scripts using modern Frida API. Activate when the user wants to write Frida scripts, hook functions at runtime, trace calls or arguments or return values, intercept native or ObjC or Java methods, dump memory or exports, or handle native module load timing
name: rev-frida description: Generate Frida hook scripts using modern Frida API. Activate when the user wants to write Frida scripts, hook functions at runtime, trace calls or arguments or return values, intercept native or ObjC or Java methods, dump memory or exports, or handle native module load timing for Android and other targets.
Generate Frida instrumentation scripts for dynamic analysis, hooking, and runtime inspection.
Use Frida for:
The modern Frida CLI does not use `--no-pause`. A spawned process resumes after the script is loaded.
# Spawn and hook frida -U -f com.example.app -l hook.js # Attach to running process frida -U com.example.app -l hook.js # Attach by PID frida -U -p 1234 -l hook.js
const mod = Process.getModuleByName("libssl.so");
mod.name;
mod.base;
mod.size;
mod.path;
const ptr = mod.getExportByName("SSL_read");
Process.enumerateModules();
mod.enumerateExports();
mod.enumerateImports();
const addr = Module.getExportByName(null, "open");Interceptor.attach(ptr, {
onEnter(args) {
console.log("arg0:", args[0].toInt32());
console.log("arg1 str:", args[1].readUtf8String());
},
onLeave(retval) {
console.log("ret:", retval.toInt32());
}
});
Interceptor.replace(ptr, new NativeCallback(function (a0, a1) {
console.log("replaced");
return 0;
}, "int", ["pointer", "int"]));const open = new NativeFunction(
Module.getExportByName(null, "open"),
"int",
["pointer", "int"]
);
const fd = open(Memory.allocUtf8String("/etc/hosts"), 0);
const cb = new NativeCallback(function (arg) {
console.log("called with:", arg);
return 0;
}, "int", ["int"]);ptr(addr).readByteArray(size);
ptr(addr).readUtf8String();
ptr(addr).readU32();
ptr(addr).readPointer();
ptr(addr).writeByteArray(bytes);
ptr(addr).writeUtf8String("hello");
ptr(addr).writeU32(0x41414141);
const buf = Memory.alloc(256);
const str = Memory.allocUtf8String("hello");
Memory.scan(mod.base, mod.size, "48 89 5C 24 ?? 48 89 6C", {
onMatch(address, size) {
console.log("found at:", address);
},
onComplete() {}
});if (ObjC.available) {
const hook = ObjC.classes.ClassName["- methodName:"];
Interceptor.attach(hook.implementation, {
onEnter(args) {
const selfObj = new ObjC.Object(args[0]);
const param = new ObjC.Object(args[2]);
console.log(selfObj.toString());
console.log(param.toString());
}
});
}if (Java.available) {
Java.perform(function () {
const Activity = Java.use("android.app.Activity");
Activity.onCreate.implementation = function (bundle) {
console.log("onCreate called");
return this.onCreate(bundle);
};
});
}When generating Frida scripts:
1. Always use the modern API such as `Process.getModuleByName()` and `mod.getExportByName()`. 2. Do not use `--no-pause`. 3. Prefer load-event-driven native hooking over polling. 4. Print pointers and buffers in readable form. 5. Wrap risky hooks in `try/catch`. 6. Use `hexdump()` for binary inspection.
Do not assume a target `.so` is already loaded.
Preferred order: 1. Hook `android_dlopen_ext` or `dlopen` and install hooks when the target library loads. 2. Use an immediate `Process.findModuleByName()` check for already-loaded modules. 3. Use polling only as a fallback.
Use this helper by default:
function hookModuleLoad(moduleName, callback) {
const dlopen = Module.findGlobalExportByName("android_dlopen_ext")
|| Module.findGlobalExportByName("dlopen");
if (!dlopen) {
throw new Error("dlopen/android_dlopen_ext not found");
}
const hooked = new Set();
Interceptor.attach(dlopen, {
onEnter(args) {
this.path = args[0].isNull() ? null : args[0].readCString();
this.shouldHook = this.path && this.path.indexOf(moduleName) !== -1;
},
onLeave(retval) {
if (!this.shouldHook || retval.isNull()) {
return;
}
const mod = Process.findModuleByName(moduleName);
if (!mod) {
return;
}
const key = mod.base.toString();
if (hooked.has(key)) {
return;
}
hooked.add(key);
callback(mod);
}
});
}Use it like this:
hookModuleLoad("libtarget.so", function (mod) {
const target = mod.getExportByName("target_export");
Interceptor.attach(target, {
onEnter(args) {
console.log("target_export called");
}
});
});If the target may already be loaded, combine an immediate check with the load hook:
function hookNowOrOnLoad(moduleName, callback) {
const mod = Process.findModuleByName(moduleName);
if (mod) {
callback(mod);
return;
}
hookModuleLoad(moduleName, callback);
}Use polling only as a fallback:
function hookWhenReady(moduleName, exportName, callbacks) {
const mod = Process.findModuleByName(moduleName);
if (mod) {
Interceptor.attach(mod.getExportByName(exportName), callbacks);
return;
}
const timer = setInterval(function () {
const loaded = Process.findModuleByName(moduleName);
if (!loaded) {
return;
}
clearInterval(tim逆向工程分析技能,支持 40+ 种 AI 编程工具。 专为 IDA-NO-MCP 设计 - 从 IDA 导出反编译结果,然后使用 AI 编程工具进行分析。
Dump DEX files from a running Android app for unpacking/deobfuscation. Activate when the user wants to unpack an Android APK,…
IDAPython and IDALib script reference for reverse engineering. Activate when the user needs to write IDAPython scripts in IDA,…
Reconstruct data structures by analyzing memory access patterns across functions
Restore function symbols by analyzing code patterns, strings, constants, and cross-references
Dump Unity IL2CPP symbols from iOS/Android builds. Extract method names, addresses, and type info from IL2CPP binaries and…
Debug and emulate specific code fragments or functions using the Unicorn engine. Activate when the user wants to emulate a…