Skip to content
Info disclosure Write-up Advanced

Identify Website Users By Client Port Scanning Using Webassembly And Go

A web page can use WebAssembly to scan localhost ports from a visitor's browser, identifying open services. This could enable attacks like denial-of-service or remote code execution against vulnerable local services.

Avi Lumelsky Follow

Published on infosecwriteups.com

It isn’t a secret that each of us has a unique fingerprint when we visit web pages. Client fingerprinting helps websites track our activity across plenty of other websites.

Avi Lumelsky, on infosecwriteups.com

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

Browsers allow web pages to make requests to localhost, and WebAssembly can be used to perform port scanning despite CORS restrictions.

Impact

An attacker could identify open ports on a visitor's machine and potentially exploit vulnerable services, leading to denial-of-service or remote code execution.

What the attacker needed

Victim visits a malicious website; browser supports WebAssembly; vulnerable service running on localhost

How it was found

  1. A user visits a web page that contains WebAssembly code.
  2. The browser initializes the WebAssembly runtime and runs the port scanner.
  3. The scanner sends HTTP requests to localhost ports to check if they are open.
  4. Based on responses (connection refused, timeout, or HTTP response), the scanner determines open ports.
  5. The results are displayed to the user or sent to the attacker.

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 visit a website, your browser can be tricked into checking which services are running on your own computer. This is done using a technology called WebAssembly, which lets websites run fast code. If a vulnerable service is found, an attacker could exploit it to crash your computer or run malicious code.

What is Info disclosure?

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

More by Avi Lumelsky

View all

1 more disclosed report, 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.