agentleFS
kings0527kings0527/pi-harness/skills/re-escalation/SKILL.md

re-escalation

Skill9 starsChanged 3 months agoMITView on GitHub

RE strategy escalation protocol. Use when current reverse engineering approach has failed 3+ times to force systematic path switching and prevent wasted effort.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 9 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When current level fails, ALWAYS escalate to the next level.

    line 41
  2. Distinctive:

    Before moving to next level, answer these questions to ensure you're not missing something obvious:

    line 78
  3. Distinctive:

    When escalating, document your path to avoid repeating failed approaches:

    line 115
  4. Distinctive:

    Use this to set expectations BEFORE starting:

    line 137
  5. Distinctive:

    If estimated effort > 3x available time → Immediately go to L5 (reduce scope)

    line 150
  6. Distinctive:

    If success probability < 40% → Plan for partial results from the start

    line 151
  7. Distinctive:

    If you're already at 50% of estimated time with no L1/L2 success → Jump to L4

    line 152
  8. Distinctive:

    Never retry the exact same thing: If you're about to do something you already did, STOP.

    line 156
  9. Distinctive:

    Failure is information: Every failed attempt tells you something — extract that information before trying again.

    line 157

≈ “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

SKILL: Reverse Engineering Escalation Protocol

AI LOAD INSTRUCTION: Strategy escalation skill for reverse engineering. Load this when your current approach is failing repeatedly. This skill provides systematic rules for WHEN to stop, WHAT to try next, and HOW to avoid the #1 RE failure mode: endlessly retrying the same broken approach. Based on analysis of 1000+ real RE sessions where agents wasted 80%+ effort on dead-end paths.

0. RELATED ROUTING

  • re-router — re-assess target and pick a completely different path
  • mobile-dynamic-re — dynamic analysis approach
  • emulation-re — offline emulation approach
  • native-static-re — static analysis approach

1. STOP CONDITIONS — Hard Rules

These are NON-NEGOTIABLE. When any condition is met, you MUST stop current approach:

#ConditionMandatory Action
S1Same error message/failure 3 consecutive timesSTOP. Analyze WHY it fails, not just retry
S2Same approach with minor variations failed 5 times totalSTOP. Escalate to next level (§2)
S3Spent >30 min on single sub-problem with zero measurable progressSTOP. Re-read §3 diagnostic checklist
S4Target actively detects and blocks your tool/techniqueSTOP. You need to defeat detection FIRST (→ anti-debugging-techniques)
S5Approach requires resource you don't have (device/key/server)STOP. Switch to approach that doesn't need it

What "measurable progress" means:

  • ✅ Identified a new function/address relevant to goal
  • ✅ Successfully hooked a target and got non-trivial output
  • ✅ Decoded/decrypted a previously opaque value
  • ✅ Narrowed search space significantly
  • ❌ "Tried another variation" without new information
  • ❌ "Read more code" without finding the target
  • ❌ "Modified script slightly" with same error result

2. FIVE-LEVEL ESCALATION PATH

When current level fails, ALWAYS escalate to the next level. Never skip levels unless you have clear evidence the intermediate levels won't work.

┌─────────────────────────────────────────────────────────────┐
│ L1: DIRECT APPROACH                                          │
│ • Direct Frida hook / Direct IDA decompile / Direct trace   │
│ • Expected: works on unprotected targets                    │
│ • Failure signal: crash, empty result, immediate detection  │
├─────────────────────────────────────────────────────────────┤
│ L2: STEALTH APPROACH                                         │
│ • Delayed injection / spawn mode / renamed agent binary      │
│ • Early-hook (before app init) / Intercept at deeper layer  │
│ • Expected: works when L1 detected by simple checks         │
│ • Failure signal: still detected, app refuses to run        │
├─────────────────────────────────────────────────────────────┤
│ L3: DEFEAT DETECTION                                         │
│ • Identify detection mechanism (→ anti-debugging-techniques) │
│ • Patch detection / Hook detection APIs / Bypass checks     │
│ • Expected: works when detection is identifiable            │
│ • Failure signal: detection too complex / multi-layered     │
├─────────────────────────────────────────────────────────────┤
│ L4: CHANGE APPROACH ENTIRELY                                 │
│ • Dynamic failed? → Switch to emulation (offline, no detect)│
│ • Emulation failed? → Switch to pure static analysis        │
│ • Static unreadable? → Switch to trace-based (Stalker/trace)│
│ • Reload re-router to pick fundamentally different path     │
├─────────────────────────────────────────────────────────────┤
│ L5: REDUCE SCOPE / ACCEPT PARTIAL                           │
│ • Can't get full algorithm? Get partial (some constants)    │
│ • Can't reproduce offline? Capture enough I/O for replay    │
│ • Can't bypass all protection? Target weakest link only     │
│ • Document what's known + what blocks full solution          │
└─────────────────────────────────────────────────────────────┘

