A comprehensive C++ security library for Windows ARM64 that uses precise timing and integrity checks to detect debugging, hooking, and runtime tampering.
- Tier 1 (Single-Step Detection): Detects single-stepping debuggers using cycle-accurate timing
- Tier 2 (Drift Detection): Monitors scheduler micro-delays and timing inconsistencies
- Tier 3 (Hypervisor/VM Detection): Identifies virtualization environments
-
Time Check Macros (
time_check_macros.h)TIME_CHECK_BEGIN()/TIME_CHECK_END()- Basic protectionTIME_CHECK_TIER1()/TIME_CHECK_TIER2()/TIME_CHECK_TIER3()- Individual tiersTIME_CHECK_PROBABILITY(n)- Randomized internal checksTIME_CHECK_ADAPTIVE- Self-adjusting check frequencyTIME_CHECK_FATAL(msg)- Custom failure handler
-
Time Verification Module (
time_verification.cpp)- Drift detection between
KUSER_SHARED_DATAandRtlGetSystemTimePrecise - Sleep/suspend detection using biased vs unbiased interrupt time
- Comprehensive snapshot comparison
- Drift detection between
-
Watchdog System (
watchdog_demo.cpp)- CRC32 integrity validation of critical functions
- API hook detection
- Execution time monitoring
- Timer-based periodic checks
- Platform: Windows 10/11 ARM64
- Compiler: MSVC (Visual Studio 2022) or MinGW-w64 (ARM64)
- Architecture: ARM64 (for
CNTVCT_EL0system register access) - Privileges: User-mode (no admin required)
cl /EHsc /O2 /std:c++17 /D TIME_CHECK_DEMO time_check_demo.cpp /link ntdll.lib