ShadowLog is a Python-based activity monitoring tool built for cybersecurity education and authorized security testing.
It demonstrates how keystroke monitoring, contextual logging, and controlled data transmission operate in Red Team and Blue Team scenarios.
Unlike consumer monitoring software, ShadowLog is designed to teach detection, analysis, and defense techniques, not surveillance.
FOR EDUCATIONAL AND AUTHORIZED USE ONLY
- Do not use on systems you do not own or have permission to monitor
- Do not use for spying, stalking, or malicious surveillance
- Always test in controlled environments (VMs recommended)
The author is not responsible for misuse or legal consequences.
-
Keystroke Capture
Logs standard and special keys (Enter, Space, Backspace, etc.). -
Active Window Tracking
Records the currently focused application to provide context for each log entry. -
Local Log Storage
Saves logs to disk with automatic file rotation for stability. -
Optional Remote Logging
Supports sending log batches to a Discord Webhook (disabled by default). -
Live Control Toggle
Instantly pause or resume logging using a configurable hotkey (F9).
ShadowLog follows a simple monitoring pipeline:
- Hook – Registers a keyboard listener using system-level hooks.
- Context Capture – Retrieves the active window title during key events.
- Log Management – Writes structured logs locally with rotation support.
- Transmission (Optional) – Sends log batches to a remote endpoint if enabled.
This architecture mirrors real-world monitoring techniques used by both attackers and defenders, making it valuable for threat modeling and detection research.
- Python 3.8+
pip
-
Clone the repository
git clone https://github.com/BGx-11/ShadowLog.git cd ShadowLog -
Install dependencies
pip install -r requirements.txt
Administrator / root privileges may be required for full keystroke capture.
Windows
python shadowlog.pyLinux / macOS
sudo python3 shadowlog.py| Action | Key |
|---|---|
| Pause / Resume Logging | F9 |
| Exit Safely | CTRL + C |
Logs are flushed and saved automatically on exit.
ShadowLog/
│
├── shadowlog.py # Main monitoring engine
├── requirements.txt # Python dependencies
└── README.md # Documentation
Edit shadowlog.py and locate the EASY CONFIGURATION section.
LOG_PATH = Path(r"E:\ShadowLog\Logs")DISCORD_WEBHOOK_URL = "https://discord.com/api/webhooks/..."
# or
DISCORD_WEBHOOK_URL = NoneRemote logging is optional and disabled by default.
FOR EDUCATIONAL AND AUTHORIZED USE ONLY
- Do not use on systems you do not own or have permission to monitor
- Do not use for spying, stalking, or malicious surveillance
- Always test in controlled environments (VMs recommended)
The author is not responsible for misuse or legal consequences.
This project is licensed under the MIT License.
Developed by BGx (Devansh Agarwal)
Cybersecurity Enthusiast & Developer