Logo: Sast Exploit Builder

Sast Exploit Builder

Communautéit
H-mmer
sast-exploit-builder

Builds working exploits from confirmed SAST findings. Takes a confirmed crash, develops it into a full exploit. Tier 1 (DoS) → Tier 5 (code execution). Use via /sast command after PoC confirmation.

Iwwersiicht

EditeurH-mmer
Repositorypentest-agents
Skill-Nummsast-exploit-builder
Stären
999
Forks
188
Matgeliwwert Dateien
Nëmmen Instruktiounen
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    H-mmer huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Sast Exploit Builder an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/H-mmer/pentest-agents/tree/main/providers/openclaw/.agents/skills/agent-sast-exploit-builder
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/H-mmer/pentest-agents.git /tmp/pentest-agents
mkdir -p .claude/skills
cp -r /tmp/pentest-agents/providers/openclaw/.agents/skills/agent-sast-exploit-builder .claude/skills/sast-exploit-builder
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Sast Exploit Builder an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Sast Exploit Builder automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Sast Exploit Builder net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

CONTEXT: Authorized security research. Developing exploits for confirmed vulnerabilities in isolated environment.

Research First

Call search_techniques and search_writeups for the exploitation technique before starting.

Exploitation Ladder (native code: C/C++/Rust/Go)

Work up. Stop and report at highest level achieved.

Tier 1 — Controlled crash (DoS). You already have this from the hunter. Tier 2 — Controlled write primitive. Attacker-chosen bytes to attacker-chosen location. Tier 3 — Info leak / ASLR bypass. Read memory contents, defeat randomization. Tier 4 — Control flow hijack. Overwrite return address, function pointer, vtable, GOT entry. Tier 5 — Code execution. ROP chain, shellcode, JIT spray. Demonstrate with shell/file write.

Exploitation Ladder (PHP / web app)

For PHP findings, work up this ladder instead. Stop and report the highest tier confirmed.

Tier 1 — Information disclosure. Stack trace, phpinfo() page, .env read via LFI, source disclosure via php://filter/convert.base64-encode/resource=, debug endpoint leaking creds/keys. Concrete evidence: grep the response for secrets.

Tier 2 — Arbitrary read / authenticated data exfiltration. LFI reading any file under open_basedir; blind/error/time/UNION SQLi dumping information_schema, user tables, password hashes; IDOR reading other users' resources via predictable IDs. Demonstrate by pulling at least one sensitive record (hashed password, PII, API key).

Tier 3 — Arbitrary write / mass data modification. SQLi with UPDATE/INSERT ability, file write via upload bypass, file_put_contents with traversal, Eloquent mass-assignment escalating a regular user to admin. Demonstrate by modifying a state you shouldn't be able to.

Tier 4 — Remote Code Execution. At least ONE of:

  • eval/assert/create_function/preg_replace /e with user input
  • include/require on user path → combine with log/session/phar poisoning to land PHP
  • unserialize with a working gadget chain (hand-crafted or via phpggc)
  • Command injection through system/exec/passthru/shell_exec with insufficient escaping
  • SSTI in Twig/Smarty/Blade raw
  • File upload bypass landing a .php (or .phar, .phtml, .pht depending on server config) in a served directory

Evidence: execute id, get output. Save response showing uid=....

Tier 5 — Persistent webshell + lateral movement. Upload webshell, confirm it survives (path is accessible), demonstrate DB read and filesystem read from within the shell. Document what's reachable: other vhosts, cloud metadata (169.254.169.254), internal services, persisted credentials in .env/config files.

Approach Per Primitive (native)

Stack overflow: Find offset to return address. Check canary. Check ASLR/PIE. Build ROP chain. Heap overflow/UAF: Understand allocator. Map heap layout. Heap feng shui for predictable placement. Integer overflow: What does overflowed value control? Craft input for useful result. Format string: Leak stack → arbitrary read → arbitrary write via %n → GOT overwrite.

Approach Per Primitive (PHP)

SQLi: Identify DB (MySQL/Postgres/SQLite/MSSQL from error messages or fingerprint). Work in order: error-based → UNION → boolean blind → time blind. For dumping: sqlmap against the confirmed injection point as verifier — but the PoC should be a standalone request. Extract at least one row from an internal/admin table to prove severity.

Unrestricted upload → RCE: Bypass approaches by server:

  • Apache + mod_php: .php, .php3, .php4, .php5, .php7, .phtml, .pht, .phar
  • nginx + PHP-FPM with poorly-configured location regex: shell.jpg.php, shell.php%00.jpg, shell.php/
  • Content-Type spoofing (Content-Type: image/jpeg with PHP content)
  • Magic-byte polyglots (GIF89a header + <?php ... ?>)
  • Phar upload + trigger via phar://uploads/x.jpg in any file op elsewhere
  • .htaccess upload if directory allows to add PHP handler

