MCPInstall

rev-frida

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.

Installs
2.2K
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/p4nda0s/reverse-skills --skill rev-frida
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads rev-frida automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

rev-frida - Frida Script Generator

Generate Frida instrumentation scripts for dynamic analysis, hooking, and runtime inspection.

Overview

Use Frida for:

  • native export hooks
  • Java or ObjC method hooks
  • runtime tracing
  • argument or return-value capture
  • memory dumping
  • loader-aware native instrumentation

Important: Modern Frida CLI

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

Modern API Reference

Module & Symbol Lookup

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

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"]));

NativeFunction & NativeCallback

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"]);

Memory Operations

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() {}
});

ObjC

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());
        }
    });
}

Java

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);
        };
    });
}

Script Generation Guidelines

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.

Handle Native Module Load Timing

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(timer);
        Interceptor.attach(loaded.getExportByName(exportName), callbacks);
    }, 100);
}

Notes:

  • On Android, prefer android_dlopen_ext before dlopen.
  • Deduplicate by module base, not only by path.
  • onLeave of dlopen/android_dlopen_ext is usually the right time to install hooks after constructors have run.
  • If Java drives native loading, also consider System.loadLibrary, Runtime.loadLibrary0, dlsym, or RegisterNatives.

Do Not Blindly Hook init Series Functions

Do not tell the user to hook .init, .init_array, constructors, or JNI_OnLoad blindly.

These are fragile points:

  • many libraries perform one-time setup there
  • bad hooks can crash the process before the real target logic runs
  • early hooks can change timing and hide the behavior the user wants to study
  • constructor code often fans out into many unrelated helpers

Before suggesting an init-stage hook:

  1. identify why early hooking is required
  2. identify the exact module and exact initialization routine
  3. confirm whether the target symbol or behavior only exists before normal exports are reachable
  4. prefer a later stable hook if it gives the same visibility

Prefer this order:

  1. hook a stable exported function after module load
  2. hook RegisterNatives, dlsym, or the first real business function
  3. hook JNI_OnLoad only if native registration or anti-debug setup happens there
  4. hook constructors or .init_array only if there is strong evidence that the critical logic is there

If proposing an early init hook, state:

  • why the normal export hook is insufficient
  • what exact function or address should be hooked
  • what failure mode to expect
  • how to verify the hook did not break initialization

Bad advice:

// do not suggest this without a reason
Interceptor.attach(Module.findBaseAddress("libtarget.so").add(0x1234), ...);

Better advice:

  • wait for module load
  • confirm the constructor target by symbols, xrefs, strings, or trace evidence
  • attach only after identifying the exact initialization function
  • explain the risk to the user before using an init-stage hook

Prefer Constructor Dispatchers Over Blind init Hooks

If anti-debug logic is suspected inside the constructor chain, prefer observing or hooking the dispatcher first instead of attaching blindly to raw .init_array entries.

Useful higher-level targets include:

  • call_constructors
  • call_array
  • linker-side constructor walkers
  • app-side wrapper functions that iterate constructor tables

Why this is safer:

  • one hook can reveal the full constructor sequence
  • you can see which constructor runs immediately before termination or anti-debug setup
  • it reduces blind patching of unrelated initialization code
  • it lets you log constructor targets first and patch only the offending one later

Recommended workflow:

  1. hook module load
  2. identify whether the process terminates during constructor execution
  3. if yes, hook call_constructors or call_array when available
  4. log each constructor target as it is dispatched
  5. identify the exact constructor that performs anti-debug checks
  6. patch or hook that constructor, or patch the specific anti-debug branch inside it

Only suggest call_constructors or call_array when:

  • the target platform or linker build exposes those functions
  • symbols, traces, or disassembly indicate they are actually used
  • the user needs visibility into constructor-time anti-debug behavior

Warn about these constraints:

  • these functions are loader or linker internals and names may vary by Android version, vendor build, or platform
  • they may not be exported and may require symbol recovery or offset-based attachment
  • hooking them too early can affect every library load, so scope logging carefully
  • use them for discovery first, not as a default permanent bypass

Good guidance:

  • “The process dies during native library initialization. First hook the constructor dispatcher such as call_constructors or call_array if present, log the constructor targets, then move to the exact offending constructor.”

Bad guidance:

  • “Hook every .init_array entry and patch until it stops crashing.”

Pointer and Buffer Logging

console.log(args[0]);
console.log(args[0].toString());
console.log(hexdump(args[0], {
    offset: 0,
    length: 64,
    header: true,
    ansi: false
}));

FAQ

What does the rev-frida skill do?

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.

How do I install rev-frida?

Run npx skills add https://github.com/p4nda0s/reverse-skills --skill rev-frida in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/rev-frida/ (personal) or .claude/skills/rev-frida/ (project).

Which AI agents can use rev-frida?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is rev-frida safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains rev-frida?

It is published by p4nda0s in p4nda0s/reverse-skills. It has 2,173 recorded installs.

