A lightweight, real-time Sysmon event monitor and web dashboard for Windows.
tinySIEM reads from the Windows Event Log (Microsoft-Windows-Sysmon/Operational), streams events via Server-Sent Events to a modern browser-based dashboard, and lets you filter, search, and analyze system activity in real time.
| Feature | Description |
|---|---|
| Real-time Streaming | Events are pushed to the browser via SSE β no polling, no refresh needed. |
| Interactive Event Table | Sortable, paginated table with per-column filters for Event ID, Process, User, and Event Info. |
| Event Volume Chart | Live Chart.js visualization of event frequency over time. |
| Global Search | Full-text filter across all event fields. |
| Dark / Light Mode | Toggle between themes with system preference detection. |
| Quick Start Modal | Configure how much history to load β by event count or timeframe. |
| Restart Monitor | Reconfigure and restart the monitor without reloading the page. |
| One-Click Launch | run.ps1 handles admin elevation, venv creation, dependency install, and browser launch. |
- Windows 10 / 11 / Server β relies on the Windows Event Log API.
- Sysmon installed and running.
- Python 3.8+ β installed and available in your
PATH. - Administrator Privileges β required to read the Sysmon event channel.
# Clone the repository
git clone https://github.com/yourusername/tinysiem.git
cd tinysiem
# Run the app (handles everything automatically)
.\run.ps1That's it. The script will:
- β¬οΈ Request Administrator privileges (UAC prompt)
- π¦ Create a Python virtual environment if one doesn't exist
- π₯ Install dependencies from
requirements.txt - π Launch the Flask server on
http://localhost:5000 - π₯οΈ Open your default browser after 5 seconds
Tip
On subsequent runs, the venv is reused β startup is near-instant.
-
Start Monitoring β when the app launches, a Quick Start modal lets you choose:
- Event Count β load the last N events (default: 500)
- Timeframe β load events from the last N minutes/hours/days (e.g.
30m,2h,1d)
-
Filter Events β click the β· filter icon on any column header to filter by specific values, or use the Global Filter search box in the top bar.
-
Toggle Live Mode β use the Live toggle in the nav bar to pause/resume the real-time event stream.
-
Chart β toggle the event volume chart on/off with the Chart switch.
-
Restart β click Restart to reconfigure the monitor (change count/timeframe) without a full page reload.
tinySIEM
βββ server/ # Python backend package
β βββ __init__.py # Flask app factory
β βββ __main__.py # Entry point (python -m server)
β βββ config.py # App configuration constants
β βββ monitor.py # Sysmon event reader & subscriber (win32evtlog)
β βββ event_parser.py # XML β dict event parser
β βββ client_manager.py # SSE client manager with broadcast & history buffer
β βββ routes.py # Flask routes (Blueprint)
β βββ utils.py # Admin privilege check utilities
βββ run.ps1 # One-click launcher (elevation + venv + deps)
βββ requirements.txt # Runtime dependencies (Flask, pywin32)
βββ requirements-dev.txt # Build tool dependencies
βββ templates/
β βββ index.html # Dashboard SPA (Tailwind CSS + Chart.js)
βββ static/
βββ css/style.css # Custom styles
βββ js/ # Modular frontend (app, chart, constants, events, filters, table, tooltip, startup, stats, processtree, utils)
βββ lib/ # Vendored libraries (Tailwind, Chart.js, D3.js, Font Awesome, Google Fonts)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Windows Event Log β
β Microsoft-Windows-Sysmon/Operational β
ββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββ β
β Historical events β New events (subscription)
β (EvtQuery + EvtNext) β (EvtSubscribe callback)
βΌ βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β SysmonMonitor (monitor.py) β
β βββββββββββββββββββββββ ββββββββββββββββββββββββββββ β
β β read_past_events() β β _on_event() callback β β
β β (count / timeframe)β β (real-time push) β β
β βββββββββββ¬ββββββββββββ ββββββββββββββ¬ββββββββββββββ β
β ββββββββββββββββ¬βββββββββββββββ β
β βΌ β
β ββββββββββββββββββββββββββ β
β β EventParser.parse() β β
β β XML βββΊ Python dict β β
β ββββββββββββββ¬ββββββββββββ β
βββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββ
βΌ
ββββββββββββββββββββββββββ
β Thread-Safe Queue β
β (maxsize=5000) β
ββββββββββββββ¬ββββββββββββ
β
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Distributor Thread (app.py) β
β Moves events from queue βββΊ ClientManager β
βββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββ β
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β ClientManager (socket_service.py) β
β ββββββββββββββββββββ βββββββββββββββββββββββββββββββββββββββββββ β
β β History Buffer β β Broadcast to connected clients β β
β β (deque, last 500)β β β β
β ββββββββββββββββββββ β Client 1 Queue βββΊ SSE /stream βββΊ π β β
β β Client 2 Queue βββΊ SSE /stream βββΊ π β β
β β Client N Queue βββΊ SSE /stream βββΊ π β β
β βββββββββββββββββββββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Browser Dashboard (index.html + JS modules) β
β ββββββββββββ ββββββββββββββββ ββββββββββββ βββββββββββββββββββββββββ β
β β EventSrc β β Event Table β β Chart.js β β Filters / Search β β
β β listener βββΊβ (paginated) β β (volume) β β (ID, Process, Userβ¦) β β
β ββββββββββββ ββββββββββββββββ ββββββββββββ βββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
SysmonMonitorreads historical events and subscribes to new ones viawin32evtlog.- Parsed events are placed into a thread-safe queue.
- A distributor thread moves events from the queue to
ClientManager. ClientManagerbroadcasts to all connected SSE clients and maintains a history ring buffer so new clients receive recent events immediately.
Edit config.py to adjust defaults:
class Config:
LOG_TYPE = 'Microsoft-Windows-Sysmon/Operational' # Event channel
HISTORY_SIZE = 500 # Events kept in memory for new clients
MONITOR_QUEUE_SIZE = 5000 # Internal queue capacity
DEBUG = True # Flask debug mode
HOST = '0.0.0.0' # Listen on all interfaces
PORT = 5000 # Web server port# Manual setup (if not using run.ps1)
python -m venv venv
.\venv\Scripts\Activate
pip install -r requirements.txt
# Run with auto-reload disabled (required for threading)
python -m serverNote
The Flask reloader is intentionally disabled (use_reloader=False) because the app uses background threads for event monitoring. Hot-reload would restart those threads unexpectedly.
The project includes build scripts for packaging as a standalone .exe:
| Script | Tool |
|---|---|
build_pyinstaller.ps1 |
PyInstaller |
build_nuitka.ps1 |
Nuitka |
build_cx.ps1 |
cx_Freeze |
| Problem | Solution |
|---|---|
| UAC prompt denied | Right-click run.ps1 β Run with PowerShell, then accept the elevation prompt. |
| "Python is not installed or not in PATH" | Install Python 3.8+ and ensure Add to PATH is checked. |
| "App script not found" | Make sure you're running run.ps1 from the project root directory. |
| No events appear | Verify Sysmon is installed and running: sc query Sysmon or sc query Sysmon64. |
| Port 5000 already in use | Change PORT in config.py or stop the other process using port 5000. |
| pip install fails with connection error | Check your internet connection. A firewall or proxy may be blocking PyPI. |
This project is licensed under the MIT License.