Source profileQuality 91/100Review permissions

brucesongs/kali-claw/skills/reverse-engineering-advanced/SKILL.md

reverse-engineering-advanced

Advanced reverse engineering covering symbolic execution (angr, KLEE, manticore), decompiler confusion (Hex-Rays, Ghidra deobfuscation), binary diffing (BinDiff, Diaphora, Kam1n0), firmware RE workflow (binwalk, FACT, EMBA), and obfuscated code analysis (LLVM obfuscation, OLLVM, Tigress). Distinct from foundational `binary-reverse` — focuses on advanced program analysis, automated RE techniques, and firmware / obfuscation workflows. Use when analyzing obfuscated or packed binaries, automating RE

Source repository stars
67
Declared platforms
0
Static risk flags
2
Last source update
2026-08-19
Source checked
2026-08-28

Decision brief

What it does: where it fits

Advanced reverse engineering covering symbolic execution (angr, KLEE, manticore), decompiler confusion (Hex-Rays, Ghidra deobfuscation), binary diffing (BinDiff, Diaphora, Kam1n0), firmware RE workflow (binwalk, FACT, EMBA), and obfuscated code analysis (LLVM obfuscation, OLLVM, Tigress). Distinct from foundational `binary-reverse` — focuses on advanced pro…

Best for

  • Symbolic execution for key validation: Recover algorithm via SMT solving
  • Binary diffing for patch analysis: Identify CVE patches + 1-day exploitation
  • Firmware RE for routers / IoT: Extract filesystem + analyze embedded services

Not for

  • Tasks that require unconfirmed production actions or broad system permissions.
  • Environments where the pinned source and install steps cannot be inspected.

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/brucesongs/kali-claw --skill "skills/reverse-engineering-advanced"
Safe inspection promptEditorial

Inspect the Agent Skill "reverse-engineering-advanced" from https://github.com/brucesongs/kali-claw/blob/a3205f5484ca8fec9fd809f3c16fe41fbc6ac87e/skills/reverse-engineering-advanced/SKILL.md at commit a3205f5484ca8fec9fd809f3c16fe41fbc6ac87e. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    Phase 1 — Static triage

    bash file binary sha256sum binary strings binary | head -20

    bash file binary sha256sum binary strings binary | head -20
  2. 02

    Phase 2 — Binary diffing

    Review the “Phase 2 — Binary diffing” section in the pinned source before continuing.

    Review and apply the “Phase 2 — Binary diffing” source section.
  3. 03

    Phase 3 — Firmware analysis

    Review the “Phase 3 — Firmware analysis” section in the pinned source before continuing.

    Review and apply the “Phase 3 — Firmware analysis” source section.
  4. 04

    Phase 4 — Symbolic execution

    proj = angr.Project('./binary', autoloadlibs=False) state = proj.factory.entrystate()

    proj = angr.Project('./binary', autoloadlibs=False) state = proj.factory.entrystate()
  5. 05

    Phase 5 — OLLVM deobfuscation

    Review the “Phase 5 — OLLVM deobfuscation” section in the pinned source before continuing.

    Review and apply the “Phase 5 — OLLVM deobfuscation” source section.

Permission review

Static risk signals and limitations

Runs scripts

medium · line 92

The documentation asks the agent to run terminal commands or scripts.

python3 -c "

Network access

medium · line 129

The documentation includes network, browsing, or remote request actions.

git clone https://github.com/fkie-cad/FACT_core

Runs scripts

medium · line 129

The documentation asks the agent to run terminal commands or scripts.

git clone https://github.com/fkie-cad/FACT_core

Network access

medium · line 134

The documentation includes network, browsing, or remote request actions.

git clone https://github.com/e-m-b-a/emba

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score91/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars67SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
brucesongs/kali-claw
Skill path
skills/reverse-engineering-advanced/SKILL.md
Commit
a3205f5484ca8fec9fd809f3c16fe41fbc6ac87e
License
MIT
Collected
2026-08-28
Default branch
main
View the original SKILL.md

