Skip to content

jasonniebauer/Python-Keylogger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Python Keylogger

A stealth keylogger for Windows.

Disclaimer

This tutorial has been made for educational purposes only. I do not promote malicious practices and will not be responsible for any illegal activities. Use at your own risk.

Table of Contents

  1. Introduction
  2. Get Started
  3. Keylogging
  4. Roadmap

Introduction

Recording the keys struck on a keyboard, commonly referred to as keystroke logging or keyboard capturing, is typically a covert action that the person using the keyboard is unaware that their actions are being monitored. This type of surveillance has the capability to record every keystroke made on that system.

Keystroke logging can be acheived with the help of a keylogger, short for keystroke logger, that allows the person operating the program to capture every keystroke that the user makes and then retreive that data.

Prerequisite

This project assumes you have Python 3 already installed on both your machine and the target's to run the keylogger. If not, go ahead and download the latest version for Windows from the official Python Software Foundation.

Get Started

Install pynput

Included in this keylogger is the pynput library, which is used to monitor input devices. We need to install the package to make use of it within our script.

  1. Navigate to the python-keylogger project folder.
  2. Press shift+ right click the pynput folder and then select Open PowerShell window here.
  3. With the PowerShell window open pointing to the pynput directory, type the following command and press Enter
    python setup.py install

Keylogging

Navigate to the project folder and double click the file labeled keylogger.pyw to initiate the script. The .pyw file extension allows the script to run in the background to prevent detection.

This keylogger will store typed keys in a key_log.txt file in the order of when they were typed.

Stop the keylogger by opening the Task Manager and ending the running Python process.

Start keylogger on startup

  1. Press ⊞ Win+R to show the "RUN" box
  2. Type shell:startup and press Enter
  3. Copy the keylogger.pyw file into this folder
  4. Change the path where the log will be stored
    log_dir = "C:\Users\Owner\Desktop\logs"

Roadmap

  • Add remote monitoring
  • Clear log file from target machine
  • Automate injection (start keylogger on boot) Reference

About

Detect keystrokes with Python.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages