A Unified Cache-Aware Detection for Spectre Attacks
Spectre attack and its variants have been released continuously,leaving traces in the cache and then leaking sensitive in-formation through the cache side-channel attacks.However,existing detection methods for Spectre attacks are insufficient for ana-lyzing of the attack code patterns and existing defenses,resulting in false positives and negatives.This paper proposed an improved cache-aware dynamic analysis method to address this issue to identify various Spectre attacks.This paper analyzed and modeled variants of Spectre attacks based on the attack principle and code pattern characteristics,and improved the formal cache model based on the least recently used replacement policy,finally implemented a cache-aware dynamic analysis and detection tool for Spectre vulnerability based on the modeling of Spectre attacks and cache.Through experiments conducted on a set of microbench-marks and commonly used cryptographic libraries,Spectre gadgets were accurately detected in all microbenchmark samples.Addi-tionally,cache side-channel and Spectre vulnerabilities were identified in several cryptographic algorithms.In the end,the experi-mental results showed that the method proposed in this paper has a good detection capability.