Skip to content
XSS Write-up Advanced

XSS + ARP Poisoning results in full account takeover

A reflected XSS vulnerability existed in the 'dst' parameter on the login page, which reflected user input into a script tag. An attacker could exploit this to retrieve a victim's internal IP address, perform ARP poisoning on the local network, and intercept the victim's authentication cookie sent over HTTP because the secure flag was not set, leading to account takeover.

medium.com

Published on medium.com

This scenario is applicable on environments where there is a hotspot(internet of the company) available for users and employees of that environment like airports or universities or internal network of companies and etc because the ARP poisoning attack is a network vulnerability from the deeper layers of TCP/IP network…

Amirali Kazerooni, on medium.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

Likely the application reflected the 'dst' parameter into a JavaScript context without proper sanitisation, and the authentication cookie lacked the Secure flag, allowing it to be sent over HTTP.

Impact

An attacker on the same network could steal a victim's authentication cookie and take over their Corporate System account, but this required the victim to be on the same subnet and click a malicious link.

What the attacker needed

Victim on same network subnet; victim clicks malicious link; attacker can perform ARP poisoning

The fix

The XSS vulnerability was fixed, and the authentication cookie should have the Secure flag set to prevent transmission over HTTP.

How it was found

  1. Attacker crafts a malicious link with a JavaScript payload in the 'dst' parameter on the login page.
  2. Victim clicks the link, and the XSS payload executes, sending a request to the attacker's server to retrieve the victim's internal IP address.
  3. Attacker's server extracts the internal IP and initiates ARP poisoning using ettercap.
  4. The XSS payload redirects the victim to an HTTP panel URL, causing the authentication cookie to be sent unencrypted.
  5. Attacker intercepts the HTTP request via ARP poisoning and extracts the session cookie.

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.

This report describes two bugs combined: a cross-site scripting (XSS) flaw where a website displays user input as code, and a network attack called ARP poisoning that lets someone on the same Wi-Fi intercept traffic. The attacker tricked a victim into clicking a link that ran malicious code, which revealed the victim's internal IP address. Then, using ARP poisoning, the attacker eavesdropped on the victim's unencrypted HTTP traffic and stole their login cookie, taking over their account.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.