Reverse Engineering Advanced

Summary

Advanced reverse engineering is the discipline of analyzing obfuscated, packed, or firmware binaries using automated program analysis: symbolic execution (angr, KLEE, manticore) for path exploration, decompiler confusion techniques (Hex-Rays deobfuscation, Ghidra script automation), binary diffing (BinDiff, Diaphora, Kam1n0) for variant analysis, firmware RE workflow (binwalk, FACT, EMBA) for embedded device analysis, and obfuscated code analysis (LLVM obfuscation, OLLVM, Tigress). This domain covers modern program-analysis techniques that scale beyond manual reverse engineering, with industry-standard tooling workflows. Distinct from foundational binary-reverse (which covers basic radare2 / Ghidra introduction) — this skill focuses on advanced program analysis, automated RE pipelines, and firmware / obfuscation workflows.

Key Terms

  • Symbolic execution — Program analysis technique that explores all paths via symbolic variables
  • SMT solver — Satisfiability Modulo Theories solver (Z3) used by symbolic execution
  • Concolic execution — Concrete + symbolic execution (manticore, angr)
  • Decompiler confusion — Code patterns that confuse Hex-Rays / Ghidra decompilers
  • Binary diffing — Comparing two binaries to identify changes (BinDiff, Diaphora)
  • Control Flow Flattening (CFF) — OLLVM obfuscation that flattens control flow
  • Bogus Control Flow (BCF) — OLLVM obfuscation that adds fake branches
  • Instruction Substitution (SUB) — OLLVM obfuscation that replaces operations
  • Firmware RE — Reverse engineering embedded device firmware (routers, IoT, OT)
  • Unpacker — Tool that recovers original code from packed binary
  • CFG — Control Flow Graph
  • AST — Abstract Syntax Tree
  • IR — Intermediate Representation (used by angr, Ghidra)
  • VEX IR — angr's intermediate representation
  • P-code — Ghidra's intermediate representation

Scope

This skill covers advanced reverse engineering:

  • Symbolic execution (angr / KLEE / manticore) for path exploration + key recovery
  • Binary diffing (BinDiff / Diaphora / Kam1n0) for variant analysis
  • Firmware RE workflow (binwalk / FACT / EMBA)
  • Obfuscated code analysis (LLVM / OLLVM / Tigress)
  • Decompiler confusion + deobfuscation
  • APT-grade analysis (Equation Group, Pegasus)

Out of scope: foundational RE (see binary-reverse), malware analysis workflow (see malware-analysis-advanced), exploit development (see exploit-development).

Use Cases

  • Symbolic execution for key validation: Recover algorithm via SMT solving
  • Binary diffing for patch analysis: Identify CVE patches + 1-day exploitation
  • Firmware RE for routers / IoT: Extract filesystem + analyze embedded services
  • OLLVM deobfuscation: Defeat Control Flow Flattening + Bogus Control Flow
  • Decompiler-resistant code analysis: Manual disassembly when decompiler fails
  • Variant analysis: Identify family of malware / binaries via diffing
  • SMT-assisted key recovery: Recover cryptographic keys via Z3
  • Automated RE pipeline: Build CI/CD for binary analysis
  • Equation Group / Pegasus analysis: APT-grade obfuscation research
  • Embedded device security: Audit router / IoT / OT firmware

Core Tools

ToolPurpose
angrPython symbolic execution framework
KLEELLVM-based symbolic execution
manticoreSymbolic execution (Trail of Bits)
GhidraNSA open-source RE tool
IDA ProIndustry-standard disassembler + decompiler
Binary NinjaModern disassembler with rich API
radare2Open-source disassembler
binwalkFirmware analysis tool
BinDiffBinary diffing (Google/Zynamics)
DiaphoraFree BinDiff alternative (IDA plugin)
Kam1n0Binary similarity (assembly)
FACTFirmware Analysis Compare Tool
EMBAEmbedded firmware analyzer
ollvm-toolsOLLVM deobfuscation tools
deflatControl Flow Flattening deobfuscation
snowman-decompilerOpen-source decompiler
retdecAvast open-source decompiler
imhexModern hex editor
pe-treeVisual PE analysis
ida-deobfuscatorIDA plugin for deobfuscation

