From fa64f0bc50dfa5756d884f081f3d6cc1040cfbd4 Mon Sep 17 00:00:00 2001 From: sophron Date: Sat, 10 Aug 2013 19:30:56 +0000 Subject: [PATCH] [NSE] Added http-dombased-xss.nse. --- scripts/http-dombased-xss.nse | 150 ++++++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 scripts/http-dombased-xss.nse diff --git a/scripts/http-dombased-xss.nse b/scripts/http-dombased-xss.nse new file mode 100644 index 000000000..38d878e82 --- /dev/null +++ b/scripts/http-dombased-xss.nse @@ -0,0 +1,150 @@ +description = [[ +It looks for places where attacker-controlled information in the DOM may be used +to affect JavaScript execution in certain ways. The attack is explained here: +http://www.webappsec.org/projects/articles/071105.shtml +]] + +--- +-- @usage nmap -p80 --script http-dombased-xss.nse +-- +-- DOM-based XSS occur in client-side JavaScript and this script tries to detect +-- them by using some patterns. Please note, that the script may generate some +-- false positives. Don't take everything in the output as a vulnerability, if +-- you don't review it first. +-- +-- Most of the patterns used to determine the vulnerable code have been taken +-- from this page: https://code.google.com/p/domxsswiki/wiki/LocationSources +-- +-- @args http-dombased-xss.singlepages The pages to test. For example, +-- {/index.php, /profile.php}. Default: nil (crawler mode on) +-- +-- @output +-- PORT STATE SERVICE REASON +-- 80/tcp open http syn-ack +-- | http-dombased-xss: +-- | Spidering limited to: maxdepth=3; maxpagecount=20; withinhost=some-very-random-page.com +-- | Found the following indications of potential DOM based XSS: +-- | +-- | Source: document.write("