ShadowStrikePhantom
Architecture

How PhantomSensor works.

A complete walkthrough of every kernel and user-space subsystem — from the UEFI ELAM driver through 18 kernel modules into 23 user-space detection engines. Every module is open source, every detection decision is auditable.

18
Kernel subsystems
23
User-space modules
1.5M+
Lines of code
100%
Open source
Event Data Flow
Kernel Event
PhantomSensor Callback
Behavioral Engine
Communication Port
User-Mode Service
Scan Engine
ThreatIntel Lookup
Allow / Block / Quarantine
Kernel Space · Ring 0
18 subsystems

Driver Core

Minifilter · Altitude 328000WDK
ShadowSensor/Core/

Foundation of the entire platform. FilterRegistration establishes the minifilter at altitude 328000 and registers 14 operation callbacks via FLT_REGISTRATION. Manages per-stream and per-file FLT contexts, global state (Globals.h), and the FilterConnectPort communication channel to user space.

Key files
  • ·DriverEntry.c — driver initialization, WDF setup
  • ·FilterRegistration.c — FLT_REGISTRATION, 14 operation callbacks
  • ·Globals.h — shared global state, synchronization primitives

ELAM Driver

Early Launch Anti-MalwareBoot
ShadowSensor/ShadowSensorELAM/

Loads before any third-party boot driver. Validates driver certificate hashes against an embedded policy (Good / Bad / Unknown classification) before the Windows kernel hands off to the rest of the boot stack. Includes a measured-boot integration and boot-time threat detection.

Key files
  • ·ELAMDriver.c — ELAM registration, policy initialization
  • ·ELAMCallbacks.c — PsSetLoadImageNotifyRoutine at boot
  • ·BootDriverVerify.c — WHQL + embedded signature validation
  • ·BootThreatDetector.c — early-stage threat heuristics

File System Callbacks

Pre/Post Operation LayerMinifilter
ShadowSensor/Callbacks/FileSystem/

Intercepts all file system I/O. Pre-create inspects file opens before access is granted. Pre-write and post-write monitor data writes for encryption patterns. PreSetInfo catches rename/delete operations used in ransomware. FileBackupEngine provides in-kernel backup copy on critical modifications. NamedPipeMonitor tracks inter-process pipe communication.

Key files
  • ·PreCreate.c / PostCreate.c — file open interception, IRP_MJ_CREATE
  • ·PreWrite.c / PostWrite.c — write monitoring, entropy analysis hooks
  • ·PreSetInfo.c — rename/delete interception (ransomware pattern)
  • ·PreAcquireSection.c — section/mapping operations
  • ·FileBackupEngine.c — kernel-mode critical-file snapshot
  • ·NamedPipeMonitor.c — named pipe creation/connection tracking
  • ·USBDeviceControl.c — USB volume mount interception

Process / Thread / Image Callbacks

Lifecycle MonitoringPs* APIs
ShadowSensor/Callbacks/Process/

Comprehensive process and thread lifecycle monitoring. Tracks parent-child chains for orphan injection detection. Parses command lines for LOLBins and suspicious flags. TokenAnalyzer watches for privilege escalation and token manipulation. WSLMonitor handles Linux-under-Windows evasion attempts. AMSI bypass detector catches attempts to neutralize the Antimalware Scan Interface.

Key files
  • ·ProcessNotify.c — PsSetCreateProcessNotifyRoutineEx2
  • ·ThreadNotify.c — PsSetCreateThreadNotifyRoutine (remote thread)
  • ·ImageNotify.c — PsSetLoadImageNotifyRoutineEx (DLL/EXE loads)
  • ·ParentChainTracker.c — process tree ancestry analysis
  • ·CommandLineParser.c — LOLBin and suspicious argument detection
  • ·TokenAnalyzer.c — token impersonation, privilege monitoring
  • ·PrivilegeMonitor.c — SeDebugPrivilege and elevation detection
  • ·HandleTracker.c — cross-process handle acquisition tracking
  • ·ProcessRelationship.c — parent spoofing detection
  • ·AmsiBypassDetector.c — AMSI neutralization attempts
  • ·ClipboardMonitor.c — clipboard injection/exfiltration detection
  • ·AppControl.c — application allowlisting enforcement hooks
  • ·WSLMonitor.c — WSL process boundary crossing detection

Object Callbacks

Handle-Level ProtectionObRegisterCallbacks
ShadowSensor/Callbacks/Object/

Registers with the Windows Object Manager to intercept handle operations. Strips PROCESS_VM_WRITE and PROCESS_VM_OPERATION from handles to protected processes. Independently protects threads from injection via handle. Acts as the last line of defense against tools that call OpenProcess directly.

Key files
  • ·ObjectCallback.c — OB_OPERATION_HANDLE_CREATE/DUPLICATE handler
  • ·ProcessProtection.c — strips injection-capable access rights
  • ·ThreadProtection.c — blocks thread handle abuse

Registry Callback

Persistence & Config MonitoringCmRegisterCallbackEx
ShadowSensor/Callbacks/Registry/

Monitors all registry operations system-wide via CmRegisterCallbackEx. Detects persistence installation (Run keys, services, scheduled task XML blobs), security setting modifications, and attempts to tamper with the driver's own registry entries.

Key files
  • ·RegistryCallback.c — CmRegisterCallbackEx pre/post operations

Memory Monitor

Injection & Shellcode DetectionVAD / MDL
ShadowSensor/Memory/

Tracks the Virtual Address Descriptor tree in real-time. Flags PAGE_EXECUTE_READWRITE allocations by foreign processes. Detects classic injection (VirtualAllocEx→WriteProcessMemory→CreateRemoteThread), process hollowing (image section replacement), reflective DLL (PE header in anonymous private region), ROP chains, and heap spray allocation patterns.

Key files
  • ·VadTracker.c — VAD insertion monitor, RWX flag analysis
  • ·InjectionDetector.c — multi-step injection correlation
  • ·HollowingDetector.c — section+unmap+rewrite pattern
  • ·ShellcodeDetector.c — PE header + stub scanning in anonymous memory
  • ·MemoryScanner.c — kernel-mode memory region scanning
  • ·MemoryMonitor.c — aggregate memory event orchestration
  • ·SectionTracker.c — image section mapping operations
  • ·ROPDetector.c — gadget chain signature detection
  • ·HeapSpray.c — allocation volume and pattern analysis

Syscall Monitor

Direct Syscall & Gate DetectionRing 0
ShadowSensor/Syscall/

Detects adversaries bypassing user-space hooks entirely. Identifies syscall instructions issued outside of NTDLL text section. Catches 32→64-bit Heaven's Gate transitions. Verifies NTDLL .text integrity against the on-disk image to detect patching. Analyzes call-stack return address origins to flag unusual execution paths.

Key files
  • ·DirectSyscallDetector.c — syscall instruction origin verification
  • ·HeavensGateDetector.c — far-call WoW64 transition monitoring
  • ·NtdllIntegrity.c — in-memory vs on-disk NTDLL comparison
  • ·CallstackAnalyzer.c — return address chain origin analysis
  • ·SyscallMonitor.c — event aggregation and dispatch
  • ·SyscallTable.c — SSDT reference table maintenance

Behavioral Engine

Kernel Rule Engine · MITRE MappingATT&CK
ShadowSensor/Behavioral/

Rule-driven engine that correlates kernel events across process trees and time windows. Evaluates YAML-defined multi-step rules to recognize kill-chain sequences. Assigns ATT&CK technique IDs to every fired detection and computes a composite threat score (0–100). IOCMatcher cross-references events against in-memory IOC structures loaded from the user-space ThreatIntel pipeline.

Key files
  • ·BehaviorEngine.c — rule evaluation loop, event window management
  • ·RuleEngine.c — YAML-to-bytecode compiled rule evaluation
  • ·AttackChainTracker.c — multi-step kill chain sequencing
  • ·MITREMapper.c — technique ID tagging per detection
  • ·ThreatScoring.c — weighted composite score 0–100
  • ·AnomalyDetector.c — baseline deviation scoring
  • ·IOCMatcher.c — in-kernel IOC cross-reference
  • ·PatternMatcher.c — byte/string sequence matching

Network Filter (Kernel)

Kernel-Mode Network StackWFP / NDIS
ShadowSensor/Network/

