6.7 KiB
Account Takeover
Learn AWS hacking from zero to hero with htARTE (HackTricks AWS Red Team Expert)!
Other ways to support HackTricks:
- If you want to see your company advertised in HackTricks or download HackTricks in PDF Check the SUBSCRIPTION PLANS!
- Get the official PEASS & HackTricks swag
- Discover The PEASS Family, our collection of exclusive NFTs
- Join the 💬 Discord group or the telegram group or follow us on Twitter 🐦 @carlospolopm.
- Share your hacking tricks by submitting PRs to the HackTricks and HackTricks Cloud github repos.
Authorization Issue
The email of an account should be attempted to be changed, and the confirmation process must be examined. If found to be weak, the email should be changed to that of the intended victim and then confirmed.
Unicode Normalization Issue
- The account of the intended victim
victim@gmail.com
- An account should be created using Unicode
for example:vićtim@gmail.com
For further details, refer to the document on Unicode Normalization:
Reusing Reset Token
Should the target system allow the reset link to be reused, efforts should be made to find more reset links using tools such as gau
, wayback
, or scan.io
.
Pre Account Takeover
- The victim's email should be used to sign up on the platform, and a password should be set (an attempt to confirm it should be made, although lacking access to the victim's emails might render this impossible).
- One should wait until the victim signs up using OAuth and confirms the account.
- It is hoped that the regular signup will be confirmed, allowing access to the victim's account.
CORS Misconfiguration to Account Takeover
If the page contains CORS missconfigurations you might be able to steal sensitive information from the user to takeover his account or make him change auth information for the same purpose:
{% content-ref url="cors-bypass.md" %} cors-bypass.md {% endcontent-ref %}
Csrf to Account Takeover
If the page is vulnerable to CSRF you might be able to make the user modify his password, email or authentication so you can then access it:
{% content-ref url="csrf-cross-site-request-forgery.md" %} csrf-cross-site-request-forgery.md {% endcontent-ref %}
XSS to Account Takeover
If you find a XSS in application you might be able to stal cookies, local storage, or info from the web page that could allow you takeover the account:
{% content-ref url="xss-cross-site-scripting/" %} xss-cross-site-scripting {% endcontent-ref %}
Same Origin + Cookies
If you find a limited XSS or a subdomain take over, you could play with the cookies (fixating them for example) to try to compromise the victim account:
{% content-ref url="hacking-with-cookies/" %} hacking-with-cookies {% endcontent-ref %}
Attacking Password Reset Mechanism
{% content-ref url="reset-password.md" %} reset-password.md {% endcontent-ref %}
Response Manipulation
If the authentication response could be reduced to a simple boolean just try to change false to true and see if you get any access.
OAuth to Account takeover
{% content-ref url="oauth-to-account-takeover.md" %} oauth-to-account-takeover.md {% endcontent-ref %}
Host Header Injection
- The Host header is modified following a password reset request initiation.
- The
X-Forwarded-For
proxy header is altered toattacker.com
. - The Host, Referrer, and Origin headers are simultaneously changed to
attacker.com
. - After initiating a password reset and then opting to resend the mail, all three of the aforementioned methods are employed.
Response Manipulation
- Code Manipulation: The status code is altered to
200 OK
. - Code and Body Manipulation:
- The status code is changed to
200 OK
. - The response body is modified to
{"success":true}
or an empty object{}
.
- The status code is changed to
These manipulation techniques are effective in scenarios where JSON is utilized for data transmission and receipt.
Change email of current session
From this report:
- Attacker requests to change his email with a new one
- Attacker receives a link to confirm the change of the email
- Attacker send the victim the link so he clicks it
- The victims email is changed to the one indicated by the attacker
- The attack can recover the password and take over the account
This also happened in this report.
References
- https://infosecwriteups.com/firing-8-account-takeover-methods-77e892099050
- https://dynnyd20.medium.com/one-click-account-take-over-e500929656ea
Learn AWS hacking from zero to hero with htARTE (HackTricks AWS Red Team Expert)!
Other ways to support HackTricks:
- If you want to see your company advertised in HackTricks or download HackTricks in PDF Check the SUBSCRIPTION PLANS!
- Get the official PEASS & HackTricks swag
- Discover The PEASS Family, our collection of exclusive NFTs
- Join the 💬 Discord group or the telegram group or follow us on Twitter 🐦 @carlospolopm.
- Share your hacking tricks by submitting PRs to the HackTricks and HackTricks Cloud github repos.