Skip to content

Mocking a Flush+Reload attack in the context of cache attack, side-channel attack (SCA) and Data Science, in Python.

License

Notifications You must be signed in to change notification settings

carloshsalvador/security_sca

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flush+Reload Side-Channel: Practical Demonstration

This repository provides a practical and ethical demonstration of the Flush+Reload side-channel attack, developed as part of an academic evaluation for the IT-Security module.

Contents

  • documentation.pdf: detailed documentation and interpretation of results from SCA.ipynb. (COMING SOON!)
  • SCA.ipynb: Jupyter Notebook containing the main explanations, visualisations, and tables for the project.
  • SCA_part_II_simulation.py: Python script that simulates the attack using multiprocessing and generates the data for analysis.
  • requirements.txt: List of Python dependencies required to reproduce the results.
  • .gitignore: Standard Python ignore file (automatically generated by GitHub).
  • README.md: This documentation file.

Project Overview

The aim of this project is to illustrate, in a simplified and ethical manner, the principles and risks of the Flush+Reload side-channel attack. The demonstration uses Python's multiprocessing and shared memory features to simulate cache timing effects and highlight potential information leakage.

Getting Started

1. Clone the Repository

git clone https://github.com/yourusername/yourrepository.git
cd yourrepository

2. Set Up the Environment

It is recommended to use a virtual environment:

python -m venv venv
source venv/bin/activate  # On Linux/Mac
venv\Scripts\activate     # On Windows

pip install -r requirements.txt

3. Run the Simulation Script

The Python script will generate a CSV file with the timing data:

python SCA_part_II_simulation.py

The path to the generated CSV file will be displayed in the terminal.

4. Analyse the Data in the Notebook

Open the Jupyter Notebook in your preferred environment (JupyterLab, VS Code, etc.):

jupyter lab

Within the notebook, you can load the generated CSV file and use the data for visualisation and further analysis.

5. Alternative: Run on Google Colab or Binder

You may open the notebook directly in Google Colab or Binder for a cloud-based experience (links can be added here once the repository is public).

File Structure

/
├── documentation.pdf
├── SCA.ipynb
├── SCA_part_II_simulation.py
├── requirements.txt
├── .gitignore
└── README.md

Notes

  • The Jupyter Notebook contains all the key visualisations and tables required for academic assessment.
  • The Python script is provided for reproducibility and deeper exploration.
  • This project is intended solely for educational and research purposes. Do not use these techniques for malicious activities.

Security and Compatibility

  • The code does not perform any destructive or system-compromising operations.
  • Only run scripts from trusted sources.
  • Multiprocessing may not function as expected in some cloud environments (e.g., Google Colab, Binder).

Licence

This project is licensed under the MIT Licence. See the LICENSE file for details.


Questions or suggestions?
Please open an issue or contact via GitHub.

About

Mocking a Flush+Reload attack in the context of cache attack, side-channel attack (SCA) and Data Science, in Python.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published