Skip to content

Commit 145c811

Browse files
author
yagamiL
committed
Update for docker support + Added ssl/tls verification flag
1 parent 616b0e5 commit 145c811

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+70
-3831
lines changed

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,20 @@ node_modules
5050
# Jython
5151
*.class
5252

53+
# VS-code
54+
.vscode/*
55+
!.vscode/settings.json
56+
!.vscode/tasks.json
57+
!.vscode/launch.json
58+
!.vscode/extensions.json
59+
!.vscode/*.code-snippets
60+
61+
# Local History for Visual Studio Code
62+
.history/
63+
64+
# Built Visual Studio Code Extensions
65+
*.vsix
66+
5367
# Vim
5468
# swap
5569
.sw[a-p]

.travis.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

.vscode/launch.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Python Debugger: Current File with Arguments",
9+
"type": "debugpy",
10+
"request": "launch",
11+
"program": "tplmap.py",
12+
"console": "integratedTerminal",
13+
"args": "-u http://localhost/?name=so -k"
14+
}
15+
]
16+
}

Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM python:3.9
2+
3+
WORKDIR /app
4+
COPY . /app
5+
6+
RUN python -m pip install --upgrade pip
7+
RUN pip install --no-cache-dir -r requirements.txt
8+
# Running the script when the container launches
9+
ENTRYPOINT ["python", "tplmap.py"]
10+
# Default cmd
11+
CMD ["-h"]
12+

README.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
Tplmap
22
======
33

4-
> 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).
5-
64
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.
75

86
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.
@@ -98,7 +96,7 @@ Use `--os-shell` option to launch a pseudo-terminal on the target.
9896

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

114119
Supported template engines
115120
--------------------------
116121

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

119-
| Engine | Remote Command Execution | Blind | Code evaluation | File read | File write |
120-
|------------------------|---------------|-------------------|-----------------|-----------|------------|
124+
| Template engine | Remote Command Execution | Blind | Code evaluation | File read | File write |
125+
|------------------------|-------|-------------------|-----------------|-----------|------------|
121126
| Mako ||| Python |||
122127
| Jinja2 ||| Python |||
123128
| Python (code eval) ||| Python |||
@@ -134,10 +139,9 @@ Tplmap supports over 15 template engines, unsandboxed template engines and gener
134139
| ERB ||| Ruby |||
135140
| Smarty (unsecured) ||| PHP |||
136141
| PHP (code eval) ||| PHP |||
137-
| Twig (<=1.19) ||| PHP |||
138-
| Freemarker ||| Java |||
139-
| Velocity ||| Java |||
140-
| Twig (>1.19) | × | × | × | × | × |
142+
| Freemarker ||| × |||
143+
| Velocity ||| × |||
144+
| Twig | × | × | × | × | × |
141145
| Smarty (secured) | × | × | × | × | × |
142146
| Dust (> [email protected]) | × | × | × | × | × |
143147

burp_extension.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

burp_extension/README.md

Lines changed: 0 additions & 53 deletions
This file was deleted.

burp_extension/__init__.py

Whitespace-only changes.

burp_extension/burp_extender.py

Lines changed: 0 additions & 12 deletions
This file was deleted.

burp_extension/channel.py

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)