# rpisec/mbe architecture

> Architecture diagram of the GitHub repository rpisec/mbe, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rpisec/mbe
- Repository: https://github.com/rpisec/mbe

## Overview

This repository is courseware for RPISEC’s Modern Binary Exploitation course, not a single application: students study lecture demonstrations and work through standalone lab and project programs. The course progresses from reverse engineering and memory corruption through shellcoding, format strings, ROP, ASLR, heap and C++ topics, with a kernel lab at the end. The README documents the lecture/lab correspondence; sampled C/C++ programs are independent examples. `include/utils.h` supplies shared input and process helpers to some labs. Unsampled lecture and lab internals are represented by their existing directories.

Main entry points: [`include/utils.h`](https://github.com/rpisec/mbe/blob/master/include/utils.h) (Input Utilities), [`src/lab06`](https://github.com/rpisec/mbe/tree/master/src/lab06) (ASLR), [`src/lab03`](https://github.com/rpisec/mbe/tree/master/src/lab03) (Shellcoding), [`src/lab05`](https://github.com/rpisec/mbe/tree/master/src/lab05) (DEP and ROP)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_labs["Hands-on Labs"]
  node_lab01["Reverse Engineering"]
  node_lab02["Memory Corruption"]
  node_lab03["Shellcoding"]
  node_lab04["Format Strings"]
  node_lab05["DEP and ROP"]
  node_lab06["ASLR"]
  node_lab07["Heap Exploitation"]
  node_lab08["Misc and Cookies"]
  node_lab09["C++ Concepts"]
  node_lab10["Linux Kernel"]
end

subgraph group_lectures["Lecture Examples"]
  node_lecture_aslr["ASLR Demos"]
  node_lecture_cpp["C++ Demos"]
  node_lecture_format["Format String Demos"]
  node_lecture_heap["Heap Demos"]
  node_lecture_misc["Misc Demos"]
  node_lecture_rop["ROP Demos"]
  node_lecture_shellcode["Shellcode Demo"]
end

subgraph group_projects["Course Projects"]
  node_project1["Project 1"]
  node_project2["Project 2"]
end

subgraph group_shared["Shared Helpers"]
  node_utils["Input Utilities<br/>[utils.h]"]
end

node_student(("Student"))

node_student -->|"works through"| node_lab01
node_student -->|"works through"| node_lab02
node_student -->|"works through"| node_lab03
node_student -->|"works through"| node_lab04
node_student -->|"works through"| node_lab05
node_student -->|"works through"| node_lab06
node_student -->|"works through"| node_lab07
node_student -->|"works through"| node_lab08
node_student -->|"works through"| node_lab09
node_student -->|"works through"| node_lab10
node_student -->|"completes"| node_project1
node_student -->|"completes"| node_project2
node_student -->|"studies"| node_lecture_aslr
node_student -->|"studies"| node_lecture_cpp
node_student -->|"studies"| node_lecture_format
node_student -->|"studies"| node_lecture_heap
node_student -->|"studies"| node_lecture_misc
node_student -->|"studies"| node_lecture_rop
node_student -->|"studies"| node_lecture_shellcode
node_lecture_shellcode -->|"prepares for"| node_lab03
node_lecture_format -->|"prepares for"| node_lab04
node_lecture_rop -->|"prepares for"| node_lab05
node_lecture_aslr -->|"prepares for"| node_lab06
node_lecture_heap -->|"prepares for"| node_lab07
node_lecture_misc -->|"prepares for"| node_lab08
node_lecture_cpp -->|"prepares for"| node_lab09
node_lab01 -->|"included in"| node_project1
node_lab06 -->|"included in"| node_project2
node_lab03 -->|"uses"| node_utils
node_lab05 -->|"uses"| node_utils
node_lab06 -->|"uses"| node_utils
node_lab07 -->|"uses"| node_utils
node_lab08 -->|"uses"| node_utils
node_lab09 -->|"uses"| node_utils

click node_lab01 "https://github.com/rpisec/mbe/tree/master/src/lab01"
click node_lab02 "https://github.com/rpisec/mbe/tree/master/src/lab02"
click node_lab03 "https://github.com/rpisec/mbe/tree/master/src/lab03"
click node_lab04 "https://github.com/rpisec/mbe/tree/master/src/lab04"
click node_lab05 "https://github.com/rpisec/mbe/tree/master/src/lab05"
click node_lab06 "https://github.com/rpisec/mbe/tree/master/src/lab06"
click node_lab07 "https://github.com/rpisec/mbe/tree/master/src/lab07"
click node_lab08 "https://github.com/rpisec/mbe/tree/master/src/lab08"
click node_lab09 "https://github.com/rpisec/mbe/tree/master/src/lab09"
click node_lab10 "https://github.com/rpisec/mbe/tree/master/src/lab10"
click node_lecture_aslr "https://github.com/rpisec/mbe/tree/master/src/lecture/aslr"
click node_lecture_cpp "https://github.com/rpisec/mbe/tree/master/src/lecture/cpp"
click node_lecture_format "https://github.com/rpisec/mbe/tree/master/src/lecture/format_strings"
click node_lecture_heap "https://github.com/rpisec/mbe/tree/master/src/lecture/heap"
click node_lecture_misc "https://github.com/rpisec/mbe/tree/master/src/lecture/misc"
click node_lecture_rop "https://github.com/rpisec/mbe/tree/master/src/lecture/rop"
click node_lecture_shellcode "https://github.com/rpisec/mbe/tree/master/src/lecture/shellcode"
click node_project1 "https://github.com/rpisec/mbe/tree/master/src/project1"
click node_project2 "https://github.com/rpisec/mbe/tree/master/src/project2"
click node_utils "https://github.com/rpisec/mbe/blob/master/include/utils.h"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_lab01,node_lab02,node_lab03,node_lab04,node_lab05,node_lab06,node_lab07,node_lab08,node_lab09,node_lab10 toneBlue
class node_lecture_aslr,node_lecture_cpp,node_lecture_format,node_lecture_heap,node_lecture_misc,node_lecture_rop,node_lecture_shellcode toneAmber
class node_project1,node_project2 toneMint
class node_utils toneRose
class node_student toneIndigo
```

## Components

### Hands-on Labs

- [Reverse Engineering](https://github.com/rpisec/mbe/tree/master/src/lab01): `src/lab01`
- [Memory Corruption](https://github.com/rpisec/mbe/tree/master/src/lab02): `src/lab02`
- [Shellcoding](https://github.com/rpisec/mbe/tree/master/src/lab03): `src/lab03`
- [Format Strings](https://github.com/rpisec/mbe/tree/master/src/lab04): `src/lab04`
- [DEP and ROP](https://github.com/rpisec/mbe/tree/master/src/lab05): `src/lab05`
- [ASLR](https://github.com/rpisec/mbe/tree/master/src/lab06): `src/lab06`
- [Heap Exploitation](https://github.com/rpisec/mbe/tree/master/src/lab07): `src/lab07`
- [Misc and Cookies](https://github.com/rpisec/mbe/tree/master/src/lab08): `src/lab08`
- [C++ Concepts](https://github.com/rpisec/mbe/tree/master/src/lab09): `src/lab09`
- [Linux Kernel](https://github.com/rpisec/mbe/tree/master/src/lab10): `src/lab10`

### Lecture Examples

- [ASLR Demos](https://github.com/rpisec/mbe/tree/master/src/lecture/aslr): `src/lecture/aslr`
- [C++ Demos](https://github.com/rpisec/mbe/tree/master/src/lecture/cpp): `src/lecture/cpp`
- [Format String Demos](https://github.com/rpisec/mbe/tree/master/src/lecture/format_strings): `src/lecture/format_strings`
- [Heap Demos](https://github.com/rpisec/mbe/tree/master/src/lecture/heap): `src/lecture/heap`
- [Misc Demos](https://github.com/rpisec/mbe/tree/master/src/lecture/misc): `src/lecture/misc`
- [ROP Demos](https://github.com/rpisec/mbe/tree/master/src/lecture/rop): `src/lecture/rop`
- [Shellcode Demo](https://github.com/rpisec/mbe/tree/master/src/lecture/shellcode): `src/lecture/shellcode`

### Course Projects

- [Project 1](https://github.com/rpisec/mbe/tree/master/src/project1): `src/project1`
- [Project 2](https://github.com/rpisec/mbe/tree/master/src/project2): `src/project2`

### Shared Helpers

- [Input Utilities](https://github.com/rpisec/mbe/blob/master/include/utils.h): `include/utils.h`

### Other components

- **Student**

## Connections

- Student → Reverse Engineering: works through (evidence: `README.md`)
- Student → Memory Corruption: works through (evidence: `README.md`)
- Student → Shellcoding: works through (evidence: `README.md`)
- Student → Format Strings: works through (evidence: `README.md`)
- Student → DEP and ROP: works through (evidence: `README.md`)
- Student → ASLR: works through (evidence: `README.md`)
- Student → Heap Exploitation: works through (evidence: `README.md`)
- Student → Misc and Cookies: works through (evidence: `README.md`)
- Student → C++ Concepts: works through (evidence: `README.md`)
- Student → Linux Kernel: works through (evidence: `README.md`)
- Student → Project 1: completes (evidence: `README.md`)
- Student → Project 2: completes (evidence: `README.md`)
- Student → ASLR Demos: studies (evidence: `README.md`)
- Student → C++ Demos: studies (evidence: `README.md`)
- Student → Format String Demos: studies (evidence: `README.md`)
- Student → Heap Demos: studies (evidence: `README.md`)
- Student → Misc Demos: studies (evidence: `README.md`)
- Student → ROP Demos: studies (evidence: `README.md`)
- Student → Shellcode Demo: studies (evidence: `README.md`)
- Shellcode Demo → Shellcoding: prepares for (evidence: `README.md`)
- Format String Demos → Format Strings: prepares for (evidence: `README.md`)
- ROP Demos → DEP and ROP: prepares for (evidence: `README.md`)
- ASLR Demos → ASLR: prepares for (evidence: `README.md`)
- Heap Demos → Heap Exploitation: prepares for (evidence: `README.md`)
- Misc Demos → Misc and Cookies: prepares for (evidence: `README.md`)
- C++ Demos → C++ Concepts: prepares for (evidence: `README.md`)
- Reverse Engineering → Project 1: included in (evidence: `README.md`)
- ASLR → Project 2: included in (evidence: `README.md`)
- Shellcoding → Input Utilities: uses (evidence: `src/lab03/lab3A.c`)
- DEP and ROP → Input Utilities: uses (evidence: `src/lab05/lab5A.c`)
- ASLR → Input Utilities: uses (evidence: `src/lab06/lab6A.c`)
- Heap Exploitation → Input Utilities: uses (evidence: `src/lab07/lab7A.c`)
- Misc and Cookies → Input Utilities: uses (evidence: `src/lab08/lab8A.c`)
- C++ Concepts → Input Utilities: uses (evidence: `src/lab09/lab9A.cpp`)
