This repository contains various tools and tests related to hardware security analysis and vulnerability mitigation.
"Rowhammer" is a problem with recent DRAM modules in which repeatedly accessing a row of memory can cause bit flips in adjacent rows. This repository contains programs for testing the rowhammer problem, which run as normal userland processes.
The rowhammer problem is described by:
-
Yoongu Kim et al's paper, "Flipping Bits in Memory Without Accessing Them: An Experimental Study of DRAM Disturbance Errors" (2014).
-
Our blog post, "Exploiting the DRAM rowhammer bug to gain kernel privileges" (2015), on the blog of Google's Project Zero.
-
Rowhammer-test repository: rowhammer-test
The repository follows the following directory structure:
- src: Contains the source code files for the project.
- tests: Contains various test programs and scripts used for testing and analysis.
- Description: This file contains an updated version of the Rowhammer test, focusing on memory manipulation techniques.
- Language: C
- Usage:
- Navigate to the
tests
directory. - Compile the test file:
gcc rowhammer_test_v2.c -o rowhammer_test_v2
- Run the test:
./rowhammer_test_v2
- Navigate to the
- Description: This file contains the original Rowhammer test written in C++.
- Language: C++
- Usage:
- Navigate to the
tests
directory. - Compile the test file:
g++ rowhammer_test.cc -o rowhammer_test
- Run the test:
./rowhammer_test
- Navigate to the
- Description: This file provides the core implementation of the Rowhammer test in C.
- Language: C
- Usage:
- Navigate to the
tests
directory. - Compile the test file:
gcc rowhammer.c -o rowhammer
- Run the test:
./rowhammer
- Navigate to the
- Description: This file contains tests for measuring the latency and bandwidth of memory accesses.
- Language: C
- Usage:
- Navigate to the
tests
directory. - Compile the test file:
gcc hardware_test.c -o hardware_test
- Run the test:
./hardware_test
- Navigate to the
- Description: This file contains a test for aggressively toggling bits in memory to simulate potential vulnerabilities.
- Language: C
- Usage:
- Navigate to the
tests
directory. - Compile the test file:
gcc aggressive_bit_toggle.c -o aggressive_bit_toggle
- Run the test:
./aggressive_bit_toggle
- Navigate to the
- Description: This file demonstrates integration with AFL for fuzz testing.
- Language: C
- Usage:
- Navigate to the
tests
directory. - Compile the integration test with AFL:
afl-gcc afl_integration.c -o afl_integration
- Run AFL fuzz testing:
Replace
afl-fuzz -i input_dir -o output_dir -- afl_integration @@
input_dir
with the directory containing input seed files (if any),output_dir
with the directory to store AFL's findings and crashes, andafl_integration
with the name of the compiled executable.
- Navigate to the
This section provides details about the Rowhammer Tester Web Interface and how to use it.
The Rowhammer Tester Web Interface provides a platform for running Rowhammer tests to detect and analyze the vulnerability in different memory configurations.
- Click on the "Run Rowhammer Test" button to start the test.
- Select a Rowhammer test from the options provided.
- View the test results and analyze the visualization to detect any memory vulnerabilities.