LFI → RCE (from Tier 2 → Tier 4):

  • /proc/self/environ with User-Agent: <?=system($_GET['c']);?> (old PHP)
  • Apache access log + malicious UA (path: /var/log/apache2/access.log)
  • PHP session file (path: /var/lib/php/sessions/sess_<PHPSESSID>) — write PHP via a reflecting endpoint, include session
  • php://filter/convert.base64-decode/resource=data://text/plain,<base64> — direct exec
  • expect:// wrapper if expect ext loaded (rare)
  • phar:// on an attacker-uploaded polyglot

Unserialize → RCE: Inventory classes via composer.json and vendor/. Try phpggc with the detected framework (Laravel, Symfony, Drupal, Magento, WordPress, Guzzle, Monolog). If no off-the-shelf gadget, grep project for __wakeup/__destruct/__toString and hand-craft. Gadget should land in a write/exec primitive (file_put_contents, system, exec, eval).

SSTI (Twig): {{ 7*7 }} → {{ _self.env.registerUndefinedFilterCallback("exec") }}{{ _self.env.getFilter("id") }}. SSTI (Smarty): {php} system('id'); {/php} (v2) or {system('id')} (v3 unsafe mode).

Type juggling auth bypass: craft input so == compares two values that both parse to 0e... or NULL or equivalent. Test with short examples first: hash('md5', 'QNKCDZO') == hash('md5', '240610708') both 0e... truthy.

Mass-assignment privesc: identify Eloquent model, send extra field like role=admin/is_admin=1/plan_id=<enterprise> in the update request.

Mitigation Checklist (PHP)

MitigationCheck commandBypass
disable_functionsphp -i | grep disable_functionsLD_PRELOAD (if exec possible elsewhere), PHP 7 mail() bypass, FFI, imap_open on old php
open_basedirphp -i | grep open_basedirsymlink tricks, glob:// bypass, chdir + ini_set (old)
display_errors=Offphp -i | grep display_errorslog-based exfil via error_log reachability
allow_url_includephp -i | grep allow_url_includeforces LFI-only; chain with log/phar/data poisoning
expose_phpphp -i | grep expose_phpdoesn't affect exploit, only fingerprinting
PHP versionphp -vmany CVEs fixed — verify version for each finding
Framework CSRFcheck middlewaretoken leak via XSS, missing on JSON endpoints
Framework authcheck middlewaremissing on admin-ajax.php/api/* routes, signed-URL tricks

Mitigation Checklist (native)

MitigationCheck commandBypass
Stack canaryobjdump -d <bin> | grep stack_chkInfo leak, fork brute force
ASLRcat /proc/sys/kernel/randomize_va_spaceInfo leak, partial overwrite
PIEreadelf -h <bin> | grep DYNInfo leak for code base
NXreadelf -l <bin> | grep GNU_STACKROP, ret2libc
RELROreadelf -l <bin> | grep RELROPartial: GOT. Full: target elsewhere

Output

Write to poc/sast/exploits/. Include exploit_<name>.py and README.md.

json
{
  "finding_ref": "<candidate_id>",
  "exploit_tier": 5,
  "exploit_file": "poc/sast/exploits/exploit_<name>.py",
  "mitigations_bypassed": ["ASLR (leaked via info disclosure)", "NX (ROP chain)"],
  "mitigations_not_bypassed": [],
  "impact": "Unauthenticated remote attacker achieves root shell",
  "reliability": "100% on target version",
  "constraints": ["Requires NFS service running"]
}

Rules

  • Persist everything to disk. Time box 30 min per tier. Report honestly — don't claim tiers you haven't proven.

Brain Integration

Record tier achieved and techniques that worked/failed.

Top-Tier Operator Standard

Exploit development climbs only on proven ground.

  • Start from the confirmed PoC and preserve a minimal regression case before adding complexity.
  • Advance tiers one capability at a time: crash, controlled read/write, control-flow influence, sandbox escape, code execution.
  • Record mitigations honestly: ASLR, DEP/NX, canaries, CFI, sandboxing, auth, config, and version constraints.
  • Prefer deterministic local proof over speculative remote exploit claims.
  • Stop at the highest tier you can demonstrate safely within budget and document the next blocked primitive.

Heefeg gestallte Froen

Wat mécht de KI-Skill Sast Exploit Builder?

Builds working exploits from confirmed SAST findings. Takes a confirmed crash, develops it into a full exploit. Tier 1 (DoS) → Tier 5 (code execution). Use via /sast command after PoC confirmation.

Firwat Sast Exploit Builder op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Sast Exploit Builder besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Sast Exploit Builder an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/H-mmer/pentest-agents/tree/main/providers/openclaw/.agents/skills/agent-sast-exploit-builder an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Sast Exploit Builder benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Sast Exploit Builder benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Sast Exploit Builder domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Sast Exploit Builder gratis?

H-mmer huet de Skill op GitHub publizéiert. Kuckt am Repository no de Lizenzbedéngungen. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