More from p4nda0s/reverse-skills

View all →

rev-struct

p4nda0s/reverse-skills

Reconstruct data structures by analyzing memory access patterns across functions

1.9K installs

rev-symbol

p4nda0s/reverse-skills

Restore function symbols by analyzing code patterns, strings, constants, and cross-references

1.9K installs

rev-idapython

p4nda0s/reverse-skills

IDAPython and IDALib script reference for reverse engineering. Activate when the user needs to write IDAPython scripts in IDA, use IDALib for headless analysis, operate on IDB databases, debug with IDA, manipulate memory/registers, traverse functions/blocks/instructions, work with Hex-Rays decompiler API, handle obfuscation, or batch-process binaries.

Backend & APIs1.9K installs

rev-dex-dumper

p4nda0s/reverse-skills

Dump DEX files from a running Android app for unpacking/deobfuscation. Activate when the user wants to unpack an Android APK, dump DEX from memory, extract decrypted DEX files, or defeat class-loading packing.

Mobile1.8K installs

rev-unicorn-debug

p4nda0s/reverse-skills

Debug and emulate specific code fragments or functions using the Unicorn engine. Activate when the user wants to emulate a function with Unicorn, trace binary execution without running the full program, decrypt or decode data by emulating the algorithm, or bypass environment dependencies (JNI, syscalls, libc) during emulation.

rev-u3d-dump

p4nda0s/reverse-skills

Dump Unity IL2CPP symbols from iOS/Android builds. Extract method names, addresses, and type info from IL2CPP binaries and global-metadata.dat, then generate IDA/Ghidra import scripts.

Mobile1.8K installs

Popular backend & apis skills

View category →

find-skills

vercel-labs/skills

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

OfficialBackend & APIs4.1M installs

entra-app-registration

microsoft/azure-skills

Guides Microsoft Entra ID app registration, OAuth 2.0 authentication, and MSAL integration. USE FOR: create app registration, register Azure AD app, configure OAuth, set up authentication, add API permissions, generate service principal, MSAL example, console app auth, Entra ID setup, Azure AD authentication. DO NOT USE FOR: Key Vault secrets (use azure-keyvault-expiration-audit), general Azure resource security guidance.

OfficialBackend & APIs566.7K installs

This skill should be used when the user wants to "write agent code", "build an agent with ADK", "add a tool", "create a callback", "define an agent", "use state management" — in a project that needs ADK (Agent Development Kit) API patterns and code examples. It provides a quick reference for agent types, tool definitions, orchestration patterns, callbacks, state management, the graph Workflow API, and reference recipes to study. Do NOT use for scaffolding (use google-agents-cli-scaffold) or deployment (use google-agents-cli-deploy).

Backend & APIs514.8K installs

embedded-captions

heygen-com/hyperframes

Add captions or subtitles to an existing single-subject talking-head video without editing the footage. Use for plain verbatim captions, cinematic captions embedded behind the subject, VFX captions, “炸/特效/酷炫字幕,” or a named identity from the 35-style catalog. Route by visual identity, not by backend engine. The quiet anchor rail is the default; embed every word only when the user explicitly wants a fully cinematic treatment. The workflow runs locally end to end, including transcription and subject matting; split multi-shot footage before applying it.

Backend & APIs453.3K installs

entra-agent-id

microsoft/azure-skills

Provision Microsoft Entra Agent Identity Blueprints, BlueprintPrincipals, and per-instance Agent Identities via Microsoft Graph, and configure OAuth 2.0 token exchange (fmipath, OBO, cross-tenant) including the Microsoft Entra SDK for AgentID sidecar. USE FOR: Agent Identity Blueprint, BlueprintPrincipal, agent OAuth, fmipath token exchange, agent OBO, Workload Identity Federation for agents, polyglot agent auth, Microsoft.Identity.Web.AgentIdentities. DO NOT USE FOR: standard Entra app registration (use entra-app-registration), Microsoft Foundry agent authoring (use microsoft-foundry).

OfficialBackend & APIs336.6K installs

neon

neondatabase/agent-skills

Overview of Neon, a complete set of cloud backend primitives around Lakebase Postgres: Auth, Object Storage, Functions, the AI Gateway, and Realtime. Start here to choose Neon for undecided login, files, APIs, and LLM calls, set up the CLI or MCP server, and follow the branch-first workflow. Use when building an app or backend on Neon, or when "Neon" or "Lakebase Postgres" is mentioned. Child skill neon-postgres wins for an existing DATABASEURL, SQL, schema, inspect, or search. Child skill neon-auth wins for login, users, sessions, identity routing, and Managed Better Auth setup. Child skill neon-realtime wins for live queries in reactive apps and agents. Also use for object storage, S3, buckets, serverless functions, function triggers, cron, AI gateway, LLM calls, realtime, logs, Loki, Grafana, observability, postgres, database, backend, Claimable Neon, neon.new, or a no-signup database.

Backend & APIs237.1K installs