Skip to content
XSS Write-up Advanced

Chaining Three Bugs to Get RCE in Microsoft AttackSurfaceAnalyzer

The AttackSurfaceAnalyzer desktop app runs an internal web server bound to all network interfaces and is vulnerable to cross-site scripting through a runID value. Because the Electron wrapper leaves Node integration enabled, an attacker who can reach the server could execute JavaScript that spawns processes on the victim's machine, leading to remote code execution.

parsiya.net

Published on parsiya.net

This is a blog post about how I found three vulns and chained them to get RCE in the Microsoft AttackSurfaceAnalyzer (ASA moving forward) GUI version.

Parsia, on parsiya.net

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 runID value was rendered without sanitisation, and the Electron.NET wrapper did not disable Node integration, so injected script could call Node APIs to spawn processes.

Impact

A remote attacker who can reach the exposed Kestrel server could run code on the victim's machine, though the text notes this depends on the Windows firewall being bypassed or absent.

What the attacker needed

Network access to the Kestrel server; firewall bypassed or absent; victim uses the ASA Electron app

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 app is a desktop tool built with Electron, which means it is really a web page wrapped in a program. It also runs a small web server that listens on every network address, so other machines may be able to reach it. A value the app displays on a page was not cleaned up, so script could run inside the app, and because the app allows that script to start other programs, an attacker could run code on the victim's computer.

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.