Skip to content

Supporting code for exploiting the RISC-V GhostWrite vulnerability

Notifications You must be signed in to change notification settings

RXHem/GhostWriteExploit

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

GhostWrite Exploit 👻

Welcome to the GhostWrite Exploits repository, where we use the GhostWrite RISC-V CPU vulnerability to directly manipulate physical memory! 💻

What is this repository? 🔎

This repository contains two PoCs for exploiting hardware vulnerabilities in the XuanTie C910 processor:

  1. System Crash PoC: Continuously writing junk data to physical memory, causing the system to crash.
  2. Inter-Process Memory Modification: Exploiting physical memory access to modify the memory of a separate running process.

These PoCs are based on the paper and research from GhostWriteAttack.com by researchers at the CISPA Helmholtz Center for Information Security.

Why is this important? 🤔

  • Hardware Vulnerabilities: Unlike software bugs, hardware vulnerabilities like GhostWrite are significantly harder to patch and may have no solution.
  • Physical Memory Access: These PoCs demonstrate how access to physical memory can lead to system-wide control and crash scenarios.
  • Learn & Experiment: If you're a student or researcher, you can experiment with these vulnerabilities using real hardware. This is your opportunity to understand hardware exploitation and the risks it poses.

Getting Started 🏃

Here's how to get started with the PoCs:

  1. Clone this repository:
    git clone https://github.com/LaurieWired/GhostWriteExploit.git
  2. Choose a folder:
    • Crash PoC: Explore the folder CrashSystem/ to see how we crash the system by writing to physical memory.
    • Memory Modification PoC: Explore the folder OverwriteProcess/ to see how one process can directly modify the memory of another.
  3. Build the code:
    • To compile directly on the native RISC-V board:
    gcc ghostwrite.c -o ghostwrite -march="rv64gzve64x"
  4. Run the PoCs:
    • Crash the system: Run the system crash executable and see the CPU bug in action.
    • Modify another process's memory: Run the second PoC to witness how physical memory access can manipulate a separate process.

Accompanying Video 📹

If you want more explanations of the vulnerability, watch the accompanying video on YouTube!

About

Supporting code for exploiting the RISC-V GhostWrite vulnerability

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 100.0%