Methodology

Phase 1 — Static triage

file binary
sha256sum binary
strings binary | head -20

# Architecture
file binary

# Imported functions
nm -D binary 2>/dev/null | head
readelf -d binary 2>/dev/null | head

# Section entropy (packed indicator)
python3 -c "
import sys
with open('binary', 'rb') as f:
    data = f.read()
import math
entropy = -sum((data.count(b)/len(data)) * math.log2(data.count(b)/len(data)) for b in set(data))
print(f'Entropy: {entropy:.2f}')
"

Phase 2 — Binary diffing

# BinDiff (Google)
bindiff --binary1=v1.exe --binary2=v2.exe --output_dir=diffs/

# Diaphora (IDA plugin)
# 1. Open v1.exe in IDA → Export with Diaphora
# 2. Open v2.exe in IDA → Diff with Diaphora

# Patch diff (CVE analysis)
# 1. Get pre-patch binary
# 2. Get post-patch binary
# 3. BinDiff / Diaphora to identify changed functions
# 4. Analyze changed function for CVE

Phase 3 — Firmware analysis

# Binwalk - scan for signatures
binwalk firmware.bin

# Extract filesystem
binwalk -e firmware.bin

# FACT (Firmware Analysis Compare Tool)
git clone https://github.com/fkie-cad/FACT_core
cd FACT_core
./install

# EMBA (firmware analyzer)
git clone https://github.com/e-m-b-a/emba
cd emba
./emba -l /logs -f firmware.bin

Phase 4 — Symbolic execution

import angr

proj = angr.Project('./binary', auto_load_libs=False)
state = proj.factory.entry_state()

# Find address that prints "Good boy"
good_addr = 0x400a00
# Avoid address that prints "Bad boy"
bad_addr = 0x400a50

sm = proj.factory.simulation_manager(state)
sm.explore(find=good_addr, avoid=bad_addr)

if sm.found:
    found_state = sm.found[0]
    print(f"Solution: {found_state.posix.dumps(0)}")

Phase 5 — OLLVM deobfuscation

# Control Flow Flattening (CFF) - deflat
# Requires identification of dispatcher + state variable
python3 deflat.py --binary flattened.exe --dispatcher 0x401000 --state-var eax

# Bogus Control Flow (BCF) - identify opaque predicates
# Use semantic analysis to identify always-true/always-false branches

# Instruction Substitution (SUB) - use MVP / miasm for simplification

Phase 6 — Decompiler confusion identification

# IDA Python: identify anti-decompiler patterns
import idautils, idc

for func_ea in idautils.Functions():
    name = idc.get_func_name(func_ea)
    # Look for anti-decompiler patterns:
    # - Stack manipulation tricks
    # - Self-modifying code
    # - Anti-disassembly patterns (JE+0 / JNE-1)
    # - Overlapping instructions
    pass

Phase 7 — SMT-assisted key recovery

import angr
from z3 import *

# Sym execute key check
proj = angr.Project('./binary', auto_load_libs=False)

# Set up initial state with symbolic input
state = proj.factory.entry_state(
    stdin=angr.SimFileStream(name='stdin', content=angr.BVS('input', 32*8), size=32)
)

# Find / avoid
sm = proj.factory.simulation_manager(state)
sm.explore(find=0x400a00, avoid=0x400a50)

# Recover solution
print(sm.found[0].posix.dumps(0))

Phase 8 — Variant analysis

# Kam1n0 - assembly-level similarity
kam1n0 cluster -i samples/ -o clusters.json

