agentleFS
Rudra-raviRudra-ravi/frida-skills/frida-ios-hooks/SKILL.md

frida-ios-hooks

Skill3 starsChanged 6 months agoMITView on GitHub

Create and debug Frida hooks for iOS apps, including Objective-C, Swift symbols, modules, Interceptor, TLS pinning, rootless jailbreaks, Gadget, and ObjC issues.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when instrumenting iOS Objective-C, Swift, or native behavior.

    line 8
  2. Very specific:

    If ObjC.available is false for an iOS app, use frida-troubleshooting before assuming the script is wrong.

    line 25
  3. Distinctive:

    Prefer observation hooks for trust evaluation, crypto, signature generation, and request building before mutating results.

    line 48
  4. Distinctive:

    Start with Objective-C runtime surfaces when available: delegates, URL loading, keychain, pasteboard, file APIs, crypto wrappers, and …

    line 52
  5. Distinctive:

    Use CodeShare tools such as ObjC method observers for discovery, then replace them with narrow hooks once class/method names are known.

    line 55
  6. Distinctive:

    Use Gadget when normal attach is blocked but app modification is in scope.

    line 78
  7. Very specific:

    Read references/ios-patterns.md for Objective-C, Swift symbol, SecTrust, module, and rootless troubleshooting patterns.

    line 82

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Frida iOS Hooks

Use this skill when instrumenting iOS Objective-C, Swift, or native behavior.

Setup Checks

frida --version
frida-ps -Uai
frida -U -f com.example.app -l agent.js --no-pause

Confirm runtime availability:

console.log("ObjC.available =", ObjC.available);
console.log(Process.platform, Process.arch);

If ObjC.available is false for an iOS app, use frida-troubleshooting before assuming the script is wrong.

Objective-C Hook Pattern

if (ObjC.available) {
  const cls = ObjC.classes.NSURLSession;
  const method = cls["- dataTaskWithRequest:completionHandler:"];
  Interceptor.attach(method.implementation, {
    onEnter(args) {
      const request = new ObjC.Object(args[2]);
      console.log("[NSURLSession]", request.URL().toString());
    }
  });
}

Swift and Native Rules

  • Enumerate modules and symbols before guessing Swift mangled names.
  • Hook Objective-C-visible Swift through ObjC classes when possible.
  • For pure Swift/native functions, resolve symbols and use frida-native-hooks.
  • Spawn when hooks must run before app delegate, network stack, or anti-tamper initialization.
  • Prefer observation hooks for trust evaluation, crypto, signature generation, and request building before mutating results.

Practitioner Patterns

  • Start with Objective-C runtime surfaces when available: delegates, URL loading, keychain, pasteboard, file APIs, crypto wrappers, and jailbreak-detection selectors.
  • For Swift-heavy apps, use module/symbol enumeration plus caller stack traces; do not assume selectors exist unless Swift exposes them to Objective-C.
  • For pinning, check both Objective-C frameworks and native Security/BoringSSL/CommonCrypto paths. Apps often mix them.
  • Use CodeShare tools such as ObjC method observers for discovery, then replace them with narrow hooks once class/method names are known.
  • On rootless jailbreaks, keep a minimal "runtime available" script separate from the real agent so setup failures are not confused with hook bugs.

Discovery Snippets

if (ObjC.available) {
  for (const name of Object.keys(ObjC.classes).filter(n => n.includes("Trust"))) {
    console.log(name);
  }
}
for (const m of Process.enumerateModules()) {
  if (m.name.includes("Target")) console.log(m.name, m.base, m.path);
}

Pinning and Rootless Notes

  • Identify whether pinning is in NSURLSession, SecTrustEvaluate*, a third-party framework, or native custom code.
  • Rootless jailbreak setups may need matching Frida packages, correct bootstrap path, and updated tooling. Version skew often looks like attach failure or missing ObjC bridge.
  • Use Gadget when normal attach is blocked but app modification is in scope.

References

Read references/ios-patterns.md for Objective-C, Swift symbol, SecTrust, module, and rootless troubleshooting patterns.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.