-
Notifications
You must be signed in to change notification settings - Fork 0
HTTP Host header attacks
Apprentice lab:
Host header authentication bypass
Apprentice lab:
Host header authentication bypass
This lab makes an assumption about the privilege level of the user based on the HTTP Host header.
To solve the lab, access the admin panel and delete the user carlos
.
-
Solution
- Visit
/admin
endpoint. - Intercept on (using
mitmproxy
) and reload page. - Notice an HTTP/2 Request is made. Add
:authority
Header and set it tolocalhost
. - Do the same for delete poor
carlos
request.
- Visit
IMPORTANT NOTE:
See discussion as on why:authority
pseudo-header is used, instead ofHost
.
Apprentice lab:
Basic password reset poisoning
Apprentice lab:
Basic password reset poisoning
This lab is vulnerable to password reset poisoning. The user carlos
will carelessly click on any links in emails that he receives. To solve the lab, log in to Carlos's account.
You can log in to your own account using the following credentials: wiener:peter
. Any emails sent to this account can be read via the email client on the exploit server.
-
Solution
- Login as
wiener:peter
. - Do what normally would someone do, if password was lost. Study the flow.
- Modify the POST request of
/forgot-password
by adding a:authority: domain
header and changing the username tocarlos
. - Replay (
r
) the request and go to logs. A token is received from a different IP. Copy the token and reset the password forcarlos
. - Login as
carlos
.
- Login as
Practitioner lab:
Routing-based SSRF (Pro)
Practitioner lab:
Routing-based SSRF (Pro)
Practitioner lab:
SSRF via flawed request parsing (Pro)
Practitioner lab:
SSRF via flawed request parsing (Pro)
Solutions for the Portswigger's Web Security Academy using mitmproxy and other cli tools instead of Burp Suite
Server-side topics:
- SQL injection
- Authentication
- File path traversal
- OS command injection
- Business logic vulnerabilities
- Information disclosure
- Access control vulnerabilities
- File upload vulnerabilities
- Race conditions
- Server-side request forgery (SSRF)
- XML external entity (XXE) injection
- NoSQL injection
- API testing
- Web cache deception
Client-side topics:
- Cross-site scripting (XSS)
- Cross-site request forgery (CSRF)
- Cross-origin resource sharing (CORS)
- Clickjacking
- DOM-based vulnerabilities
- WebSockets
Advanced topics: