Skip to content
Spectre exploit
Branch: master
Clone or download
Pull request Compare This branch is even with opsxcq:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Spectre attack


Spectre breaks the isolation between different applications. It allows an attacker to trick error-free programs, which follow best practices, into leaking their secrets. In fact, the safety checks of said best practices actually increase the attack surface and may make applications more susceptible to Spectre.

This exploit check your Linux (x64 only) for the spectre vulnerability.


Just run make to compile the source code.


Execute the exploit

taskset -c 1 ./exploit 

[+] Testing for Spectre
[+] Dumping memory from 0xffffffffffdfeea8 to 0xffffffffffdfeec2
[+] Dumped bytes match the expected value
[+] System vulnerable to spectre


Spectre was independently discovered and reported by two people:

  • Jann Horn (Google Project Zero).
  • Paul Kocher in collaboration with, in alphabetical order, Daniel Genkin (University of Pennsylvania and University of Maryland), Mike Hamburg (Rambus), Moritz Lipp (Graz University of Technology), and Yuval Yarom (University of Adelaide and Data61).


You can’t perform that action at this time.