Sast Exploit Builder logo

Sast Exploit Builder

Community
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.

Overview

PublisherH-mmer
Repositorypentest-agents
Skill namesast-exploit-builder
Stars
999
Forks
188
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by H-mmer on GitHub. Read the source before you install it.

Installation

Install the Sast Exploit Builder AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/H-mmer/pentest-agents/tree/main/providers/openclaw/.agents/skills/agent-sast-exploit-builder
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

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
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Sast Exploit Builder in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Sast Exploit Builder on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Sast Exploit Builder is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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.

Frequently asked questions

What does the Sast Exploit Builder AI skill do?

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.

Why use Sast Exploit Builder on TypingMind?

Because you install it once and use it with any model. Sast Exploit Builder is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Sast Exploit Builder in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/H-mmer/pentest-agents/tree/main/providers/openclaw/.agents/skills/agent-sast-exploit-builder. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Sast Exploit Builder?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Sast Exploit Builder?

As many as you like. As long as a model supports skills, you can use Sast Exploit Builder with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Sast Exploit Builder AI skill free?

It is published on GitHub by H-mmer. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