Abstract:Spectre V1 exploits the speculative execution mechanism of processors to steal sensitive data, making detection in closed-source binary programs particularly challenging. Static analysis tends to produce high false-positive rates, while dynamic fuzz testing suffers from limited coverage and noisy reports. To address these issues, this study proposes ConSpec, a binary Spectre V1 detection method. The proposed method first employs a lightweight BERT model to perform semantic modeling of disassembled instruction sequences. By incorporating the assembly-level semantic patterns of Spectre V1, it generates function-level confidence scores to quantify vulnerability suspicion. Based on the confidence scores, functions are then divided into high-, medium-, and low-risk regions. Through whitelist-driven directed instrumentation and tiered configuration, coverage-guided fuzz testing is used to repeatedly execute the instrumented program and collect vulnerability evidence, thus concentrating detection resources on high-risk regions while controlling the overall overhead. To address noisy dynamic validation reports and missed detections caused by limited coverage, a window-level secondary confirmation mechanism is introduced. By matching specific semantic templates and performing local register tracing, this mechanism verifies the key vulnerability-related evidence chain, thus filtering out false positives and compensating for missed detections. Experimental results show that the proposed method fully covers 15 known Spectre V1 exploitation patterns. Tests on five real-world programs, including jsmn, brotli, and OpenSSL, show that, compared with Teapot, ConSpec improves Precision by an average of approximately 24.3 percentage points and the F2-score by an average of approximately 24.4 percentage points, while reducing the relative false-negative rate overall. The average runtime decreases from 1159.7 min to 774.3 min, a reduction of 33.2%.