https://github.com/zreechxnn/edukeylogger
keylogger with daemon, logging, and CPU stress test (Linux, C++17)
https://github.com/zreechxnn/edukeylogger
cpp cybersecurity daemon json-config keylogger linux low-level-programming security signal-handling system-programming terminal testing
Last synced: 9 months ago
JSON representation
keylogger with daemon, logging, and CPU stress test (Linux, C++17)
- Host: GitHub
- URL: https://github.com/zreechxnn/edukeylogger
- Owner: Zreechxnn
- License: gpl-3.0
- Created: 2025-07-31T00:57:45.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-08-22T10:41:12.000Z (10 months ago)
- Last Synced: 2025-09-07T06:41:37.711Z (10 months ago)
- Topics: cpp, cybersecurity, daemon, json-config, keylogger, linux, low-level-programming, security, signal-handling, system-programming, terminal, testing
- Language: C++
- Homepage:
- Size: 213 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# π₯ EduKeylogger - Advanced Educational Keylogger System π₯




**EduKeylogger** is an advanced educational keylogger system designed to demonstrate system programming techniques, process defense mechanisms, and CPU stress testing. This project showcases professional-level implementation of Linux OS concepts along with high CPU load simulation for thermal benchmarking.
> β οΈ **WARNING:** This project is for educational and testing purposes only. Unauthorized use is illegal. The developers are not responsible for any misuse.
---
## π Key Features
### π‘οΈ High-Defense Daemon System
- **Double-Fork Daemonization**
- **Signal Blocking** for all termination signals
- **Watchdog Process** with auto-restart
- **PID-based Lockfile** using `flock()`
- **Terminal Isolation** via raw mode
### π₯ CPU Stress Engine
- **Multi-threaded Burner** (8β32 threads)
- **Big Unicode Processing** (10+ million CJK chars)
- **Complex Math Operations**
```cpp
x = sin(x) * cos(x) / tan(x) * sqrt(x);
```
- **Memory-Intensive Swaps** (1000+ per second)
- **Dynamic Pattern Generation**
### π Security Mechanisms
- **Password Authentication** via JSON config
- **Secure File Flag Verification**
- **Ctrl+E Exit Combo Detection**
- **Automatic Session Timeout** (60 minutes)
### π Logging System
- **Structured Log Formatting**
- **Special Key Detection** (\[ENTER], \[TAB], \[BACK])
- **Timestamp Precision**
- **Encrypted Log Option** (AES-256-CBC)
---
## π¦ System Requirements
| Component | Minimum | Recommended |
| --------- | ----------------- | ---------------------- |
| OS | Linux Kernel 5.4+ | Ubuntu 22.04 LTS |
| CPU | Dual-core 64-bit | 8-core+ with cooling |
| RAM | 2GB | 16GB+ |
| Storage | 100MB | SSD with 1GB+ free |
| Compiler | g++ 9.4.0 | g++ 12.3.0 |
| Libraries | nlohmann/json | Boost 1.75+ (optional) |
---
## π Installation & Configuration
### Compile from Source
```bash
# Clone the repository
git clone https://github.com/yourusername/edukeylogger.git
cd edukeylogger
# Install dependencies
sudo apt update
sudo apt install g++ build-essential
sudo apt install g++ libjsoncpp-dev
# Compile with optimization flags
g++ -O3 -march=native -std=c++17 -o edukeylogger main.cpp -lpthread
# Optional: grant CAP_SYS_ADMIN capability
sudo setcap cap_sys_admin+ep edukeylogger
```
## π» Usage
### Run as Daemon
```bash
sudo ./edukeylogger
```
### Monitor Logs
```bash
tail -f /var/log/edukey.log
```
### Stop the Program
```bash
./edukeylogger interactive
Enter shutdown password: secreet
[β] Shutdown command sent. Program will exit within 10 seconds.
```
### CPU Stress Test Mode
```bash
Sudo ./edukeylogger --stress-test
```
---
## π§ System Architecture
```mermaid
graph TD
A[Main Process] --> B[Daemonize]
B --> C[Create Lockfile]
C --> D[Block Signals]
D --> E[Fork Watchdog]
E --> F[Start CPU Burner]
F --> G[Keylogger Main Loop]
G --> H{Time Remaining?}
H -->|Yes| I[Check Exit Flag]
I --> J{Valid Password?}
J -->|No| K[Read Input]
K --> L[Process Key]
L --> M[Write Log]
M --> H
J -->|Yes| N[Clean Exit]
H -->|No| N
```
---
## π File System Structure
| Path | Description | Permissions |
| ------------------------- | ---------------------- | ----------- |
| `/tmp/edu_keylogger.lock` | PID lock file | `0600` |
| `/var/log/edukey.log` | Encrypted log file | `0600` |
| `/proc/self/exe` | Watchdog restart path | - |
| `/dev/tty` | Virtual terminal | `0666` |
| `/tmp/edu_keylogger.exit` | Exit flag via password | `0644` |
---
## π§ͺ Performance Testing
### CPU Load Profile

| Parameter | Value |
| ---------------- | -------------- |
| Thread Count | Core Count Γ 8 |
| Unicode Size | 10β20 million |
| Operations/sec | \~5.2Γ10βΉ |
| Memory Bandwidth | 48GB/s |
| Temp Increase | +35Β°C avg |
### Comparison of CPU Burn Methods
| Method | CPU Usage | Memory Usage | Effectiveness |
| --------------- | --------- | ------------ | ------------- |
| Empty Loops | 100% | Minimal | β
β
β
ββ |
| Big Unicode | 100% | High | β
β
β
β
β |
| Math Ops | 100% | Moderate | β
β
β
β
β
|
| **Combination** | **100%** | **High** | **β
β
β
β
β
** |
---
## β οΈ Security & Ethics Notice
1. **FOR YOUR OWN SYSTEM ONLY**
2. **Do not install without permission**
3. **May cause hardware overheating**
4. **Logs may contain sensitive information**
5. **Use in controlled environments only**
```bash
# WARNING: The following may damage hardware!
./edukeylogger --max-stress
```
---
## π€ Contributing
Accepted contributions:
1. Report bugs via GitHub Issues
2. Submit new features via Pull Request
3. Documentation improvements
4. Algorithm optimization
Guidelines:
- Code must pass `clang-tidy` checks
- Test on at least 2 Linux distributions
- Fully document any changes
---
## π License
```text
Copyright (c) 2025
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the βSoftwareβ), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED βAS ISβ, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
```