0% found this document useful (0 votes)
54 views13 pages

Keylogger

Uploaded by

Star Boy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views13 pages

Keylogger

Uploaded by

Star Boy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Page |1

KEYLOGGER

Anurag Bista

BSc (Hons) in Ethical Hacking and Cyber Security

Softwarica College of IT and E - Commerce | In Collaboration with Coventry University

ST4061CEM: Programming and Algorithms 1

Er. Suman Shrestha

26th July, 2022


Page |2

ABSTRACT

In this report, the method for developing the keylogger have been explained along with

the brief overview of keylogger. According to the report, keylogger is program developed for

keeping track or monitoring the people’s activities without their awareness. Generally, people

tend to view keylogger from their bad sides but it has also its legitimate use. While

cybercriminal use keylogger for recording the PII, credit card number, user credentials and

other private information, it can also be used by parents to keep eye on their child activities,

also the organization to monitor their employees, or law enforcement to examine the correct

utilization of PCs.

This project is based on python, where I have installed a python module Pynput which

is not a standard python module. The program I have created should be able to keep track and

record each key stroke pressed and record in the specific file.
Page |3

ACKNOWLEDGEMENT

I wish to express my sincere gratitude to my programming teacher Er. Suman

Shrestha for providing me the chance to work on this engaging project to develop keylogging

program. Working on this project has allowed me to gain Python programming language

knowledge and practical skill. Additionally, I found that throughout the research for this

project, I was learning a lot more about using Python than I had previously learnt about it

during normal teaching sessions that focused on Python theory.


Page |4

Table of Contents

Introduction……………………………..…….………………………………..5

Objectives………………………………………………………………………6

Problem Statement.………………………………….…………………………7

Procedure……………………………………………….………………………8

System Architecture………… ………………...……………………….9

Screenshot of the Source Code…………...…………………………….10

Output…………………………………………………………………...11

Conclusion…………………………….……………...…………………………12

Reference…………………………………………………..……………………13
Page |5

INTRODUCTION

Key loggers can be defined as the program or the hardware devices that keep track of

each keystroke that we type. Generally, keylogger is regarded as the spyware where the user is

not aware of their action being monitored. keyloggers is primary form of hacking for

withdrawing credential information like credit card number, login credentials, and many others

that are still in use. Key loggers are a simple program that run-in background taking record of

each keystroke that you press, without interrupting the process of key stoke.

Although key loggers can be taken as a malware, it is not completely illegal to

download and operate it. Well, most of the time, companies, use key loggers as a tool for

trouble shoot technical problems on their system and network, also to keep an eye for the

employees. In such cases, if the organization downloads and uses key loggers it is completely

legal. However key loggers can be concerned for us, if somebody infect devices which they do

not own, and steals sensible financial information and recording the screen and using it for

criminal activities. Often the times, hackers use keylogger as a spyware to steal person’s

Personally Identifiable Information (PII), credentials, and sensitive enterprise data.

Image 1: Increased used of Keylogger by cyber criminals:

Source: iDefense, a verisign company


Page |6

OBJECTIVES

Specifically, this report wants to:

1. Discuss about the effect of keyloggers, and how it can be utilizes against us in today

scenario,

2. Create a keylogger program to keep track of every keystroke we type in.

3. Describe the entire key logging process.


Page |7

PROBLEM STATEMENT

Keylogger poses great threat to customer and their data therefore considering them as

an exploitative practice. Keylogger’s main problem is that they can be easily detected using

the antivirus software. Generally, it is challenging to install the hardware keylogger without

the knowledge of the system’s owner.


Page |8

PROCEDURE

At first, we install a python module PYNPUT in the system through the help of

command prompt. The PYNPUT module allows us for recording and monitoring input devices

as keyboard. Then we call the Key and Listener function using the above Pynput module.

Generally, for keyloggers press, release and write are important. We use on_press () function

to use each key that we press. Then, we call write_1 () fucntion to store the data we pressed.

To release the key we pressed, on_release() function is used. With the Listener fucntion

mentioned above, we call it to record the data that we press and release. For that, we have gave

two parameter on_press and on_release to the function on_press() and on_release(). When we

call the on_press function, listener funcioner sends the data to a variable Var we created to

store the data. The above on_release() function passes the data. We pass the key variable to the

on_release() function and verify it whether the data from key variable is equivalent to Key.esc.

If it is true, it returns False.

Then we use the file handling concept to store the data in key logger. We create a

variable K to store the data. Here, in the on_press() function, append function is used to pass

the data to the K variable. The stored data is passed for file handling and opened with the

file.txt. We append the data in open function to store the data simultaneously and thus collect

the whole key press.


Page |9

System Architecture

Figure 2: Architecture of keylogger


P a g e | 10

Screenshot of the source code.

Figure 3: screenshot of source code

Figure 4: screenshot of source code


P a g e | 11

Output

Image 4: screenshot of output


P a g e | 12

Conclusion

The study above has mentioned the various stages for developing the keylogger. In the

above report mentioned, the method used to develop the program have been described along

with the brief explanation of keylogger. The developed keylogger is able to record each key

stroke without the awareness of client. The program has the ability to store data and store the

data in the certain folder. However, the program has to run in the background in order to

function without the client’s knowledge. With the key logger not only, cybercriminals can spy

the people also the parents can keep track of their kids’ activities. Also, it will be helpful for

organization to keep tracking and monitoring its employees during the worktime.

As mentioned above, antivirus software can be a lot challenging for keyloggers.

keyloggers can detect easily if the clients chose to use the antivirus software to protect against

such malware.
P a g e | 13

REFERENCE

Fruhlinger, J. (2022, May 17). Keyloggers explained: How attackers record computer inputs.

CSO Online. https://www.csoonline.com/article/3326304/keyloggers-explained-how-

attackers-record-computer-inputs.html

Gillis, A. S. (2021, October 5). keylogger (keystroke logger or system monitor).

SearchSecurity. https://www.techtarget.com/searchsecurity/definition/keylogger

Keylogger for Windows using Python. (2021, January 5). Issuu.

https://issuu.com/ijtsrd.com/docs/101_keylogger_for_windows_using_python

Tech, W. (2022, January 20). Create a Keylogger with Python | Complete Tutorial for

Beginners.YouTube.

https://www.youtube.com/watch?v=B5rXhnjvavQ&feature=youtu.be

You might also like