DanMcInerney / xsscrapy

XSS spider - 66/66 wavsep XSS detected
1.66k stars 442 forks source link

Automatically detect script tags pointing to unregistered domains #28

Closed ddworken closed 8 years ago

ddworken commented 8 years ago

I've been using this a bit on my own for a while and realized I should probably push it upstream since it has found things a couple of different times.

This adds automatic detection of script tags that have a src attribute pointing to a non-resolvable domain name (aka a domain name that anyone can register). For example if xsscrapy was pointed at https://daviddworken.com/error.html which contains:

<html>
    <script src="//aaaaaaaaaaaaaaaaaaaaaaaaaaahkjfdshkjdshfkjdsfh.com"></script>
</html>

this patch will trigger to create the following vulnerability report in the output file:

URL: http://daviddworken.com/error.html
Found non-registered domain in script tag! Non-registered URL: //aaaaaaaaaaaaaaaaaaaaaaaaaaahkjfdshkjdshfkjdsfh.com
ddworken commented 8 years ago

Thanks!