CSS Injection within Microsoft Attack Simulator Platform
The Attack Simulator's payload creation allowed style tags while filtering script tags, so CSS injected into a phishing payload escaped the preview pane and affected the whole page. An attacker could hide or alter page elements, preventing the user from filling fields or generating a phishing link.
medium.com
Published on medium.com
The crux of the vulnerability lies within the Attack Simulation Training portion of the Attack Simulator. Under the Create Payload segment, <script> tags were filtered against, but <style> tags are allowed.
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 filtered script tags but did not sandbox or filter style tags, allowing CSS to escape the preview pane and apply to the whole page.
Impact
The injected CSS could hide page elements and prevent the user from filling fields or generating a phishing link, but the text does not claim script execution or data theft.
What the attacker needed
Access to Attack Simulator; ability to create a payload
The fix
The text does not state a fix; style tags should be sandboxed or filtered like script tags.
How it was found
- Go to the Attack Simulator and open the Content Library tab.
- Select Tenant Payload and click Create a Payload.
- Choose Email as the payload type and Credential Harvesting as the option, then click Next.
- Enter a name and proceed to Configure Payload.
- In the text field, switch to Code and paste a style block that hides paragraph and span elements.
- Switch to the Text tab to render the style tag and observe that page fields and the phishing link generator are hidden.
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 a website lets you type content that it later shows to other people, it must make sure that content cannot change how the rest of the page looks or works. Here, the site blocked script tags (which run code) but forgot to block style tags (which change appearance). The injected style rules spread beyond the small preview area and hid buttons and fields on the main page.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.