Documentation
¶
Overview ¶
This program implements an advanced Windows digital signature verification tool. It leverages Windows WinTrust API functions to validate Authenticode signatures on executable files (.exe, .dll, .sys, etc.) with support for both standard verification and extended verification modes. The tool provides detailed signature information including certificate chains, timestamps, and signature algorithms.
IMPORTANT SECURITY NOTES: - This tool extracts real certificate data using Windows CryptoAPI - Uses unsafe.Pointer operations with proper validation and bounds checking - This tool is designed for Windows platforms only
SECURITY HARDENED: - Command-line argument validation (count limits, size limits, character validation) - Path traversal prevention with path validation - TOCTOU attack prevention through exclusive file access - Integer overflow protection in all pointer arithmetic operations - Memory safety measures with bounds checking and safe memory copying - Thread-safe operations with proper mutex synchronization - Resource exhaustion prevention through input validation and limits - Technically advanced error handling with security-focused responses
Features: - Dual verification modes: WinVerifyTrust and WinVerifyTrustEx - Technically advanced signature validation with certificate chain analysis - Timestamp verification and detailed certificate information - Thread-safe verification with proper Windows API compliance - Support for various executable formats (.exe, .dll, .sys, etc.)
Usage:
WinVerifyTrust [-mode=trust|trustex] [-verbose] <file1> [file2] ...
The tool requires Windows and uses official Microsoft WinTrust APIs for cryptographic signature verification.