This repository contains a simple keylogger + server implementation built in Rust and HTML/JS, designed for demonstration, educational, or challenge usage (e.g. ICPC-style).
nerc-keylogger/
├── keylog/ # client-side (agent) or “logger” component
│ └── …
├── keylogger-server/ # server-side component
│ └── …
├── Cargo.toml
├── .gitignore
└── README.md
- The keylog component runs on a client to capture keystrokes and send them (via HTTP) to the server.
- The keylogger-server collects incoming data, stores it, and serves a web interface to view logs.
- The public/ folder hosts a minimal UI for viewing logs, interacting, or downloading data.
- Client-side key event capture and streaming to server
- Server-side collection, storage, and serving of logs
- Web UI to browse, search, download logs
- Simple, modular architecture (client / server in one repo)
- Rust (1.60+ recommended)
cargotoolchain installed
-
Clone the repo:
git clone https://github.com/Mond1c/nerc-keylogger.git cd nerc-keylogger -
Build and run server:
cd keylogger-server cargo run --releaseThis will launch the server (e.g. on
127.0.0.1:8080or configured port). -
Start the client logger:
cd keylog cargo run --releaseConfigure it to point to the server endpoint.
-
Open browser →
http://localhost:8080(or appropriate address) to view logged keystrokes via the UI inpublic/.
The server can be configured via a config.toml (or environment) file:
bind_addr = "127.0.0.1:8080"
upload_dir = "uploads"You can override via environment variables (e.g. BIND_ADDR, UPLOAD_DIR).
- HTTP / REST endpoints for upload, list, delete, serve files
- Web UI interacts via JSON (e.g.
GET /api/list,POST /api/upload) - Sanitize filenames, atomic writes (temp + rename) to avoid corruption
This project is for educational or contest use. If adapting to a real-world scenario:
- Sanitize all inputs (filenames, paths) to avoid directory traversal
- Rate-limit and size-limit uploads to prevent DoS
- Use TLS / HTTPS for network security
- Add authentication & authorization
- Consider logging, error handling, audit trails