# BinDiff - cross-binary
bindiff --binary1=sample1 --binary2=sample2 --output_dir=diff

# Diaphora - many-to-many diff
# Export all samples → database
# Diff against each other → cluster

Phase 9 — Automated RE pipeline

# CI/CD for binary analysis
import angr, ghidra

def analyze_binary(binary_path):
    # 1. Static triage
    file_info = file_binary(binary_path)

    # 2. Symbolic execution
    proj = angr.Project(binary_path)
    sm = proj.factory.simulation_manager(proj.factory.entry_state())
    sm.explore(find=0x400a00)
    if sm.found:
        solution = sm.found[0].posix.dumps(0)
        return {'status': 'solved', 'solution': solution}

    # 3. Ghidra decompilation
    result = ghidra.decompile(binary_path)

    return {'status': 'analyzed', 'result': result}

Phase 10 — Reporting

Produce RE report:

  • Binary details
  • Architecture + format
  • Static analysis
  • Dynamic analysis (if performed)
  • Symbolic execution results
  • Decompile output
  • Vulnerabilities / capabilities
  • TTP mapping (if malware)

Practical Steps

Step 1 — Triage

file binary
sha256sum binary
strings binary | head
python3 -c "
import pefile
pe = pefile.PE('binary.exe')
for s in pe.sections:
    print(s.Name.decode().rstrip(chr(0)), s.get_entropy())
"

Step 2 — Symbolic execution with angr

import angr

proj = angr.Project('./crackme', auto_load_libs=False)
state = proj.factory.entry_state()

# Find / avoid
sm = proj.factory.simulation_manager(state)
sm.explore(find=lambda s: b'Good boy' in s.posix.dumps(1),
          avoid=lambda s: b'Bad boy' in s.posix.dumps(1))

if sm.found:
    found = sm.found[0]
    print(f"Password: {found.posix.dumps(0)}")

Step 3 — BinDiff for variant analysis

bindiff --binary1=original --binary2=patched --output_dir=diffs

# Analyze results
cd diffs
ls
# original_patched.Diff → open in BinDiff UI

Step 4 — Binwalk for firmware

binwalk firmware.bin
binwalk -e firmware.bin

ls _firmware.bin.extracted/
# Find filesystem (squashfs, jffs2, etc.)

Step 5 — OLLVM deflattening

# Identify dispatcher function
# Look for big switch statement on state variable

# Use deflat.py (https://github.com/cd70s062f/deflat)
python3 deflat.py --binary flattened.exe --dispatcher 0x401000

Step 6 — SMT key recovery

import z3

# Encode key check
s = z3.Solver()

# Input: 16-byte key
key = [z3.BitVec(f'key_{i}', 8) for i in range(16)]

# Constraints
for i in range(16):
    s.add(key[i] >= 0x20)
    s.add(key[i] <= 0x7e)

# Key check (derived from disassembly)
s.add(key[0] + key[1] == 0x90)
s.add(key[2] * key[3] == 0x41A8)
# ...

if s.check() == z3.sat:
    m = s.model()
    print(bytes(m[k].as_long() for k in key))

Step 7 — Ghidra decompile

analyzeHeadless /tmp ghidra_proj -import binary
# Then open GUI
ghidraRun

Step 8 — Build automated RE pipeline

# Full pipeline: file → static → symbolic → decompile → report
def full_analysis(binary_path):
    # Static triage
    info = triage(binary_path)

    # Symbolic execution (if applicable)
    if info['has_constraint_check']:
        result = symbolic_solve(binary_path)

    # Decompile
    decompiled = decompile(binary_path)

    # Generate report
    return generate_report(info, result, decompiled)

Defense Perspective

