A WAF Bypass
A web application had stored cross-site scripting (XSS) in an event handler, and the site's web application firewall (WAF) could be bypassed using short punycode domains and string concatenation. An attacker could run script in a victim's browser and exfiltrate customer data.
Published on osec.com
If Wargames were remade in 2022, the WOPR would operate behind a Web Application Firewall (WAF). During penetration testing, security teams must identify WAF bypasses quickly rather than spending weeks researching vulnerabilities.
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 inserted user input into an inline event handler without proper output encoding, and the WAF's pattern rules were too narrow to catch obfuscated script.
Impact
An attacker could execute script in a victim's browser and exfiltrate customer data, though the report does not state whether the WAF blocked any part of the exploit.
What the attacker needed
Victim visits or interacts with the page; attacker-controlled domain; attacker listener server
The fix
The WAF should be configured to properly filter user-controlled input, and secure development and vulnerability management processes should be implemented.
How it was found
- Host the exploit code on an attacker-controlled domain.
- Use the proof-of-concept to fetch a customer summary page and send the response to the attacker's listener.
- Replace the listener placeholder with the attacker's receiving server.
- Navigate to the vulnerable form.
- Submit the payload in any form field.
- Trigger the XSS by interacting with vulnerable elements after the page refreshes.
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.
A web application firewall (WAF) is a filter that tries to block malicious input such as script code. Here the application still had a cross-site scripting (XSS) flaw, where attacker-supplied script runs in another user's browser, and the WAF's rules could be evaded. The report shows two evasion tricks: using a very short domain name and splitting dangerous words across several strings.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.