Skip to content
Info disclosure Write-up Intermediate

Every Call Leaves a Trail — Extracting IP Addresses and Locations from WhatsApp Calls

WhatsApp calls use WebRTC and STUN to establish direct peer-to-peer connections, which exposes both participants' public IP addresses in STUN packets. An attacker on the same network can capture these packets to learn the other participant's IP, ISP, and approximate location.

Aman Singh Gill Follow

Published on osintteam.blog

In this blog, I’ll walk through how the STUN protocol and WebRTC can expose a caller’s real IP address during a WhatsApp call, and how I built a tool that captures STUN packets to extract and geolocate the other participant’s IP in real time.

Aman Singh Gill, on osintteam.blog

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the peer-to-peer design of WebRTC requires exchanging public IP addresses via STUN, and these addresses are sent in plaintext in packet headers.

Impact

An attacker on the same network could capture STUN packets to learn the other participant's public IP address, ISP, and approximate location; however, if the 'Protect IP address in calls' setting is enabled, all traffic goes through TURN relays and the real IP is not exposed.

What the attacker needed

Attacker on same LAN or able to capture traffic; victim makes or receives a WhatsApp call; relay protection disabled (for IP exposure)

The fix

Users should enable WhatsApp's 'Protect IP address in calls' setting or use a VPN to hide their real IP; developers should default to TURN relay mode for privacy-sensitive use cases.

How it was found

  1. Place or receive a WhatsApp call on the target network.
  2. Capture network traffic on the LAN using the STUN IP Tracker in live mode, or save a packet capture file.
  3. The tool filters for STUN protocol packets in the captured traffic.
  4. For each STUN packet, extract the source and destination IP addresses.
  5. Perform an ASN lookup on each IP using ipwhois.
  6. Filter out IPs belonging to known relay infrastructure (e.g., FACEBOOK/Meta ASN).

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

When you make a WhatsApp call, your phone and the other person's phone try to connect directly to each other over the internet. To do that, they must share their public IP addresses, which are like your device's address on the internet. If someone can watch the network traffic, they can see these addresses and use them to find out roughly where you are.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More by Aman Singh Gill

View all

8 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.