AutoIT and It's Destructive Potential

AutoIt is amazing. They have a website. Read about it there because it would be a waste of my time to try and explain it to you. The help file is massive so anything you need, you can find there. Also, if you want to use the user created functions and such, everything's in the help file. It really is rather extensive.

So, onto an example. This is basically an example of a script that you can run from an autoexec.bat on someone else's computer to give them a fake and very obvious virus. Let's begin:

#include <GUIConstantsEx.au3>

$loop = 0
$x = 1

You will need this first line to allow you to use the GUI controls. We will be creating the GUI as an overlay on top of everything on the screen. This will make the user think that something weird is going on with their computer because they can't see any of their windows. We're also initialising our variable's here for good practise.

WinMinimizeAll()
GUICreate("PWN TIME", 4000, 4000)

Line 1 here minimizes all of the other windows which isn't really necessary but it's a pretty cool action to use in some other scripts. Line 2 is obviously the GUI creation. It's 4000 by 4000 because I'm not aware of many people that run their resolution this high so it's likely to work with everyone but by all means, change it to your liking.

while $loop < 20
    ProcessClose("taskmgr.exe")
    GUISetState(@SW_SHOW)
    GUISetBkColor(0xFF0000)
    MouseMove($loop, $loop + 1)
    GUISetBkColor(0x000000)
    For $x = 300 to 3000 step 300
        BlockInput(1)
        Beep($x,1)
    Next
    $loop = $loop + 1
Wend

Here is the meat of the script, as well as those variables that I promised earlier. The while loop is there to control the amount of times the screen will flash. If you want an infinite loop, you can either set this to $loop = 0 (at the very bottom) and comment out the second to last line or just comment out the second to last line; it's really up to you. Line 2 closes any attempts that the user makes at pressing ctrl + alt + del so that they think that their pc is truly locked up. Line 3 shows the GUI. Line 4 sets the colour of the GUI to red. Line 5 moves the mouse creepily. You can set this to a randomly generated number but it will only work really well on fast machines, not on the ones with crappy processors. Line 6 sets the GUI colour to black. You can change any one of the colour lines for any colour that you like, as well as add a sleep if you want one to stay on for longer.

Line 9 is where the beep is generated. 300 to 3000 is a pretty good range for the beep frequency but feel free to play around with this as some interesting things can happen when you do. The step is basically how many tones you want in between 300 and 3000. if you do step 1 then it will play every sound which is interesting but takes a very long time. Line 9 just blocks user input every time the sound is played because if it was outside this loop and in the while loop, they would have a small window of time in which to press ctrl + alt + del which would be bad... For the parameters of beep, we give it the $x variable which is being constantly changed and the time for each beep which I have at 1 for the sake of speed. Playing around with this is very interesting and should definitely be explored. Then, we have the line that you can comment out if you want an infinite loop. Magic virus funtimes.

If you'd like the whole script in one (including comments to explain all of the features), here's a Gist link.

Have fun!