Open ajmal-rzp opened 2 years ago
Not just this one, it fails on all DOM XSS labs in Portswigger Web academy.
Hi @ajmal99 First, thank you so much for submit issue. DOM XSS is only conducting a very simple scan due to the speed problem. Maybe that's why I think the detection rate for DOM XSS is very low.
I'll try to come up with some ways to detect it well while considering its speed!
Since dalfox is often used in the form of scanning a large number of URLs on a pipeline, the more frequently the headless browser is used, the more slowly 😭
i appreciate the update, thanks @hahwul
i tried to test dalfox vs Lab: DOM XSS in document.write sink using source location.search and academy showed me that lab is solved, but cli showed me small amount of information
command: └─$ dalfox url https://0ab900d8034ec21483b1555f00b300ed.web-security-academy.net/ --output-all --report
🎯 Target https://0ab900d8034ec21483b1555f00b300ed.web-security-academy.net/ 🏁 Method GET 🖥 Worker 100 🔦 BAV true ⛏ Mining true (Gf-Patterns) 🔬 Mining-DOM true (mining from DOM) ⏱ Timeout 10 📤 FollowRedirect false 🕰 Started at 2023-11-17 08:03:45.164230421 -0500 EST m=+0.023900483
[] 🦊 Start scan [SID:Single] / URL: https://0ab900d8034ec21483b1555f00b300ed.web-security-academy.net/ [I] Found 11 testing point in DOM base parameter mining [I] Found 1 testing point in Dictionary base parameter mining [I] Content-Type is text/html; charset=utf-8 [I] X-Frame-Options is SAMEORIGIN [I] Reflected search param => PTYPE: URL Injected: /inHTML-none(1) ] \ [ { . ; } | - , + : = ( ) $ 77 line: 0 search results for 'DalFox' [] ---------------------------------------------------------------------------------------------------- [*] [duration: 13.396382062s][issues: 0] Finish Scan! [ Parameter Analysis ]
+--------+------+-----------+-----------------+--------------------------------+--------------------------------+ | PARAM | TYPE | REFLECTED | R-POINT | R-CODE | CHARS | +--------+------+-----------+-----------------+--------------------------------+--------------------------------+ | search | URL | true | /inHTML-none(1) | 77 line: | ] \ [ { . ; } | - , + : = ( ) | | | | | | 0 search results for | $ | | | | | | 'DalFox' | | +--------+------+-----------+-----------------+--------------------------------+--------------------------------+
[ XSS PoCs ]
+---+------+----------+--------+-------+-------------+-----+
| # | TYPE | SEVERITY | METHOD | PARAM | INJECT-TYPE | CWE |
+---+------+----------+--------+-------+-------------+-----+
How I can test what actually happened and why the lab is solved?
Um.. From the logs, it appears that Dalfox is only showing results for mining and not detecting XSS.
I haven't tried Portswigger lab before, so I'm not sure, but is it a method where a specific request is sent to solve? If that approach is correct, the issue might have inadvertently been resolved through payloads used for testing.
Describe the bug
I ran dalfox on the following vulnerable application:
command:
dalfox url http://localhost:3000/ --deep-domxss --output-all --report
output:
Dalfox failed to detect the vulnerabilities.
What's expected.
Detection of DOM XSS and postMessage XSS with the innerHTML sink.
Environment