Skip to content

Commit f994872

Browse files
authored
Merge pull request #1585 from HackTricks-wiki/update_Hey_there__You_are_using_WhatsApp__Enumerating_Thr_20251118_182842
Hey there! You are using WhatsApp Enumerating Three Billion ...
2 parents b634924 + 57a89af commit f994872

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

src/pentesting-web/registration-vulnerabilities.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,43 @@ phone-number-injections.md
7373
captcha-bypass.md
7474
{{#endref}}
7575

76+
### Contact-discovery / identifier-enumeration oracles
77+
78+
Phone-number–centric messengers expose a **presence oracle** whenever the client syncs contacts. Replaying WhatsApp’s discovery requests historically delivered **>100M lookups per hour**, enabling near-complete account enumerations.
79+
80+
**Attack workflow**
81+
82+
1. **Instrument an official client** to capture the address-book upload request (authenticated blob of normalized E.164 numbers). Replay it with attacker-generated numbers while reusing the same cookies/device token.
83+
2. **Batch numbers per request**: WhatsApp accepts thousands of identifiers and returns registered/unregistered plus metadata (business, companion, etc.). Analyze responses offline to build target lists without messaging victims.
84+
3. **Horizontally scale** enumeration with SIM banks, cloud devices, or residential proxies so per-account/IP/ASN throttling never triggers.
85+
86+
**Dialing-plan modeling**
87+
88+
Model each country’s dialing plan to skip invalid candidates. The NDSS dataset (`country-table.*`) lists country codes, adoption density, and platform split so you can prioritize high-hit ranges. Example seeding code:
89+
90+
```python
91+
import pandas as pd
92+
from itertools import product
93+
94+
df = pd.read_csv("country-table.csv")
95+
row = df[df["Country"] == "India"].iloc[0]
96+
prefix = "+91" # India mobile numbers are 10 digits
97+
for suffix in product("0123456789", repeat=10):
98+
candidate = prefix + "".join(suffix)
99+
enqueue(candidate)
100+
```
101+
102+
Prioritise prefixes that match real allocations (Mobile Country Code + National Destination Code) before querying the oracle to keep throughput useful.
103+
104+
**Turning enumerations into targeted attacks**
105+
106+
- Feed leaked phone numbers (e.g., Facebook’s 2021 breach) into the oracle to learn which identities are still active before phishing, SIM-swapping, or spamming.
107+
- Slice censuses by country/OS/app type to find regions with weak SMS filtering or heavy WhatsApp Business adoption for localized social engineering.
108+
109+
**Public-key reuse correlation**
110+
111+
WhatsApp exposes each account’s X25519 identity key during session setup. Request identity material for every enumerated number and deduplicate the public keys to reveal account farms, cloned clients, or insecure firmware—shared keys deanonymize multi-SIM operations.
112+
76113
## Weak Email/Phone Verification (OTP/Magic Link)
77114

78115
Registration flows often verify ownership via a numeric OTP or a magic-link token. Typical flaws:
@@ -109,6 +146,7 @@ def queueRequests(target, wordlists):
109146
body = '{"email":"victim@example.com","code":"%06d"}' % code
110147
engine.queue(target.req, body=body)
111148

149+
112150
def handleResponse(req, interesting):
113151
if req.status != 401 and b'Invalid' not in req.response:
114152
table.add(req)
@@ -329,5 +367,6 @@ Impact: Full Account Takeover (ATO) without any reset token, OTP, or email verif
329367
- [How I Found a Critical Password Reset Bug (Registration upsert ATO)](https://s41n1k.medium.com/how-i-found-a-critical-password-reset-bug-in-the-bb-program-and-got-4-000-a22fffe285e1)
330368
- [Microsoft MSRC – Pre‑hijacking attacks on web user accounts (May 2022)](https://msrc.microsoft.com/blog/2022/05/pre-hijacking-attacks/)
331369
- [https://salmonsec.com/cheatsheet/account_takeover](https://salmonsec.com/cheatsheet/account_takeover)
370+
- [Hey there! You are using WhatsApp: Enumerating Three Billion Accounts for Security and Privacy (NDSS 2026 paper & dataset)](https://github.com/sbaresearch/whatsapp-census)
332371

333372
{{#include ../banners/hacktricks-training.md}}

0 commit comments

Comments
 (0)