๐ง Key Logger with Email Notifications: A Comprehensive Cybersecurity Monitoring Tool
Category: Red Team | Offensive Security | Malware Simulation | System Monitoring
Timeline: May 2024
Languages & Frameworks: C#, .NET Framework 4.5+
๐ Full Guide & Demo
๐ GitHub Repository
This project involves the development of a feature-rich keylogger application designed for cybersecurity awareness, user behavior analysis, and ethical remote monitoring. Built using C# and the .NET Framework, the application runs stealthily in the background, logging keystrokes, capturing screenshots, tracking URLs, retrieving IP-based geolocation data, and sending this information periodically via email.
๐ Core Features:
โจ๏ธ Keystroke Logging: Captures all user keystrokes in real-time, saving them to secure logs.
๐ Browser URL Tracking: Monitors user activity across major browsers (Chrome, Firefox, IE, Edge) by tracking visited URLs.
๐ธ Screenshot Capture: Takes periodic full-screen screenshots to enhance context around user activity.
๐ IP-based Geolocation: Uses the systemโs public IP to determine the userโs physical location and includes this in reports.
๐ง Automated Email Notifications: Sends all captured data โ logs, screenshots, and metadata โ to a configured email address at set intervals.
โ๏ธ Environment Variable Configuration: Fully customizable via environment variables, including email credentials, log paths, and notification frequency.
๐ ๏ธ Technologies Used:
Language: C#
Framework: .NET Framework 4.5+
IDE: Visual Studio
Email Services: SMTP-based email automation
Geolocation: IP-based lookup using third-party APIs
File I/O & Screenshot Libraries: .NET System APIs
Distribution: Compiled as an executable for silent background deployment
๐งช How It Works:
The keylogger starts as a background process upon execution.
It begins monitoring and recording keystrokes into a temporary log.
At specified intervals or after reaching a keystroke threshold, it:
After sending, the log is archived and rotated.
โ๏ธ Customizable Environment Variables:
EMAIL_ADDRESS
: The email used to send reports
EMAIL_PASSWORD
: Authentication password
LOG_FILE_NAME
, SCREENSHOT_FILE_NAME
, etc.: Custom paths for logs and screenshots
INCLUDE_LOG_AS_ATTACHMENT
, INCLUDE_SCREENSHOT_AS_ATTACHMENT
: Boolean flags for email content
MAX_LOG_LENGTH_BEFORE_SENDING_EMAIL
: Size trigger for email dispatch
MAX_KEYSTROKES_BEFORE_WRITING_TO_LOG
: Frequency of writing to disk
๐ง Skills Demonstrated:
Windows API programming and system-level process interaction
Secure and efficient log handling
Email automation using .NETโs System.Net.Mail
Experience with information gathering, geolocation APIs, and persistent malware simulation
Understanding of ethical red teaming and legal limitations of monitoring tools
โ ๏ธ Ethical Use Only:
This tool is developed strictly for educational purposes, cybersecurity awareness, and controlled environments. Unauthorized use to monitor individuals without consent violates laws and ethical standards. Always ensure legal compliance and proper authorization before deploying.
โ
Practical Applications:
Cybersecurity Training: Simulate keylogging malware for awareness and response testing
Parental Control: Track and protect child safety online in authorized settings
Employee Device Auditing: Monitor compliance in managed corporate environments with explicit consent
Red Team Labs: Use as part of advanced adversarial simulation exercises
๐ Outcome & Impact:
This project bridges system programming and offensive cybersecurity. It showcases your ability to build a fully functional surveillance tool for simulation and training, and demonstrates proficiency in developing secure, automated monitoring systems. Itโs a standout example of your C# development, security tooling, and ethical hacker mindset.