# ouspg/softwarehardwaresec architecture

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

- Interactive diagram: https://gitdiagram.com/ouspg/softwarehardwaresec
- Repository: https://github.com/ouspg/softwarehardwaresec

## Overview

This repository is a hands-on university course, not one integrated application. Its principal workflow is for students to work through self-contained labs exploring a security topic and its practical exercises. The graph preserves the seven documented topic areas and highlights internal behavior visible in sampled code, including protocol serialization, a fuzzing target, a ROP example, and the TPM-backed messenger. Individual lab READMEs and several subsystems were not sampled, so their internal flows are not inferred.

Main entry points: [`README.md`](https://github.com/ouspg/softwarehardwaresec/blob/main/README.md) (Lab exercises), [`7.HSMs_and_remote_attestation/messenger/main.go`](https://github.com/ouspg/softwarehardwaresec/blob/main/7.HSMs_and_remote_attestation/messenger/main.go) (TPM messenger), [`1.Fuzzing_technology/misc/target.c`](https://github.com/ouspg/softwarehardwaresec/blob/main/1.Fuzzing_technology/misc/target.c) (TLS fuzz target), [`2.Fuzzing_integration/lib/protocol.cpp`](https://github.com/ouspg/softwarehardwaresec/blob/main/2.Fuzzing_integration/lib/protocol.cpp) (Message protocol)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_software["Software security labs"]
  node_fuzzing_target["TLS fuzz target<br/>[target.c]"]
  node_fuzzing_examples["Fuzzing examples<br/>[misc]"]
  node_protocol["Message protocol<br/>[protocol.cpp]"]
  node_protocol_types["Protocol types<br/>[protocol.h]"]
  node_shellcode_targets["Vulnerable programs<br/>[overflow.c]"]
  node_rop_example["ROP example<br/>[ROP_hello.py]"]
  node_remote_overflow["Remote overflow task<br/>[overflow.c]"]
  node_malware_lab["Malware analysis<br/>[4.Malware_analysis]"]
end

subgraph group_hardware["Hardware security labs"]
  node_glitch_scripts["Glitching exercises<br/>[scripts]"]
  node_hardware_lab["Hardware hacking materials<br/>[6.Hardware_hacking]"]
  node_ir_commands["Lamp IR commands"]
end

subgraph group_attestation["Attestation lab"]
  node_messenger["TPM messenger<br/>[main.go]"]
  node_message_schema["Message schema<br/>[message.proto]"]
end

subgraph group_course["Course structure"]
  node_course_labs["Lab exercises<br/>[README.md]"]
end

node_student(("Student"))
node_tpm_simulator["TPM simulator"]
node_unix_socket(("Unix socket peer"))

node_student -->|"completes labs"| node_course_labs
node_course_labs -->|"includes fuzzing"| node_fuzzing_target
node_course_labs -->|"includes fuzzing"| node_fuzzing_examples
node_course_labs -->|"includes integration"| node_protocol
node_course_labs -->|"includes exploits"| node_shellcode_targets
node_course_labs -->|"includes exploits"| node_remote_overflow
node_course_labs -->|"includes analysis"| node_malware_lab
node_course_labs -->|"includes glitching"| node_glitch_scripts
node_course_labs -->|"includes hardware testing"| node_hardware_lab
node_course_labs -->|"includes attestation"| node_messenger
node_fuzzing_target -->|"reads stdin"| node_student
node_protocol -->|"uses types"| node_protocol_types
node_rop_example -->|"runs process"| node_shellcode_targets
node_messenger -->|"gets random data"| node_tpm_simulator
node_messenger -->|"uses schema"| node_message_schema
node_messenger -->|"sends messages"| node_unix_socket
node_unix_socket -->|"can send data"| node_messenger
node_course_labs -->|"includes wireless methods"| node_ir_commands

click node_course_labs "https://github.com/ouspg/softwarehardwaresec/blob/main/README.md"
click node_fuzzing_target "https://github.com/ouspg/softwarehardwaresec/blob/main/1.Fuzzing_technology/misc/target.c"
click node_fuzzing_examples "https://github.com/ouspg/softwarehardwaresec/tree/main/1.Fuzzing_technology/misc"
click node_protocol "https://github.com/ouspg/softwarehardwaresec/blob/main/2.Fuzzing_integration/lib/protocol.cpp"
click node_protocol_types "https://github.com/ouspg/softwarehardwaresec/blob/main/2.Fuzzing_integration/lib/protocol.h"
click node_shellcode_targets "https://github.com/ouspg/softwarehardwaresec/blob/main/3.Shellcoding/src/vuln_progs/overflow.c"
click node_rop_example "https://github.com/ouspg/softwarehardwaresec/blob/main/3.Shellcoding/src/ROP_hello.py"
click node_remote_overflow "https://github.com/ouspg/softwarehardwaresec/blob/main/3.Shellcoding/docker/overflow.c"
click node_malware_lab "https://github.com/ouspg/softwarehardwaresec/tree/main/4.Malware_analysis"
click node_glitch_scripts "https://github.com/ouspg/softwarehardwaresec/tree/main/5.Glitching_and_sidechannels/scripts"
click node_hardware_lab "https://github.com/ouspg/softwarehardwaresec/tree/main/6.Hardware_hacking"
click node_ir_commands "https://github.com/ouspg/softwarehardwaresec/blob/main/6.Hardware_hacking/lamp_ir_constants.h"
click node_messenger "https://github.com/ouspg/softwarehardwaresec/blob/main/7.HSMs_and_remote_attestation/messenger/main.go"
click node_message_schema "https://github.com/ouspg/softwarehardwaresec/blob/main/7.HSMs_and_remote_attestation/messenger/message.proto"

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_fuzzing_target,node_fuzzing_examples,node_protocol,node_protocol_types,node_shellcode_targets,node_rop_example,node_remote_overflow,node_malware_lab toneBlue
class node_glitch_scripts,node_hardware_lab,node_ir_commands toneAmber
class node_messenger,node_message_schema toneMint
class node_course_labs toneRose
class node_student,node_tpm_simulator,node_unix_socket toneIndigo
```

## Components

### Software security labs

- [TLS fuzz target](https://github.com/ouspg/softwarehardwaresec/blob/main/1.Fuzzing_technology/misc/target.c): `1.Fuzzing_technology/misc/target.c`
- [Fuzzing examples](https://github.com/ouspg/softwarehardwaresec/tree/main/1.Fuzzing_technology/misc): `1.Fuzzing_technology/misc`
- [Message protocol](https://github.com/ouspg/softwarehardwaresec/blob/main/2.Fuzzing_integration/lib/protocol.cpp): `2.Fuzzing_integration/lib/protocol.cpp`
- [Protocol types](https://github.com/ouspg/softwarehardwaresec/blob/main/2.Fuzzing_integration/lib/protocol.h): `2.Fuzzing_integration/lib/protocol.h`
- [Vulnerable programs](https://github.com/ouspg/softwarehardwaresec/blob/main/3.Shellcoding/src/vuln_progs/overflow.c): `3.Shellcoding/src/vuln_progs/overflow.c`
- [ROP example](https://github.com/ouspg/softwarehardwaresec/blob/main/3.Shellcoding/src/ROP_hello.py): `3.Shellcoding/src/ROP_hello.py`
- [Remote overflow task](https://github.com/ouspg/softwarehardwaresec/blob/main/3.Shellcoding/docker/overflow.c): `3.Shellcoding/docker/overflow.c`
- [Malware analysis](https://github.com/ouspg/softwarehardwaresec/tree/main/4.Malware_analysis): `4.Malware_analysis`

### Hardware security labs

- [Glitching exercises](https://github.com/ouspg/softwarehardwaresec/tree/main/5.Glitching_and_sidechannels/scripts): `5.Glitching_and_sidechannels/scripts`
- [Hardware hacking materials](https://github.com/ouspg/softwarehardwaresec/tree/main/6.Hardware_hacking): `6.Hardware_hacking`
- [Lamp IR commands](https://github.com/ouspg/softwarehardwaresec/blob/main/6.Hardware_hacking/lamp_ir_constants.h): `6.Hardware_hacking/lamp_ir_constants.h`

### Attestation lab

- [TPM messenger](https://github.com/ouspg/softwarehardwaresec/blob/main/7.HSMs_and_remote_attestation/messenger/main.go): `7.HSMs_and_remote_attestation/messenger/main.go`
- [Message schema](https://github.com/ouspg/softwarehardwaresec/blob/main/7.HSMs_and_remote_attestation/messenger/message.proto): `7.HSMs_and_remote_attestation/messenger/message.proto`

### Course structure

- [Lab exercises](https://github.com/ouspg/softwarehardwaresec/blob/main/README.md): `README.md`

### Other components

- **Student**
- **TPM simulator**
- **Unix socket peer**

## Connections

- Student → Lab exercises: completes labs (evidence: `README.md`)
- Lab exercises → TLS fuzz target: includes fuzzing (evidence: `README.md`)
- Lab exercises → Fuzzing examples: includes fuzzing (evidence: `README.md`)
- Lab exercises → Message protocol: includes integration (evidence: `README.md`)
- Lab exercises → Vulnerable programs: includes exploits (evidence: `README.md`)
- Lab exercises → Remote overflow task: includes exploits (evidence: `README.md`)
- Lab exercises → Malware analysis: includes analysis (evidence: `README.md`)
- Lab exercises → Glitching exercises: includes glitching (evidence: `README.md`)
- Lab exercises → Hardware hacking materials: includes hardware testing (evidence: `README.md`)
- Lab exercises → TPM messenger: includes attestation (evidence: `README.md`)
- TLS fuzz target → Student: reads stdin (evidence: `1.Fuzzing_technology/misc/target.c`)
- Message protocol → Protocol types: uses types (evidence: `2.Fuzzing_integration/lib/protocol.cpp`)
- ROP example → Vulnerable programs: runs process (evidence: `3.Shellcoding/src/ROP_hello.py`)
- TPM messenger → TPM simulator: gets random data (evidence: `7.HSMs_and_remote_attestation/messenger/main.go`)
- TPM messenger → Message schema: uses schema (evidence: `7.HSMs_and_remote_attestation/messenger/main.go`)
- TPM messenger → Unix socket peer: sends messages (evidence: `7.HSMs_and_remote_attestation/messenger/main.go`)
- Unix socket peer → TPM messenger: can send data (evidence: `7.HSMs_and_remote_attestation/messenger/main.go`)
- Lab exercises → Lamp IR commands: includes wireless methods (evidence: `README.md`)