Provides kernel-level visibility into network activity. C2Detection identifies beacon patterns by timing, jitter, and payload regularity. DnsMonitor inspects DNS query names for DGA patterns and known C2 domains. SSLInspection enables TLS metadata analysis. DataExfiltration monitors volume and destination patterns for data theft.

Key files
  • ·C2Detection.c — beacon timing, jitter, and protocol fingerprinting
  • ·DnsMonitor.c — DGA detection, C2 domain matching
  • ·DataExfiltration.c — outbound volume and destination analysis
  • ·NetworkFilter.c — WFP callout driver, packet interception
  • ·ConnectionTracker.c — per-process connection state table
  • ·NetworkReputation.c — IP/domain reputation checking
  • ·PortScanner.c — local port scan detection
  • ·SSLInspection.c — TLS metadata and certificate inspection

ETW Infrastructure

Event Tracing for WindowsTelemetry
ShadowSensor/ETW/

Implements a full ETW provider/consumer stack within the driver. Generates structured events for every significant detection action and feeds them to the user-space telemetry pipeline. ManifestGenerator produces the event manifest for tools like WPP and PerfView.

Key files
  • ·ETWProvider.c — kernel ETW provider registration
  • ·ETWConsumer.c — in-driver event consumption and routing
  • ·EventSchema.c — event structure and field definitions
  • ·TelemetryEvents.c — pre-defined event emission helpers
  • ·ManifestGenerator.c — manifest XML generation for tooling
  • ·Trace.c / WppConfig.h — WPP tracing integration

Communication Layer

Kernel ↔ User BridgeFltPort
ShadowSensor/Communication/

Manages the bidirectional FilterConnectPort channel between the kernel driver and the user-space service. ScanBridge serializes scan requests and responses. TelemetryBuffer batches events to minimize context-switch overhead. Encryption module secures the IPC channel.

Key files
  • ·CommPort.c — FltCreateCommunicationPort, FltSendMessage
  • ·MessageHandler.c — request/response dispatcher
  • ·MessageQueue.c — lock-free kernel-mode message queue
  • ·ScanBridge.c — scan request/result serialization
  • ·TelemetryBuffer.c — event batching and flush scheduling
  • ·Compression.c — in-kernel message compression
  • ·Encryption.c — IPC channel encryption

ALPC Monitor

Advanced Local IPC MonitoringLPC/ALPC
ShadowSensor/ALPC/

Monitors Advanced Local Procedure Call port activity. ALPC is widely used by Windows subsystems and frequently abused by malware for lateral movement and privilege escalation. AlpcPortMonitor tracks port creation, connection establishment, and message content.

Key files
  • ·AlpcPortMonitor.c — port creation and connection tracking
  • ·AlpcTypes.h — ALPC kernel structure definitions

KTM Monitor

Kernel Transaction ManagerTxF/TxR
ShadowSensor/Transactions/

Monitors Kernel Transaction Manager activity (TxF/TxR). Transactional NTFS is exploited by some evasion techniques to write files that vanish upon rollback, bypassing post-write scanning. KtmMonitor detects suspicious transacted operations.

Key files
  • ·KtmMonitor.c — TxF/TxR transaction lifecycle monitoring

Self-Protection

Anti-Tamper · Driver IntegrityAnti-Tamper
ShadowSensor/SelfProtection/

Prevents the driver from being unloaded, patched, or debugged. AntiUnload blocks FltUnregisterFilter calls from untrusted callers. CallbackProtection prevents other drivers from deregistering Phantom's callbacks. IntegrityMonitor checks the driver's own .text section at runtime.

Key files
  • ·AntiUnload.c — FltUnregisterFilter blocking, reference counting
  • ·CallbackProtection.c — registered callback table protection
  • ·HandleProtection.c — driver object handle blocking
  • ·FileProtection.c — driver binary file tamper protection
  • ·IntegrityMonitor.c — runtime .text section hash verification
  • ·SelfProtect.c — combined self-defense orchestration
  • ·AntiDebug.c — kernel-mode debug detection and prevention
  • ·FirmwareIntegrity.c — UEFI variable monitoring

Synchronization & Threading

Kernel Concurrency PrimitivesConcurrency
ShadowSensor/Sync/

Provides reusable concurrency infrastructure used throughout the driver. SpinLock wraps KSPIN_LOCK with safe acquire/release helpers. A kernel thread pool dispatches deferred work items. TimerManager schedules periodic tasks like cache expiry and integrity checks.

Key files
  • ·SpinLock.c — KSPIN_LOCK acquire/release wrappers
  • ·ThreadPool.c — kernel worker thread pool
  • ·WorkQueue.c — work item submission and dispatch
  • ·AsyncWorkQueue.c — async event processing queue
  • ·DeferredProcedure.c — DPC (Deferred Procedure Call) helpers
  • ·TimerManager.c — KTIMER-based scheduled task management

Scan Cache & Exclusions

SHA-256 Result Caching · Allow-ListingCache
ShadowSensor/Cache/

ScanCache caches scan outcomes keyed by SHA-256 file hash, eliminating redundant rescanning during I/O-heavy workloads. ExclusionManager maintains a kernel-mode allow-list for trusted paths and processes pushed from user space.

Key files
  • ·ScanCache.c — hash-keyed result store with LRU eviction
  • ·ExclusionManager.c — exclusion entry CRUD and lookup
  • ·PathExclusion.c — path pattern matching for exclusion
  • ·ProcessExclusion.c — process name/hash-based exclusion

Filter Contexts & Power

FLT_CONTEXT · Power CallbacksFLT
ShadowSensor/Context/

InstanceContext holds per-volume state across callbacks. StreamContext carries per-file scan results between Pre and Post operations. PowerCallback registers for sleep/hibernate transitions to ensure protection survives power state changes.

Key files
  • ·InstanceContext.c — per-volume filter instance state
  • ·StreamContext.c — per-file stream context lifecycle
  • ·PowerCallback.c — PO_NOTIFY_CALLBACK registration and handling
  • ·ObjectNamespace.c — object namespace security enforcement
User Space · Ring 3
23 subsystems

Core Scan Engine

Multi-Engine Detection OrchestratorC++20
src/Core/Engine/

Heart of the user-space detection pipeline. Orchestrates parallel scanning across hash lookup, YARA matching, behavioral analysis, ML inference, heuristics, emulation, and sandbox analysis. ZeroDayDetector combines multiple weak signals to catch novel threats.

Key files
  • ·ScanEngine.cpp — parallel scan pipeline orchestration
  • ·ThreatDetector.cpp — final verdict aggregation
  • ·BehaviorAnalyzer.cpp — user-space behavioral heuristics
  • ·HeuristicAnalyzer.cpp — static feature-based heuristics
  • ·EmulationEngine.cpp — light x86/x64 CPU emulation
  • ·MachineLearningDetector.cpp — ML model inference pipeline
  • ·SandboxAnalyzer.cpp — behavioral sandbox invocation
  • ·ZeroDayDetector.cpp — multi-signal anomaly fusion
  • ·PolymorphicDetector.cpp — code mutation pattern recognition
  • ·PackerUnpacker.cpp — packer detection + layer unpacking
  • ·QuarantineManager.cpp — file quarantine / restore logic

Process Analysis Engine

User-Space Process DetectionInjection
src/Core/Process/

Comprehensive user-space view of process activity. Correlates injection techniques from multiple angles — DLL injection, process hollowing, atom bombing, reflective loading, thread hijacking. ProcessKiller provides forceful termination of confirmed malicious processes.

Key files
  • ·ProcessInjectionDetector.cpp — generic injection correlation
  • ·DLLInjectionDetector.cpp — classic DLL injection variants
  • ·ProcessHollowingDetector.cpp — section hollowing + PE overwrite
  • ·ReflectiveDLLDetector.cpp — reflective loader signatures
  • ·AtomBombingDetector.cpp — atom table abuse technique
  • ·ThreadHijackDetector.cpp — APC + context hijacking
  • ·MemoryScanner.cpp — user-space memory region scanning
  • ·ProcessAnalyzer.cpp — process metadata and behavior scoring
  • ·ProcessMonitor.cpp — ongoing process activity monitoring
  • ·ProcessKiller.cpp — confirmed-malicious process termination

Anti-Evasion Engine

Evasion Detection · x64 ASMx64 ASM
src/AntiEvasion/

Dedicated detection layer for malware trying to hide from analysis environments. Critical measurements are implemented in x64 assembly to prevent compiler optimizations from neutralizing timing-based checks. Covers VM, sandbox, debugger, timing, packer, environment, and network-based evasion.

Key files
  • ·VMEvasionDetector.cpp + _x64.asm — CPUID/RDTSC VM fingerprinting
  • ·SandboxEvasionDetector.cpp + _x64.asm — behavioral sandbox detection
  • ·DebuggerEvasionDetector.cpp + _x64.asm — hardware breakpoint detection
  • ·TimeBasedEvasionDetector.cpp + _x64.asm — timing differential analysis
  • ·PackerDetector.cpp + _x64.asm — entropy + section characteristic analysis
  • ·ProcessEvasionDetector.cpp — process name/path evasion checks
  • ·NetworkBasedEvasionDetector.cpp — network connectivity evasion detection
  • ·metamorphic_polymorphicdetector.cpp — Zydis-powered code similarity

Exploit Protection

Memory Exploit MitigationExploit
src/Exploits/

Detects and blocks memory-based exploitation techniques. Guards against classic buffer overflows, ROP chains, JIT spray, stack pivots, and heap spray. KernelExploitDetector watches for privilege escalation via kernel vulnerability patterns.

Key files
  • ·BufferOverflowProtection.cpp — stack/heap overflow detection
  • ·ROPProtection.cpp — return-oriented programming chain analysis
  • ·JITSprayDetector.cpp — JIT spray pattern detection
  • ·StackPivotDetector.cpp — ESP/RSP manipulation detection
  • ·HeapSprayDetector.cpp — heap allocation pattern analysis
  • ·KernelExploitDetector.cpp — kernel vulnerability exploitation patterns
  • ·PrivilegeEscalationDetector.cpp — user→kernel privilege escalation

Real-Time Protection

Live Threat BlockingReal-Time
src/RealTime/

Orchestrates the live protection layer. BehaviorBlocker acts synchronously on behavioral triggers. FileIntegrityMonitor detects unauthorized modifications to critical system files. ZeroHourProtection applies cloud-assisted verdicts for brand-new threats with no local signature.

Key files
  • ·RealTimeProtection.cpp — main real-time protection coordinator
  • ·BehaviorBlocker.cpp — synchronous behavioral action enforcement
  • ·FileIntegrityMonitor.cpp — critical file change detection
  • ·FileSystemFilter.cpp — user-space file access filter
  • ·ExploitPrevention.cpp — runtime exploit mitigation hooks
  • ·MemoryProtection.cpp — user-space memory guard
  • ·NetworkTrafficFilter.cpp — outbound network blocking
  • ·ProcessCreationMonitor.cpp — new process pre-execution checks
  • ·ZeroHourProtection.cpp — cloud-lookup for unknown files

Ransomware Protection

Multi-Layer Ransomware DefenseRansomware
src/RansomwareProtection/

Layered ransomware detection and response. Canary files provide early warning via minifilter access tripwires. ShadowCopyProtector blocks VSS deletion commands. Family-specific detectors catch WannaCry and Locky variants.

Key files
  • ·RansomwareDetector.cpp — generic ransomware behavioral detection
  • ·HoneyPotManager.cpp — strategic canary file placement + tripwires
  • ·ShadowCopyProtector.cpp — VSS deletion command monitoring/blocking
  • ·FileBackupManager.cpp — backup directory integrity enforcement
  • ·BackupProtector.cpp — backup set tamper protection
  • ·WannaCryDetector.cpp — WannaCry IOC + behavioral signatures
  • ·LockyDetector.cpp — Locky IOC + behavioral signatures
  • ·RansomwareDecryptor.cpp — recovery key support framework

Threat Intelligence

IOC · STIX · TAXII · Feed ManagementTI
src/ThreatIntel/

Production-grade threat intelligence pipeline. Ingests STIX 2.1/TAXII 2.1/CSV feeds. A sharded B-tree index with Bloom filter pre-check provides O(1) negative lookup across 1.2M+ entries. URL/domain matching uses a trie structure. LRU-cached reputation queries minimize latency on hot paths.

