WinSentinel.Cli
1.16.1
dotnet tool install --global WinSentinel.Cli --version 1.16.1
dotnet new tool-manifest
dotnet tool install --local WinSentinel.Cli --version 1.16.1
#tool dotnet:?package=WinSentinel.Cli&version=1.16.1
nuke :add-package WinSentinel.Cli --version 1.16.1
<div align="center">
π‘οΈ WinSentinel
Your Always-On Windows Security Agent
Not just an auditor - a living agent that monitors, detects, correlates, and responds 24/7.
Real-time threat detection β’ 13 audit modules β’ Auto-remediation β’ Chat control plane β’ AI-powered correlation β’ Compliance profiles
π Quick Start Β· π¦ Install Β· π Docs Β· π Issues Β· π Changelog
</div>
Why WinSentinel?
Most Windows security tools run once and give you a report. WinSentinel is different:
- Always on - runs as a Windows Service, monitoring your system 24/7
- Correlates events - doesn't just flag individual events, it detects multi-stage attack patterns
- Takes action - auto-remediates threats with full undo support
- Speaks your language - chat-based control plane with 25+ commands plus natural language
- Compliance-aware - built-in profiles for Home, Enterprise, HIPAA, PCI-DSS, and CIS L1
- Deeply tested - 4,173 automated tests across 128 test files
ποΈ Architecture
Two-process design: a background agent (Windows Service) and a WPF dashboard connected via named pipe IPC.
graph TB
subgraph Agent["π‘οΈ WinSentinel Agent (Windows Service)"]
PM[βοΈ Process Monitor]
FM[π File System Watcher]
EL[π Event Log Listener]
NM[π Network Monitor]
SA[π Scheduled Auditor<br/>13 modules]
AB[π§ Agent Brain +<br/>Threat Correlator]
AR[π§ Auto-Remediator<br/>7 actions + undo]
IS[π Input Sanitizer]
IPC_S[π‘ IPC Server]
end
subgraph Dashboard["π» WinSentinel Dashboard (WPF)"]
LD[π Live Dashboard +<br/>Score Gauge]
TF[β οΈ Real-time Threat Feed]
CC[π¬ Chat Control Plane]
SH[π Score History & Trends]
CP[π Compliance Profiles]
FR[π Finding Rules]
PC[βοΈ Policy Configuration]
ER[π€ Export Reports]
end
PM & FM & EL & NM -->|events| AB
SA -->|findings| AB
AB -->|threats| AR
AB -->|alerts| IPC_S
IPC_S <-->|Named Pipe IPC| Dashboard
Threat Detection Flow
flowchart LR
A[Raw Events] --> B{Monitor<br/>Modules}
B --> C[Process<br/>Events]
B --> D[File<br/>Events]
B --> E[EventLog<br/>Events]
B --> F[Network<br/>Events]
C & D & E & F --> G[π§ Threat<br/>Correlator]
G -->|Single event| H[Classify &<br/>Score]
G -->|Multi-event<br/>pattern| I[Attack Chain<br/>Detection]
H & I --> J{Severity?}
J -->|Critical/High| K[β‘ Auto-Remediate]
J -->|Medium| L[β οΈ Alert User]
J -->|Low/Info| M[π Log]
K --> N[Undo Log]
The agent runs continuously - even with the dashboard closed - watching processes, file changes, event logs, and network activity. When it detects suspicious behavior, it correlates events, classifies threats, and auto-remediates based on configurable policies.
β‘ Features at a Glance
| Category | What You Get |
|---|---|
| π 4 Real-Time Monitors | Process creation/termination, file system changes, Windows Event Log, network connections - always watching |
| π§ AI-Powered Brain | Correlates individual events into attack chains. Detects multi-stage attacks that single-event analysis misses |
| π§ 7 Auto-Remediation Actions | Kill process, quarantine file, block IP, disable account, restore hosts, re-enable Defender, revert registry - all with undo |
| π¬ Chat Control Plane | 25+ commands plus natural language. Run audits, query threats, configure policies - from the chat panel |
| π 13 Audit Modules | Firewall, Updates, Defender, Accounts, Network, Processes, Startup, System, Privacy, Browser, App Security, Encryption, Event Log |
| π Compliance Profiles | Home, Enterprise, HIPAA, PCI-DSS, CIS L1 - context-aware scoring with per-profile severity adjustments |
| π Finding Suppression | Ignore/suppress known-acceptable findings with regex rules, expiration dates, and audit trail |
| π Score History | SQLite-backed audit tracking with trends. See your security posture change over time |
| π€ Export Reports | HTML, JSON, Text, Markdown - save and share results |
| π Toast Notifications | Critical finding alerts via Windows notification center |
| π» CLI Mode | Full CLI (winsentinel.exe) for scripting, automation, and CI/CD gate checks |
| βοΈ System Tray | Minimize to tray and run silently in the background |
| π‘οΈ Input Sanitization | Centralized security layer prevents command injection in all user-facing inputs |
πΈ Sample Audit Output
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β WinSentinel Security Audit Report β
β 2026-02-21 22:35:00 PST β
β Profile: Enterprise β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ£
β β
β Security Score: 92 / 100 Grade: A β
β ββββββββββββββββββββββββββββββββββ 92% β
β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ£
β Module Score Status β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ£
β π₯ Firewall 100 ββββββββββ PASS β
β π Updates 95 ββββββββββ PASS β
β π‘οΈ Defender 100 ββββββββββ PASS β
β π€ Accounts 100 ββββββββββ PASS β
β π Network 90 ββββββββββ PASS β
β βοΈ Processes 90 ββββββββββ PASS β
β π Startup 95 ββββββββββ PASS β
β π» System 100 ββββββββββ PASS β
β π Privacy 95 ββββββββββ PASS β
β π Browser 85 ββββββββββ PASS β
β π¦ App Security 90 ββββββββββ PASS β
β π Encryption 80 ββββββββββ WARN β
β π Event Log 85 ββββββββββ PASS β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ£
β Findings: 65 total | 0 critical | 5 warnings β
β Suppressed: 2 (accepted risk) β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π Quick Start
Prerequisites
- Windows 10 or 11 (x64)
- .NET 8 SDK (for building from source)
Clone, Build & Run
git clone https://github.com/sauravbhattacharya001/WinSentinel.git
cd WinSentinel
# Build
dotnet build WinSentinel.sln -p:Platform=x64
# Run the dashboard
dotnet run --project src/WinSentinel.App -p:Platform=x64
# Run tests (4,173 tests)
dotnet test -p:Platform=x64
Quick Audit (no build needed)
.\RunAudit.ps1
π¦ Installation
Option 1: MSIX Installer
# Downloads cert, installs MSIX - one command
.\Install-WinSentinel.ps1
Option 2: Windows Service
dotnet build src/WinSentinel.Agent -c Release
# Install (requires Administrator)
.\Install-Agent.ps1 -Install
# Check status
.\Install-Agent.ps1 -Status
Option 3: Build MSIX from Source
cd src\WinSentinel.Installer
.\Build-Msix.ps1
# β dist\WinSentinel.msix
π Real-Time Monitors
| Monitor | What It Watches | Key Detections |
|---|---|---|
| βοΈ Process | Process creation & termination | Suspicious executables, unsigned binaries, temp/download path launches, known-bad names |
| π File System | File create/modify/delete/rename | System directory changes, hosts file tampering, startup folder modifications, suspicious DLLs |
| π Event Log | Windows Security & System logs | Failed logons, privilege escalation, audit policy changes, service installations, account modifications |
| π Network | Active connections & listening ports | New listeners, known-bad IPs, unusual outbound ports, DNS anomalies |
π The 13 Audit Modules
| # | Module | What It Scans |
|---|---|---|
| 1 | π₯ Firewall | All profile states, rule analysis, dangerous port exposure (RDP 3389, SMB 445, Telnet 23) |
| 2 | π Updates | Windows Update service, pending updates, last install date, update source config |
| 3 | π‘οΈ Defender | Real-time protection, cloud protection, behavior monitoring, definition age, tamper protection |
| 4 | π€ Accounts | Local users, admin audit, password policies, guest account, empty passwords |
| 5 | π Network | Open ports, SMB/RDP exposure, LLMNR/NetBIOS poisoning, Wi-Fi security, ARP, IPv6 |
| 6 | βοΈ Processes | Unsigned executables, suspicious paths, high-privilege monitoring |
| 7 | π Startup | Startup programs, scheduled tasks, Run/RunOnce keys, service types |
| 8 | π» System | OS build, Secure Boot, BitLocker, UAC level, RDP config, DEP/NX |
| 9 | π Privacy | Telemetry, advertising ID, location tracking, clipboard sync, activity history |
| 10 | π Browser | Chrome/Edge settings, dangerous extensions, saved passwords, update status |
| 11 | π¦ App Security | Outdated software, EOL flagging, installed program analysis |
| 12 | π Encryption | BitLocker, EFS, certificate store, TPM status |
| 13 | π Event Log | Failed logins, suspicious events, audit policy gaps |
π Compliance Profiles
Built-in profiles adjust severity weights and scoring for different security contexts:
| Profile | Target Environment | Key Adjustments |
|---|---|---|
| π Home | Personal/home use | Relaxed - info-level items don't penalize |
| π’ Enterprise | Corporate workstations | Moderate - emphasizes patching, network, accounts |
| π₯ HIPAA | Healthcare environments | Strict - encryption, audit logging, access control weighted heavily |
| π³ PCI-DSS | Payment card processing | Strict - network segmentation, firewall, patching critical |
| π CIS L1 | CIS Benchmarks Level 1 | Comprehensive - baseline security for all organizations |
Switch profiles via the dashboard or CLI to see how your system scores under different compliance frameworks.
π§ Auto-Remediation
7 autonomous response actions, each with full undo:
| Action | What It Does | Reversible |
|---|---|---|
| Kill Process | Terminates suspicious process | - |
| Quarantine File | Moves to quarantine directory | β |
| Block IP | Creates firewall block rule | β |
| Disable Account | Disables compromised account | β |
| Restore Hosts | Reverts hosts file to clean state | β |
| Re-enable Defender | Turns real-time protection back on | - |
| Revert Registry | Undoes malicious registry changes | β |
π¬ Chat Control Plane
25+ commands plus natural language understanding:
> status # Agent uptime, active monitors
> threats # Recent threat events
> audit # Run full 13-module audit
> audit firewall # Run specific module
> score # Current score and grade
> history # Score trend over time
> monitor status # All 4 monitor states
> start monitor process # Start specific monitor
> policy # Show current policies
> set risk tolerance high # Adjust sensitivity
> quarantine # List quarantined files
> undo <id> # Reverse a remediation action
> journal # Agent activity log
> export html # Export report
> fix all # Auto-fix all fixable findings
Natural language works too:
> Why is my network score low?
> What's the most dangerous thing on my system?
> Show me failed login attempts from today
π» CLI Reference
# Full audit
winsentinel --audit
# JSON output for scripting
winsentinel --audit --json
# Specific modules only
winsentinel --audit --modules firewall,network,privacy
# CI/CD gate: fail if score < 90
winsentinel --audit --threshold 90
# Auto-fix everything
winsentinel --fix-all
# Compare last two runs
winsentinel --history --compare
# Show what changed
winsentinel --history --diff
| Flag | Description |
|---|---|
--audit |
Run full security audit |
--score |
Print score and grade only |
--fix-all |
Auto-fix all fixable findings |
--history |
View past audit runs |
--json / --html / --md |
Output format |
--output <file> |
Save to file |
--modules <list> |
Comma-separated module list |
--threshold <n> |
Fail if score below n |
--compare / --diff |
Compare runs or show deltas |
--summary |
Executive security summary (plain-English brief) |
--quiet |
Score + exit code only |
Exit codes: 0 = pass, 1 = warnings, 2 = critical, 3 = error
π Scoring
Starts at 100, deductions by severity:
| Severity | Deduction | Example |
|---|---|---|
| π΄ Critical | -15 pts | Real-time protection disabled, firewall off |
| π‘ Warning | -5 pts | LLMNR enabled, outdated definitions |
| π΅ Info | -1 pt | Telemetry at default level |
| β Pass | 0 pts | Secure Boot enabled, UAC on |
Grades: A+ (95+) Β· A (90-94) Β· B (80-89) Β· C (70-79) Β· D (60-69) Β· F (<60)
Compliance profiles adjust these weights contextually - a finding that's info-level for Home use might be a warning under HIPAA.
ποΈ Project Structure
WinSentinel.sln
βββ src/
β βββ WinSentinel.Core/ # Security audit engine (13 modules)
β β βββ Audits/ # Firewall, Network, Defender, etc.
β β βββ Models/ # AuditResult, Finding, SecurityReport
β β βββ Services/ # AuditEngine, Orchestrator, Scorer
β β βββ Helpers/ # Shell, PowerShell, Registry, WMI
β β
β βββ WinSentinel.Agent/ # Always-on agent (Windows Service)
β β βββ Modules/ # 4 real-time monitors
β β βββ Services/ # Brain, Correlator, Remediator, Chat
β β β # Journal, Policy, IPC, Sanitizer
β β βββ Ipc/ # Named pipe protocol
β β
β βββ WinSentinel.App/ # WPF dashboard (MVVM)
β β βββ Views/ # Dashboard, Chat, Policy, Compliance
β β βββ ViewModels/ # CommunityToolkit.Mvvm
β β βββ Services/ # IPC client, ChatAI
β β
β βββ WinSentinel.Cli/ # Command-line interface
β βββ WinSentinel.Installer/ # MSIX packaging
β
βββ tests/
β βββ WinSentinel.Tests/ # 4,173 xUnit tests (128 files)
β
βββ RunAudit.ps1 # Quick audit script
βββ Install-Agent.ps1 # Service installer
βββ Install-WinSentinel.ps1 # MSIX installer
βββ Fix-Network.ps1 # Network security fix script
By the numbers: 72k+ lines of source code, 50k+ lines of tests, 370+ commits, 128 test files.
βοΈ Tech Stack
| Component | Technology |
|---|---|
| Runtime | .NET 8 (LTS) |
| UI | WPF + MVVM (CommunityToolkit.Mvvm) |
| Language | C# 12 |
| Agent | Microsoft.Extensions.Hosting + Windows Services |
| IPC | Named Pipes (System.IO.Pipes) |
| Database | SQLite (Microsoft.Data.Sqlite) |
| Testing | xUnit β 4,173 tests |
| Security | CodeQL scanning, input sanitization |
| Packaging | MSIX with code signing |
| CI/CD | GitHub Actions (build, test, release, CodeQL) |
| AI | Ollama (local LLM) + built-in rule engine |
π Releases
| Version | Date | Highlights |
|---|---|---|
| v1.4.2 | 2026-04-16 | Test coverage improvements |
| v1.4.1 | 2026-04-02 | NuGet packaging & CI fixes |
| v1.4.0 | 2026-03-29 | Major feature release |
| v1.3.0 | 2026-03-20 | CLI power tools & hardened security |
| v1.2.0 | 2026-03-16 | Deep system auditing & threat intelligence |
| v1.1.0 | 2026-02-20 | Compliance profiles, finding suppression, remediation checklists |
| v1.0.0 | 2026-02-17 | Initial release β always-on agent, 4 monitors, AI correlator, 13 audit modules |
π Security Model
WinSentinel follows a defense-in-depth approach:
| Layer | Protection |
|---|---|
| Input Sanitization | All user inputs (chat, CLI, config) pass through a centralized InputSanitizer that blocks command injection, path traversal, and control characters |
| Least Privilege | The dashboard runs as the current user. Only the agent service and remediation actions require Administrator |
| Undo Journal | Every auto-remediation action is logged with full undo metadata - quarantined files can be restored, blocked IPs unblocked, disabled accounts re-enabled |
| Named Pipe IPC | DashboardβAgent communication uses local-only named pipes (no network exposure). The pipe is ACL-restricted to the installing user and SYSTEM |
| Finding Suppression Audit Trail | When you suppress a finding, WinSentinel records who, when, why, and expiration - suppressions don't silently hide real threats |
| No Outbound Telemetry | WinSentinel sends zero data home. All analysis is local. AI features use local Ollama models only |
Reporting vulnerabilities: See SECURITY.md for responsible disclosure guidelines.
β Troubleshooting
<details> <summary><strong>Agent service won't start</strong></summary>
- Ensure you're running PowerShell as Administrator
- Check .NET 8 is installed:
dotnet --list-runtimes - Review Windows Event Viewer β Application log for
WinSentinel.Agenterrors - Try running the agent manually first:
dotnet run --project src/WinSentinel.Agent
</details>
<details> <summary><strong>Dashboard can't connect to agent</strong></summary>
- Verify the agent service is running:
.\Install-Agent.ps1 -Status - Named pipe connections require both processes to run under the same user (or SYSTEM)
- Some antivirus software blocks named pipe creation - add an exclusion for
WinSentinel.Agent.exe
</details>
<details> <summary><strong>False positives in audit results</strong></summary>
- Use Finding Rules in the dashboard to suppress known-acceptable findings
- Switch to a more appropriate Compliance Profile (e.g., Home vs Enterprise)
- Use
--modulesflag in CLI to skip irrelevant audit modules - Open an issue if a detection rule is genuinely wrong
</details>
<details> <summary><strong>Build fails on x86 or ARM</strong></summary>
WinSentinel targets x64 only. Always pass -p:Platform=x64:
dotnet build WinSentinel.sln -p:Platform=x64
dotnet test -p:Platform=x64
</details>
<details> <summary><strong>Network score seems wrong</strong></summary>
- Run
.\Fix-Network.ps1to apply recommended network hardening - Some findings (LLMNR, NetBIOS) require registry changes + reboot
- VPN adapters can trigger false "open port" findings - suppress with Finding Rules
</details>
π€ Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Test your changes (
dotnet test -p:Platform=x64) - Push and open a Pull Request
Ideas: plugin system for custom modules, Linux port, UI themes, localization, additional compliance profiles.
π License
MIT License - see LICENSE for details.
<div align="center">
Built with C# on .NET 8 Β· 72k+ LOC Β· 4,173 tests Β· Always watching π‘οΈ
β Star Β· π Report Bug Β· π‘ Request Feature
</div>
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.16.1 | 85 | 5/19/2026 |
| 1.16.0 | 93 | 5/17/2026 |
| 1.15.1 | 102 | 5/2/2026 |
| 1.15.0 | 92 | 4/30/2026 |
| 1.14.0 | 96 | 4/29/2026 |
| 1.13.0 | 89 | 4/29/2026 |
| 1.12.0 | 105 | 4/28/2026 |
| 1.11.0 | 102 | 4/25/2026 |
| 1.10.0 | 93 | 4/25/2026 |
| 1.9.0 | 95 | 4/24/2026 |
| 1.8.0 | 93 | 4/22/2026 |
| 1.7.0 | 92 | 4/21/2026 |
| 1.6.0 | 100 | 4/20/2026 |
| 1.5.1 | 97 | 4/20/2026 |
| 1.5.0 | 90 | 4/19/2026 |
| 1.4.5 | 99 | 4/19/2026 |
| 1.4.4 | 95 | 4/17/2026 |
| 1.4.3 | 85 | 4/17/2026 |
| 1.4.2 | 91 | 4/16/2026 |
| 1.4.1 | 110 | 4/2/2026 |