/HeapLeakDetection

Primary LanguageC++Apache License 2.0Apache-2.0

๐Ÿ” HeapLeakDetection Registry Forensics

๐ŸŽฏ Overview

HeapLeakDetection, specifically the registry key at HKLM\Software\Microsoft\RADAR\HeapLeakDetection\DiagnosedApplications, is a powerful forensic artifact for investigating suspicious executables. This key tracks programs that Windows RADAR (Runtime Application Self-healing and Detection At Runtime) flags for memory leak detection.

๐Ÿ—๏ธ Structure and Significance

  • ๐Ÿ“ Registry Location: HKLM\Software\Microsoft\RADAR\HeapLeakDetection\DiagnosedApplications
  • ๐Ÿ“Š Contains subkeys for each detected executable
  • โฐ Records LastDetectionTime for each detection event
  • ๐Ÿ”„ Continuously monitors system-wide memory behavior

๐Ÿ”ฌ How Detection Works

According to research by Harel Segev, RADAR monitors processes based on several factors:

  • ๐Ÿ“ˆ Commits at least 5% of total physical memory (CommitThreshold)
  • โฑ๏ธ Checks processes at regular intervals (TimerInterval)
  • ๐Ÿ•’ Maintains detection history to prevent duplicate entries

๐Ÿ› ๏ธ Memory Leak Simulation Tool

This repository includes a C++ program that demonstrates how to trigger Windows RADAR HeapLeakDetection:

Features

  • ๐Ÿ’พ Controlled memory allocation in configurable chunks
  • ๐Ÿ“Š Real-time allocation monitoring
  • โšก Optimized for RADAR detection
  • ๐Ÿ”„ Continuous execution until detection

Usage

  1. Clone this repository
  2. Build using provided build script or Visual Studio
  3. Run as administrator
  4. Monitor registry for detection entry

๐Ÿ” Forensic Value

As highlighted by security researchers, this artifact provides:

  • ๐Ÿ•ต๏ธ Alternative evidence source when traditional artifacts are missing
  • โฐ Temporal correlation for suspicious executables
  • ๐Ÿงช Behavioral insights into application memory patterns
  • ๐Ÿ›ก๏ธ Resilience against common anti-forensic techniques

๐Ÿ“š References

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit pull requests or open issues for improvements.