Key files
  • ·ThreatIntelFeedManager.cpp — STIX/TAXII/CSV feed ingestion
  • ·ThreatIntelIndex.hpp + _Core.cpp — sharded B-tree index
  • ·ThreatIntelIndex_Lookups.cpp — lookup hot path
  • ·ThreatIntelIndex_URLMatcher.cpp — trie-based URL/domain matching
  • ·ThreatIntelIndex_LRU.hpp — LRU eviction layer
  • ·ThreatIntelBloomFilter.cpp — probabilistic pre-filter
  • ·ThreatIntelIOCManager.cpp — IOC lifecycle management
  • ·ThreatIntelDatabase.cpp — SQLite-backed IOC persistence
  • ·ReputationCache.cpp — TTL-aware reputation caching
  • ·ThreatIntelImporter.cpp / Exporter.cpp — import/export pipeline

Script Engine Scanner

Scripting Language DetectionAMSI
src/Scripts/

Scans malicious scripts before and during execution. Integrates with AMSI to inspect PowerShell, VBScript, and JavaScript. Dedicated scanners catch macro-based Office threats and Python-based malware.

Key files
  • ·AMSIIntegration.cpp — AMSI provider registration and callbacks
  • ·PowerShellScanner.cpp — PowerShell AST + obfuscation analysis
  • ·JavaScriptScanner.cpp — JS de-obfuscation + threat pattern matching
  • ·VBScriptScanner.cpp — VBScript malicious pattern detection
  • ·MacroDetector.cpp — Office macro extraction and analysis
  • ·PythonScriptScanner.cpp — Python-based malware detection

Web Protection

Browser & Network Threat LayerWeb
src/WebProtection/

Guards users from web-based threats. PhishingDetector analyzes URLs and page content. Browser extension scanners catch malicious Chrome/Firefox add-ons. MaliciousDownloadBlocker intercepts hazardous file downloads before they hit disk.

Key files
  • ·PhishingDetector.cpp — URL + content + cert phishing analysis
  • ·BrowserProtection.cpp — browser process behavior monitoring
  • ·MaliciousDownloadBlocker.cpp — download interception pipeline
  • ·SafeBrowsingAPI.cpp — cloud safe-browsing lookup integration
  • ·ChromeExtensionScanner.cpp — Chrome extension manifest analysis
  • ·FirefoxAddonScanner.cpp — Firefox addon malicious pattern scanning

Email Security

Mail Client ProtectionEmail
src/Email/

Scans email attachments and URLs across Outlook and Thunderbird. PhishingEmailDetector analyzes headers, sender reputation, and body content. SpamDetector provides Bayesian + ML-based spam classification.

Key files
  • ·EmailProtection.cpp — central email scanning coordinator
  • ·AttachmentScanner.cpp — email attachment multi-engine scan
  • ·PhishingEmailDetector.cpp — header + body + link phishing analysis
  • ·OutlookScanner.cpp — Outlook COM integration for live scanning
  • ·ThunderbirdScanner.cpp — Thunderbird profile mailbox scanning
  • ·SpamDetector.cpp — Bayesian + ML spam classification

USB Protection

Removable Media SecurityUSB
src/USB_Protection/

Controls and monitors USB devices. BadUSBDetector catches HID spoofing attacks (rubber ducky, malicious keyboards). DeviceControlManager enforces USB device policy. Autorun is blocked unconditionally. All USBs are auto-scanned on mount.

Key files
  • ·BadUSBDetector.cpp — HID class spoofing and rubber-ducky detection
  • ·DeviceControlManager.cpp — USB device type allow/block policy
  • ·USBAutorunBlocker.cpp — autorun.inf suppression
  • ·USBDeviceMonitor.cpp — device plug/unplug event monitoring
  • ·USBScanner.cpp — automatic full scan on mount

Crypto-Miner Detection

Illicit Mining PreventionMining
src/CryptoMinersProtection/

Detects unauthorized cryptocurrency mining across CPU, GPU, and browser. PoolConnectionDetector identifies mining pool connection patterns. CPUUsageAnalyzer applies heuristics to distinguish legitimate sustained load from covert mining.

Key files
  • ·CryptoMinerDetector.cpp — multi-signal miner identification
  • ·CPUUsageAnalyzer.cpp — sustained load pattern analysis
  • ·BrowserMinerDetector.cpp — WebAssembly/JS mining detection
  • ·GPUMiningDetector.cpp — GPU compute API monitoring
  • ·PoolConnectionDetector.cpp — stratum/mining pool traffic detection

