SPECTRE attack leverage the speculative Execution in modern processors. All the modern machines which use branch predictors are vulnerable to these attacks. Discovered by Google Zero team in 2017 and publicly announced in January 2018, Spectre and Meltdown mitigations has caused slowdown in the vulnerable machine.
Checkout my Other Github Repo here-- Spectre Variant 1 on string data, for Spectre theory and steps in detail..
Spectre attack is not a single security vulnerability, but a family of them. Here in this code, I have implemented the Conditional Branch variant, 'Variant 1' of Spectre attacks, which is to bypass the bounds check in the target program.
Here in this project, I have implemented to retrieve image buffer data in a program using SPECTRE attacks.
.
├── debugging
├── decode_base64 # decode base64 to image
│ ├── node_modules
│ ├── package.json
│ ├── package-lock.json
│ └── script.js
├── decode_rgb # encode rgb buffer to image
│ └── decode.py
├── encode_base64 #encode image to base64
│ ├── node_modules
│ ├── package.json
│ ├── package-lock.json
│ └── script.js
├── encode_rgb # encode image to rgb
│ └── encode.py
├── main.cpp # the main spectre program
├── Makefile
├── median_filter # apply median filter to remove hot pixels
│ └── median.py
└── README.md
-
Encode the secret image that we have, example rgb
$ cd encode_rgb $ python3 encode.py
Input the image file details in the program.
-
Run spectre attack at project root dir
$ make $ ./spectre
The output is shown in 'spectre_output.txt'
-
Decode the spectre output
$ cd decode_rgb $ python3 decode.py
Input the necessary details in the program.
-
Apply Median filter on Resulting image to remove hot pixels
$ cd median_filter $ python3 median.py
Check out these resources to learn more about Spectre attacks: