-
Notifications
You must be signed in to change notification settings - Fork 679
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update for docker support + Added ssl/tls verification flag
- Loading branch information
yagamiL
committed
Mar 24, 2024
1 parent
616b0e5
commit 145c811
Showing
72 changed files
with
70 additions
and
3,831 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
|
@@ -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. | ||
|
@@ -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 | ✓ | ✓ | | ||
|
@@ -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]) | × | × | × | × | × | | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.