Forensics Module

Incident Response & EvidenceForensics
src/Forensics/

Provides IR-grade evidence collection triggered on confirmed detections. MemoryDumper captures process memory for offline analysis. TimelineAnalyzer reconstructs the attack sequence from logs. NetworkCapture records network context around the incident.

Key files
  • ·ArtifactExtractor.cpp — registry/filesystem artifact collection
  • ·EvidenceCollector.cpp — multi-source forensic evidence bundler
  • ·IncidentRecorder.cpp — structured incident report generation
  • ·MemoryDumper.cpp — process memory capture (mini/full dump)
  • ·NetworkCapture.cpp — network traffic preservation
  • ·TimelineAnalyzer.cpp — chronological attack reconstruction

IPC & Alert System

Service ↔ UI CommunicationIPC
src/Communication/

Manages all communication between the Windows service, kernel driver, and future GUI. FilterConnection implements the FltPort user-mode side. AlertSystem routes detections to the notification subsystem. TelemetryCollector aggregates metrics for the telemetry pipeline.

Key files
  • ·FilterConnection.cpp — user-mode FltConnectCommunicationPort
  • ·IPCManager.cpp — named pipe + shared memory IPC orchestration
  • ·MessageDispatcher.cpp — inbound message routing and dispatch
  • ·AlertSystem.cpp — detection alert creation and routing
  • ·NotificationManager.cpp — Windows toast + tray notification
  • ·ReportGenerator.cpp — structured detection report generation
  • ·TelemetryCollector.cpp — metrics aggregation and export

Windows Service

Service Lifecycle ManagementService
src/Service/

Manages the ShadowStrike Phantom Windows service through the SCM. ServiceInstaller handles driver + service installation/removal. ServiceMonitor performs health checks and automatic restart. ServiceController exposes control commands.

Key files
  • ·AntivirusService.cpp — SERVICE_TABLE_ENTRY, main service loop
  • ·ServiceController.cpp — start/stop/pause/continue handling
  • ·ServiceInstaller.cpp — driver + service registration with SCM
  • ·ServiceMonitor.cpp — health monitoring and auto-restart

Update System

Signature & Program UpdatesUpdate
src/Update/

Manages the full update lifecycle. SignatureUpdater fetches and applies definition updates. DeltaUpdater applies binary diffs to minimize download size. UpdateVerifier checks digital signatures before applying. RollbackManager allows reverting a bad update.

Key files
  • ·UpdateManager.cpp — update check and coordination
  • ·SignatureUpdater.cpp — definition/IOC database updates
  • ·ProgramUpdater.cpp — engine and driver binary updates
  • ·DeltaUpdater.cpp — binary delta (diff) application
  • ·UpdateVerifier.cpp — multi-algorithm signature verification
  • ·RollbackManager.cpp — update revert and recovery

Security Infrastructure

Self-Defense · Crypto · SigningSecurity
src/Security/

User-space complement to the kernel self-protection layer. CryptoManager provides AES-GCM and RSA-OAEP for IPC channel encryption. DigitalSignatureValidator enforces Authenticode on all loaded modules. TamperProtection monitors the service binary and configuration for unauthorized changes.

Key files
  • ·CryptoManager.cpp — AES-GCM, RSA-OAEP key management
  • ·DigitalSignatureValidator.cpp — Authenticode module verification
  • ·SelfDefense.cpp — service process self-protection
  • ·TamperProtection.cpp — binary + config integrity monitoring

PE Parser

Portable Executable AnalysisPE
src/PEParser/

Safe, bounds-checked PE32/PE32+ parser. Extracts headers, sections, imports, exports, resources, and Authenticode information. SafeReader provides memory-safe field access to prevent parser exploitation. PEValidation enforces structural integrity before deeper analysis.

Key files
  • ·PEParser.cpp — PE32/PE32+ full structure parsing
  • ·PEValidation.cpp — structural integrity verification
  • ·SafeReader.hpp — bounds-checked field access primitives
  • ·PETypes.hpp — PE data structure type definitions

Signature Store

B-Tree Signature Database · YARASignatures
src/SignatureStore/

