Skip to content

Real-time process monitoring tool | C++ / Windows API / Systems Security

Notifications You must be signed in to change notification settings

cristirvn/Sentinell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›‘οΈ Sentinell β€” Real-Time Process Monitor

A lightweight CLI tool written in C++ using the Windows API that monitors running processes in real-time and flags suspicious behavior using heuristic analysis.

Features

  • Real-time process monitoring via CreateToolhelp32Snapshot
  • Heuristic-based suspicion detection:
    • Processes running from AppData, Temp, Downloads, etc.
    • Orphan processes (parent PID doesn't exist)
    • Double file extensions (e.g., invoice.pdf.exe)
    • System process name impersonation (e.g., svchost.exe from wrong path)
    • Suspicious process name patterns
  • New process / terminated process detection (delta analysis)
  • Timestamped logging to file and console with color-coded output
  • Efficient polling with configurable intervals (<1% CPU overhead)
  • Graceful shutdown with Ctrl+C signal handling

Build Instructions

Prerequisites

  • Windows 10/11
  • CMake 3.15+
  • MSVC (Visual Studio 2019+) or MinGW-w64

Build

mkdir build
cd build
cmake ..
cmake --build . --config Release

Run

# Default (2-second polling interval)
./bin/Sentinell.exe

# Custom interval (500ms)
./bin/Sentinell.exe --interval 500

# Show all process activity
./bin/Sentinell.exe --log-all

# Help
./bin/Sentinell.exe --help

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€οΏ½οΏ½οΏ½β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   main.cpp  │────▢│ SentinellEngine  │────▢│ ProcessSnapshot  β”‚
β”‚  (CLI/Args) β”‚     β”‚  (Polling Loop)  β”‚     β”‚ (WinAPI Enum)    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                             β”‚
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚ ProcessAnalyzer  β”‚     β”‚     Logger       β”‚
                    β”‚  (Heuristics)    β”‚     β”‚ (File + Console) β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Heuristics Explained

# Heuristic Why It Matters
1 Suspicious path Malware often runs from %TEMP%, %APPDATA%
2 Orphan process No parent = possibly injected or detached
3 Suspicious name Known malware tool names
4 Double extension Social engineering trick (file.pdf.exe)
5 System impersonation svchost.exe from Desktop = red flag

Tech Stack

  • Language: C++17
  • APIs: Windows API (TlHelp32, Psapi, Kernel32)
  • Build: CMake
  • No external dependencies β€” pure Win32

License

MIT

About

Real-time process monitoring tool | C++ / Windows API / Systems Security

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published