Defenders must assume:

  1. Symbolic execution defeats custom checks — angr + Z3 can solve most constraints
  2. BinDiff identifies patches quickly — 1-day exploitation easier
  3. Firmware RE exposes vulnerabilities — embedded devices poorly protected
  4. OLLVM is defeatable — deflat + semantic analysis
  5. Decompilers have blind spots — manual disassembly still needed
  6. APT-grade obfuscation (Equation, Pegasus) is hard but possible
  7. Variant analysis scales RE — BinDiff clusters malware families
  8. SMT solvers can recover keys — custom crypto can be defeated

Key defensive controls:

  • Anti-debug + anti-VM in binaries
  • Code obfuscation (OL VMM, Tigress)
  • Stripped binaries (no symbols)
  • Dynamic anti-tampering (self-modifying code)
  • Encryption + packing
  • Anti-symbolic execution (state explosion)

Symbolic Execution Cheat Sheet

ToolBest forLimitations
angrCTF, crackmes, key recoveryPath explosion on complex binaries
KLEELinux / LLVM binariesLimited Windows support
manticoreSmart contracts, lightweight binariesSlower than angr

Binary Diffing Cheat Sheet

ToolAlgorithmCost
BinDiffGraph isomorphismCommercial (Zynamics)
DiaphoraMultiple algorithmsFree (IDA plugin)
Kam1n0Assembly clusteringFree (academic)
patchkitFunction similarityFree

Firmware RE Cheat Sheet

ToolPurpose
binwalkInitial scan + extraction
FACTFull firmware analysis
EMBAAutomated vulnerability scan
firmware-mod-kitFilesystem repack
firmware-sltpTool suite

OLLVM Obfuscation Types

TypeDescriptionDetection
CFF (Control Flow Flattening)Big switch dispatcherVisual CFG
BCF (Bogus Control Flow)Fake branchesOpaque predicates
SUB (Instruction Substitution)Replace operationsPattern matching
CMP (Constant Masking)Hide constantsConstant analysis

Engagement Workflow

  1. Triage — file type, format, entropy
  2. Static analysis — strings, imports, sections
  3. Symbolic execution (if applicable) — angr / KLEE
  4. Binary diffing (if variant) — BinDiff / Diaphora
  5. Firmware analysis (if firmware) — binwalk / FACT / EMBA
  6. Deobfuscation (if obfuscated) — deflat / BCF removal
  7. Decompilation — IDA / Ghidra / Binary Ninja
  8. Reporting — findings + recommendations

Lab Setup

# angr
pip install angr

# Ghidra
wget https://github.com/NationalSecurityAgency/ghidra/releases/download/Ghidra_11.0_build/ghidra_11.0_PUBLIC_20231222.zip
unzip ghidra_11.0_PUBLIC_20231222.zip

# BinDiff
# Download from https://www.zynamics.com/bindiff.html

# Diaphora (IDA plugin)
git clone https://github.com/joxeankoret/diaphora

# binwalk
pip install binwalk

# FACT
git clone https://github.com/fkie-cad/FACT_core
cd FACT_core && ./install

# EMBA
git clone https://github.com/e-m-b-a/emba
cd emba && ./installer.sh

Quality Checklist

  • File hash + type identified
  • Architecture + format analyzed
  • Static analysis complete
  • Symbolic execution attempted (if applicable)
  • Binary diffing performed (if variant)
  • Firmware extraction (if firmware)
  • Deobfuscation applied (if obfuscated)
  • Decompile output saved
  • Findings documented
  • Final report delivered

Detection Methods

RE Tool Detection

  • Process enumeration: gdb, radare2, ghidra, ida, frida-server running on production.
  • Network anomalies: Frida default port (27042); Ghidra debug bridge (18001); IDA sync ports.
  • Filesystem artifacts: /tmp/.ghidra, ~/.radare2_history, ~/.gdb_history containing sensitive commands.

Binary Analysis Detection

  • Hardcoded secrets: Strings analysis revealing API keys, JWT tokens, certs.
  • Dangerous function imports: strcpy, system, popen flagged via checksec.
  • Missing protections: Binaries without RELRO/Canary/NX/PIE.

