How curry06/sysmon works
SysMon is a Windows monitoring and remote-control payload. Its main workflow starts at WinMain, which initializes persistence and background capture/listener threads; captured input and screenshots are sent through Telegram-facing HTTPS code. The README also documents clipboard tracking, watchdog recovery, and remote self-destruct. Some relationships below are supported by the README rather than sampled implementation excerpts; the keylogger implementation was read but its function bodies are not included here.
Main entry points: main.cpp WinMain runtime · telegram.cpp Telegram HTTPS API · c2_listener.cpp Command polling · keylogger.cpp Keyboard monitoring
Components 17
Runtime orchestration
- WinMain runtime
src/main.cpp - Shared configuration
include/config.h - Configuration decryption
src/crypto.cpp
Monitoring and capture
- Keyboard monitoring
src/keylogger.cpp - Clipboard tracking
src/keylogger.cpp - Screenshot capture
src/screenshot.cpp
Telegram communications
- Telegram HTTPS API
src/telegram.cpp - Command polling
src/c2_listener.cpp - Polling offset storage
src/c2_listener.cpp - Remote self-destruct
src/c2_listener.cpp
Persistence and recovery
- Startup persistence
src/persistence.cpp - Disk replicas
src/persistence.cpp - Defender exclusions
src/persistence.cpp - Watchdog recovery
src/persistence.cpp
Other components
- Remote operator
- Telegram Bot API
- Windows desktop
Connections 26
- WinMain runtime → Shared configuration: uses globals
src/main.cpp - WinMain runtime → Startup persistence: installs
src/main.cpp - WinMain runtime → Disk replicas: starts replication
src/main.cpp - WinMain runtime → Defender exclusions: adds exclusions
src/main.cpp - WinMain runtime → Screenshot capture: starts thread
src/main.cpp - WinMain runtime → Clipboard tracking: starts thread
src/main.cpp - WinMain runtime → Keyboard monitoring: installs hook
src/main.cpp - WinMain runtime → Command polling: starts thread
src/main.cpp - WinMain runtime → Watchdog recovery: checks periodically
src/main.cpp - WinMain runtime → Polling offset storage: loads and saves
src/main.cpp - Screenshot capture → Telegram HTTPS API: uploads photos
src/screenshot.cpp - Keyboard monitoring → Telegram HTTPS API: sends telemetry
README.md - Clipboard tracking → Telegram HTTPS API: sends clipboard data
README.md - Telegram HTTPS API → Telegram Bot API: sends HTTPS requests
src/telegram.cpp - Command polling → Telegram HTTPS API: downloads updates
src/c2_listener.cpp - Command polling → Polling offset storage: updates offset
src/c2_listener.cpp - Remote operator → Telegram Bot API: issues commands
README.md - Command polling → Remote self-destruct: dispatches nuke
src/c2_listener.cpp - Remote self-destruct → Startup persistence: removes startup entries
src/c2_listener.cpp - Remote self-destruct → Disk replicas: deletes replicas
src/c2_listener.cpp - Watchdog recovery → Startup persistence: restores startup
src/persistence.cpp - Watchdog recovery → Disk replicas: restores executable
src/persistence.cpp - Keyboard monitoring → Windows desktop: monitors input
README.md - Clipboard tracking → Windows desktop: reads clipboard
README.md - Screenshot capture → Windows desktop: captures desktop
src/screenshot.cpp - Configuration decryption → Shared configuration: decrypts settings
src/crypto.cpp