Custom B-tree based signature database with YARA rule integration. Supports batch import, COW (copy-on-write) updates, and incremental index maintenance. SignatureBuilder constructs binary signature records from threat intelligence feeds.

Key files
  • ·SignatureStore.cpp — primary store API (scan, update, delete)
  • ·SignatureIndex.cpp — B-tree index with cache management
  • ·SignatureIndex_COW.cpp — copy-on-write update path
  • ·SignatureBuilder.cpp — signature record construction
  • ·YaraRuleStore.cpp — YARA rule compilation and evaluation
  • ·batch_sig_builder.cpp — bulk signature import pipeline

Hash Store

Bloom Filter + Memory-Mapped DBO(1) Lookup
src/HashStore/

High-performance hash reputation database. Bloom filter provides O(1) negative lookups that eliminate most disk access. Memory-mapped file backend enables zero-copy hash queries. Supports import/export of industry-standard hash feeds (NSRL, VT).

Key files
  • ·HashStore.cpp — primary hash lookup API
  • ·BloomFilter_impl.cpp — configurable false-positive-rate bloom filter
  • ·HashBucket_impl.cpp — hash bucket chaining implementation
  • ·HashStore_query_operations.cpp — lookup hot path
  • ·HashStore_import_export.cpp — NSRL/VT format import/export

Pattern Store

Aho-Corasick · Boyer-Moore · SIMDSIMD
src/PatternStore/

Multi-algorithm byte pattern matching engine. Aho-Corasick for multi-pattern simultaneous search. Boyer-Moore for single-pattern fast search. SIMD vectorized matching (SSE4.2 / AVX2) accelerates bulk scanning throughput.

Key files
  • ·PatternStore.cpp — pattern registration and search API
  • ·aho_crsck_impl.cpp — Aho-Corasick automaton construction and search
  • ·boyer_moore_impl.cpp — Boyer-Moore good-suffix + bad-character
  • ·SIMD_matcher_impl.cpp — SSE4.2/AVX2 vectorized pattern matching

Fuzzy Hasher

Custom Approximate Hash EngineCustom
src/FuzzyHasher/

In-house approximate file similarity engine built from scratch. Detects polymorphic and repacked malware variants that share structural similarity but differ in exact hash. TLSH (Trend Locality Sensitive Hash) is used as a supplementary 3rd-party library alongside the custom implementation.

Key files
  • ·FuzzyHasher.cpp — custom approximate hash computation API
  • ·DigestGenerator.cpp — digest generation from file/memory regions
  • ·DigestComparer.cpp — pair-wise similarity scoring
  • ·RollingHash.hpp — streaming rolling hash primitive
  • ·EditDistance.hpp — Hamming-distance comparison helper

Infrastructure & Utilities

Cross-Cutting ServicesUtils
src/Utils/

Shared infrastructure used across all user-space modules. CryptoUtils provides AES/RSA/ECDSA and secure random generation. NetworkUtils covers HTTP/HTTPS, DNS, proxy, and IP utilities. ThreadPool manages user-space worker threads. Logger provides structured logging to file/ETW.

Key files
  • ·CryptoUtils.cpp — AES-GCM, RSA-OAEP, ECDSA, SHA-2/3
  • ·CryptoUtils_SymmetricCipher.cpp — AES-128/256-GCM/CBC
  • ·CryptoUtils_Secure_Random.cpp — CSPRNG wrapper
  • ·NetworkUtils.cpp + sub-modules — HTTP/S, DNS, proxy, URL, IP
  • ·NetworkSecurity_SSL_TLS.cpp — TLS session management
  • ·ThreadPool.cpp — user-space worker pool
  • ·Logger.cpp — structured logging (file + ETW)
  • ·PE_sig_verf.cpp — Authenticode signature verification
  • ·RegistryUtils.cpp — registry access helpers
  • ·ProcessUtils.cpp — process enumeration and manipulation
  • ·CompressionUtils.cpp — zlib/LZ4 compression wrappers
  • ·CertUtils.cpp — X.509 certificate parsing and validation
Development Status

All subsystems above are implemented and committed to the repository. The codebase is in active development — modules are cleaned and integrated incrementally via daily commits. Full compilation and end-to-end integration testing are the current Phase 1 milestone. Not suitable for production use.