SIEM Detection Rules

  • Splunk SPL: index=linux sourcetype=auditd type=EXECVE | search a0 IN ("/usr/bin/gdb","/usr/bin/r2")
  • Sysmon Event ID 1: Alert on gdb.exe, ida.exe, x64dbg.exe on production endpoints.
  • YARA: Scan filesystem for known RE tool signatures.

Defense Evasion Techniques

Anti-Debugging

  • ptrace self-attach: Process attaches to itself via ptrace(PTRACE_TRACEME); prevents gdb.
  • Timing checks: Measure time between rdtsc instructions; debugger introduces delay.
  • INT 3 detection: Scan own code for 0xCC byte (breakpoint instruction).
  • Hardware breakpoint detection: Check debug registers (DR0-DR7) via /proc/self/status.

Anti-VM / Anti-Sandbox

  • MAC address check: VMware (00:50:56), VirtualBox (08:00:27), Hyper-V (00:15:5D).
  • CPU vendor check: cpuid instruction reveals hypervisor bit.
  • Filesystem artifacts: /proc/vz (OpenVZ), /proc/xen (Xen), /sys/class/dmi/id/product_name.

Code Obfuscation

  • Packing: UPX, ASPack, Themida, VMProtect.
  • Polymorphic code: Decryptor changes; payload signature constant.
  • Metamorphic code: Body rewritten each generation.
  • Control flow flattening: Switch dispatcher; defeats static analysis.
  • Junk code insertion: No-op instructions between real instructions.

References

Frequently asked questions

What to verify before installation and use

What does the reverse-engineering-advanced source document cover?

Advanced reverse engineering covering symbolic execution (angr, KLEE, manticore), decompiler confusion (Hex-Rays, Ghidra deobfuscation), binary diffing (BinDiff, Diaphora, Kam1n0), firmware RE workflow (binwalk, FACT, EMBA), and obfuscated code analysis (LLVM obfuscation, OLLVM, Tigress). Distinct from foundational `binary-reverse` — focuses on advanced pro…

How do I install reverse-engineering-advanced?

The source record exposes this install command: npx skills add https://github.com/brucesongs/kali-claw --skill "skills/reverse-engineering-advanced". Inspect the command and pinned source before running it.

Which permission-related actions were detected?

Static rules flagged exec-script, network in the source; the page lists the matching lines and excerpts.

Alternatives

Compare before choosing

Computed 9836,049

K-Dense-AI/scientific-agent-skills

dask

Distributed computing for larger-than-RAM pandas/NumPy workflows. Use when you need to scale existing pandas/NumPy code beyond memory or across clusters. Best for parallel file processing, distributed ML, integration with existing pandas code. For out-of-core analytics on single machine use vaex; for in-memory speed use polars.

Computed 9836,049

K-Dense-AI/scientific-agent-skills

neurokit2

Use NeuroKit2 to build or audit reproducible research workflows for physiological time-series preprocessing, event/interval analysis, multimodal alignment, variability, and complexity. Trigger when code imports neurokit2 or needs its current APIs, schemas, and method-aware validation—not for diagnosis or device validation.

Computed 966,897

trailofbits/skills

vector-forge

Mutation-driven test vector generation. Finds implementations of a cryptographic algorithm or protocol, runs mutation testing to identify escaped mutants, then generates new test vectors that deliberately exercise the uncovered code paths. Compares before/after mutation kill rates to prove vector effectiveness. Use when generating cryptographic test vectors, measuring Wycheproof coverage gaps, finding escaped mutants via mutation testing, creating cross-implementation test suites, or improving t

Computed 9695

travisjneuman/.claude

test-specialist

This skill should be used when writing test cases, fixing bugs, analyzing code for potential issues, or improving test coverage for JavaScript/TypeScript applications. Use this for unit tests, integration tests, end-to-end tests, debugging runtime errors, logic bugs, performance issues, security vulnerabilities, and systematic code analysis.