3. DIAGNOSTIC CHECKLIST — Before Escalating

Before moving to next level, answer these questions to ensure you're not missing something obvious:

Layer Confusion Check

  • Am I fighting the RIGHT layer? (detection vs obfuscation vs business logic)
  • Did I accidentally bypass a needed initialization by hooking too early?
  • Is my failure at the TOOL level (wrong API usage) rather than the TARGET level?

Environment Check

  • Is the target detecting my environment? (jailbreak/root/emulator/debugger)
  • Am I missing a required setup step? (certificate install, proxy config, env variable)
  • Is there a timing issue? (hook too late, race condition, async initialization)

Information Check

  • Do I have enough static analysis to know WHERE to hook?
  • Am I hooking the right function/address? (verify with xrefs and callers)
  • Is the function I'm targeting actually called in this code path?

Scope Check

  • Is my target correct? (is this the function that actually computes the result?)
  • Am I confusing a wrapper with the real implementation?
  • Could the algorithm be in a different module/dylib/so than expected?

4. COMMON FAILURE PATTERNS (from session analysis)

PatternRoot CauseCorrect Response
"Hook fires but returns nil/empty"Hooked too early (object not initialized) or wrong overloadDelay hook timing; verify object lifecycle
"App crashes immediately after hook"Anti-tamper integrity check detects modificationDefeat integrity check first (L3), or use observation-only approach
"Same 'file not found' / 'skill not found' loop"Referencing non-existent resourceStop trying to load it; use alternative approach or inline knowledge
"Function decompiles to massive switch/CFF"Control Flow FlatteningDon't try to read statically; use trace/emulation to recover paths
"Emulator hangs on init_array"Unsupported instruction or infinite loop in initializerSkip problematic init_array entries; patch or intercept
"Correct hook but wrong return value format"ObjC Block ABI / C++ vtable / complex return structStudy calling convention; hook at a higher level that uses simpler types
"Environment leak detection blocks all approaches"App checks 20+ environment signalsSystematic enumeration: list ALL checks, bypass one by one
"Algorithm output doesn't match expected"Missing state / wrong field values / timing-dependent inputCapture ALL inputs at the exact call site; compare with known-good

5. ESCALATION LOG TEMPLATE

When escalating, document your path to avoid repeating failed approaches:

## Escalation Record
- Target: [what you're trying to achieve]
- Started at: [timestamp/turn]
- Current Level: L[X] → Escalating to L[X+1]

### What was tried at L[X]:
1. [approach 1] → [result/failure]
2. [approach 2] → [result/failure]  
3. [approach 3] → [result/failure]

### Why L[X] is exhausted:
[specific evidence that this level cannot work]

### L[X+1] plan:
[what specifically will be different about the next approach]

6. COMPLEXITY ESTIMATION MATRIX

Use this to set expectations BEFORE starting:

Protection ConfigEstimated EffortSuccess ProbabilityRecommended Path
No protection, clear code1-2 hours95%Direct hook or static analysis
Light obfuscation (string encrypt, name mangle)4-8 hours80%Static + dynamic combined
Anti-debug OR anti-hook (single layer)8-16 hours70%Bypass detection → then analyze
Anti-debug + obfuscation (two layers)1-3 days60%Emulation preferred
CFF + anti-hook + integrity checks2-5 days45%Emulation + selective static
Multi-layer VM + env detection + CFF1-2 weeks30%Emulation-first; accept partial results early
Server-side validation + client protectionVaries50%Focus on capturing I/O; server logic is black-box

Budget Rules:

  • If estimated effort > 3x available time → Immediately go to L5 (reduce scope)
  • If success probability < 40% → Plan for partial results from the start
  • If you're already at 50% of estimated time with no L1/L2 success → Jump to L4

7. META-RULES

  1. Never retry the exact same thing. If you're about to do something you already did, STOP.
  2. Failure is information. Every failed attempt tells you something — extract that information before trying again.
  3. Layer discipline: Solve problems at the correct layer. Detection problems need detection solutions, not more analysis.
  4. Document before escalating: Future you (or the next session) needs to know what was tried.
  5. Partial results are results: 70% of the algorithm + clear documentation of the remaining 30% is better than 0% after exhausting all budget.

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.