Skip to content

Commit

Permalink
Update for docker support + Added ssl/tls verification flag
Browse files Browse the repository at this point in the history
  • Loading branch information
yagamiL committed Mar 24, 2024
1 parent 616b0e5 commit 145c811
Show file tree
Hide file tree
Showing 72 changed files with 70 additions and 3,831 deletions.
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,20 @@ node_modules
# Jython
*.class

# VS-code
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets

# Local History for Visual Studio Code
.history/

# Built Visual Studio Code Extensions
*.vsix

# Vim
# swap
.sw[a-p]
Expand Down
7 changes: 0 additions & 7 deletions .travis.yml

This file was deleted.

16 changes: 16 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python Debugger: Current File with Arguments",
"type": "debugpy",
"request": "launch",
"program": "tplmap.py",
"console": "integratedTerminal",
"args": "-u http://localhost/?name=so -k"
}
]
}
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM python:3.9

WORKDIR /app
COPY . /app

RUN python -m pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
# Running the script when the container launches
ENTRYPOINT ["python", "tplmap.py"]
# Default cmd
CMD ["-h"]

22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
Tplmap
======

> This project is no longer maintained. I'm happy to merge new PRs as long they don't break the [test suite](https://github.com/epinna/tplmap/wiki/Run-the-test-suite).
Tplmap assists the exploitation of Code Injection and Server-Side Template Injection vulnerabilities with a number of sandbox escape techniques to get access to the underlying operating system.

The tool and its test suite are developed to research the SSTI vulnerability class and to be used as offensive security tool during web application penetration tests.
Expand Down Expand Up @@ -98,7 +96,7 @@ Use `--os-shell` option to launch a pseudo-terminal on the target.

```
$ ./tplmap.py --os-shell -u 'http://www.target.com/page?name=John'
[+] Tplmap 0.5
[+] Tplmap 0.3
Automatic Server-Side Template Injection Detection and Exploitation Tool
[+] Run commands on the operating system.
Expand All @@ -110,14 +108,21 @@ root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
bin:x:2:2:bin:/bin:/bin/sh
```
### Using docker
You can use docker instead, if you encounter any issue with the script (mostly caused by python2 dependencies e.g yaml).
```console
$ docker build -t tplmap .
$ docker run --rm tplmap:latest -h
$ docker run --rm tplmap:latest -u 'http://www.target.com/page?name=jhon'
```

Supported template engines
--------------------------

Tplmap supports over 15 template engines, unsandboxed template engines and generic _eval()_-like injections.

| Engine | Remote Command Execution | Blind | Code evaluation | File read | File write |
|------------------------|---------------|-------------------|-----------------|-----------|------------|
| Template engine | Remote Command Execution | Blind | Code evaluation | File read | File write |
|------------------------|-------|-------------------|-----------------|-----------|------------|
| Mako ||| Python |||
| Jinja2 ||| Python |||
| Python (code eval) ||| Python |||
Expand All @@ -134,10 +139,9 @@ Tplmap supports over 15 template engines, unsandboxed template engines and gener
| ERB ||| Ruby |||
| Smarty (unsecured) ||| PHP |||
| PHP (code eval) ||| PHP |||
| Twig (<=1.19) ||| PHP |||
| Freemarker ||| Java |||
| Velocity ||| Java |||
| Twig (>1.19) | × | × | × | × | × |
| Freemarker ||| × |||
| Velocity ||| × |||
| Twig | × | × | × | × | × |
| Smarty (secured) | × | × | × | × | × |
| Dust (> [email protected]) | × | × | × | × | × |

Expand Down
1 change: 0 additions & 1 deletion burp_extension.py

This file was deleted.

53 changes: 0 additions & 53 deletions burp_extension/README.md

This file was deleted.

Empty file removed burp_extension/__init__.py
Empty file.
12 changes: 0 additions & 12 deletions burp_extension/burp_extender.py

This file was deleted.

35 changes: 0 additions & 35 deletions burp_extension/channel.py

This file was deleted.

113 changes: 0 additions & 113 deletions burp_extension/config_tab.py

This file was deleted.

Loading

0 comments on commit 145c811

Please sign in to comment.