hypnguyen1209/offensive-claude / skills/reverse-engineering
reverse-engineering
VerifiedUse when reverse-engineering a binary or firmware — static triage + decompilation (Ghidra/IDA/Binary Ninja), dynamic instrumentation (GDB/Frida 17/angr), anti-reversing & packer bypass, OLLVM/VM deobfuscation, UEFI/BIOS RE & Secure Boot research, patch-diffing for n-days
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 11.4 KB |
| references/anti-reversing-bypass.md | markdown | 7.7 KB |
| references/coverage-reachability.md | markdown | 3.2 KB |
| references/deobfuscation.md | markdown | 8.6 KB |
| references/dynamic-instrumentation.md | markdown | 7.9 KB |
| references/firmware-uefi.md | markdown | 8.6 KB |
| references/patch-diffing-protocol.md | markdown | 8.4 KB |
| references/rr-time-travel.md | markdown | 3.1 KB |
| references/static-triage-decompilation.md | markdown | 8.2 KB |
| scripts/antidebug_unhook.py | script | 5.9 KB |
| scripts/cve_diff.py | script | 9.6 KB |
| scripts/deflatten_triton.py | script | 5.9 KB |
| scripts/frida_universal.js | script | 8.3 KB |
| scripts/ghidra/DecompileToC.java | other | 1.8 KB |
| scripts/patchdiff_fetch.py | script | 5.3 KB |
| scripts/proto_infer.py | script | 7.1 KB |
| scripts/rr_root_cause.sh | script | 3.3 KB |
| scripts/string_decrypt_emu.py | script | 6.0 KB |
| scripts/triage.py | script | 9.2 KB |
| scripts/uefi_triage.py | script | 6.2 KB |
scripts/ghidra/DecompileToC.java
View on GitHub// DecompileToC.java - Ghidra headless postScript: decompile every function to <program>.c
//
// Usage (driven by triage.py --decompile, or standalone):
// $GHIDRA_HOME/support/analyzeHeadless /tmp/proj triage -import ./sample -overwrite \
// -postScript DecompileToC.java -scriptPath /path/to/scripts/ghidra
//
// Tested against Ghidra 11.3 / 11.4.x. Writes one C file next to the project working dir.
// No external dependencies beyond the Ghidra runtime.
import ghidra.app.script.GhidraScript;
import ghidra.app.decompiler.DecompInterface;
import ghidra.app.decompiler.DecompileResults;
import ghidra.program.model.listing.Function;
import java.io.FileWriter;
import java.io.PrintWriter;
public class DecompileToC extends GhidraScript {
@Override
public void run() throws Exception {
DecompInterface dec = new DecompInterface();
if (!dec.openProgram(currentProgram)) {
printerr("Failed to open program in decompiler");
return;
}
String outName = currentProgram.getName() + ".c";
PrintWriter w = new PrintWriter(new FileWriter(outName));
int ok = 0, fail = 0;
for (Function f : currentProgram.getFunctionManager().getFunctions(true)) {
if (monitor.isCancelled()) break;
DecompileResults r = dec.decompileFunction(f, 60, monitor);
if (r != null && r.decompileCompleted()) {
w.println("// === " + f.getName() + " @ " + f.getEntryPoint() + " ===");
w.println(r.getDecompiledFunction().getC());
ok++;
} else {
fail++;
}
}
w.close();
dec.dispose();
println("[DecompileToC] wrote " + outName + " (ok=" + ok + " fail=" + fail + ")");
}
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| add-product-e2e-evalpaperclipai/paperclipAdd or extend a Paperclip full-stack runner E2E workflow, fixture, matcher, or report evidence path for local or Daytona execution. | Stars: 115k | Updated | Claude CodeCodex | Verified | Install |
| add-runner-evalpaperclipai/paperclipAdd or extend a Paperclip Runner protocol evaluation definition, roster, assertion, or report fixture with provenance and narrow validation. | Stars: 115k | Updated | Claude CodeCodex | Verified | Install |
| diagnose-why-work-stoppedpaperclipai/paperclipCompatibility entry point for failed, stalled, looping, or over-recovered Paperclip work. Use fix-failed-paperclip-run for the full diagnosis, regression, repair, real verification, and green-PR workflow; honor an explicitly requested diagnosis-only scope. | Stars: 115k | Updated | Claude CodeCodex | Verified | Install |
| fix-failed-paperclip-runpaperclipai/paperclipDiagnose and fix failed, stuck, slow, or incorrectly blocked Paperclip tasks and runs. Use with a task/run URL or failure report to trace the root cause, prove a regression red then green, check second-order effects, verify the real workflow, and deliver a PR with passing checks. | Stars: 115k | Updated | Claude CodeCodex | Verified | Install |