Giter Club home page Giter Club logo

dsxs's People

Contributors

arirubinstein avatar stamparm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dsxs's Issues

some questions

Hello stamparm! I have some questions when I read your project.

  1. Why you using LARGER_CHAR_POOL&SMALLER_CHAR_POOL? why not just one larger pool?
  2. In line 63&64, why adding a single quote before the prefix when using LARGER_CHAR_POOL?

that's all, look forward to your reply, thanks.

double quotes, single quote in tag attribute can lead to XSS

Hello, hope you're well, i would like to discuss about one case that is not triggered by DSXS. Example of php code:

<?php
	echo "<input type=\"text\" name=\"test\" name=\"".str_replace('"','\\"',$_GET['param'])."\"></input>";
?>

The backslash is not interpreted as an escape character in this html context and leads to XSS. Do you agree that this kind of pattern deals with the following regexp in your code:

    (r"<[^>]*=\s*'[^>']*%(chars)s[^>']*'[^>]*>", ('\'',), "\"<.'.xss.'.>\", inside the tag, inside single-quotes, %(filtering)s filtering", r"(?s)<script.+?</script>|<!--.*?-->"),
    (r'<[^>]*=\s*"[^>"]*%(chars)s[^>"]*"[^>]*>', ('"',), "'<.\".xss.\".>', inside the tag, inside double-quotes, %(filtering)s filtering", r"(?s)<script.+?</script>|<!--.*?-->"),

If you confirm i can pull request to avoid the mandatory chars to go through the re.sub function for these cases (N.B: _contains function).

Cheers mate.

question about REGULAR_PATTERNS

for example, when using <!--[^>]*%abc|abc[^<]*--> to search <!-- abc--> xxxabc-->
, this regex can capture the last abc--> , but abc--> is not in comment.

same url, different result

root@kali:~/DSXS# python dsxs.py -u "http://www.ccjt.net/search/tosearch.aspx?searchname=hiyoufu&searchtype=1"

Damn Small XSS Scanner (DSXS) < 100 LoC (Lines of Code) #v0.2e
by: Miroslav Stampar (@stamparm)

  • scanning GET parameter 'searchname'
  • scanning GET parameter 'searchtype'

scan results: no vulnerabilities found

root@kali:~/DSXS# python dsxs.py -u "http://www.ccjt.net/search/tosearch.aspx?searchname=hiyouf&searchtype=1"

Damn Small XSS Scanner (DSXS) < 100 LoC (Lines of Code) #v0.2e
by: Miroslav Stampar (@stamparm)

  • scanning GET parameter 'searchname'
    (i) GET parameter 'searchname' appears to be XSS vulnerable ('<.".xss.".>', inside the tag, inside double-quotes, some filtering)
  • scanning GET parameter 'searchtype'

scan results: possible vulnerabilities found

false positives

good project!!
but, I find this rule will cause false positives:

(r"<[^>]*'[^>']*%(chars)s[^>']*'[^>]*>", ('\'',), "\"<.'.xss.'.>\", inside the tag, inside single-quotes, %(filtering)s filtering", r"(?s)<script.+?</script>|<!--.*?-->") 

egg:
demo.php:

<?php
$input= str_replace("\"", "&quot;" ,$_GET['xss']);
$input=str_replace(">","&lt;",$input);
$input=str_replace("<","&gt;",$input);
echo '<meta name="description" content="';
print($input);
echo '#23578';
print($input);
echo '#23578';
print($input);
echo '#23578"/>';
?>

2018-01-09 3 06 48

for help~

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.