Skip to content

gokul2736/Keylogger-Detection-Internship-Project

Repository files navigation

🛡️ Internship Project – Keylogger Detection Tool

This repository contains my Internship Project on Cybersecurity .

The main goal of this project was to build a Keylogger Detection Tool in Python. The tool scans running processes and alerts the user if a suspicious program (like a keylogger) is active. A small fake keylogger script is also included so users can test the detection in a safe environment.

📂 Repository Contents

  • Report.pdf → Complete internship report
  • keylogger_detector.py → Main detection script
  • test_keylogger.py → Fake keylogger script (for testing only)
  • requirements.txt → Python dependencies

🌐 About the Project

Keyloggers are programs that secretly record everything you type. They can be used for malicious activities such as stealing passwords, credit card numbers, or sensitive personal data.

This project demonstrates a basic defensive approach:

  • It continuously scans the system’s running processes.
  • If a process name matches suspicious keywords like keylogger, pynput, or keyboard, the user is alerted.
  • A fake keylogger is included to test the tool and show how detection works.

This project is not meant to replace antivirus software, but to show how such tools can be created and tested in a learning environment.

🛠️ Tools & Technologies

  • Language: Python 3.8+
  • Libraries Used:
    • psutil → for process monitoring
    • pynput → used in the fake keylogger script
  • Supported OS: Windows / Linux / macOS

Minimum Requirements:

  • Python installed
  • 100 MB free disk space
  • 2 GB RAM (any modern laptop is fine)

🚀 How to Run

1. Clone the repository

git clone https://github.com/gokul2736/Internship-Project.git
cd Internship-Project

2. Install dependencies

pip install -r requirements.txt

3. Run the detector (normal scan)

python keylogger_detector.py

🧪 Testing with the Fake Keylogger

The repo includes a test script to simulate a keylogger. Follow these steps:

Step 1: Run the fake keylogger

python test_keylogger.py

This script will log every key you press into a file called keys.txt. To stop it, press ESC.

Step 2: Run the detector in another terminal

python keylogger_detector.py

👉 Example output when the fake keylogger is running:

🔍 Scanning running processes for keyloggers... [⚠️ ALERT] Suspicious process detected: python.exe (PID: 4321)

📌 Expected Test Cases

Case 1 – No keylogger active Run keylogger_detector.py only. Output → Safe ✅

Case 2 – Fake keylogger active Run test_keylogger.py and then keylogger_detector.py. Output → ⚠️ Alert with process name and PID.

Case 3 – Stop fake logger Stop the keylogger with ESC. Run the detector again. Output → Safe ✅

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors