# o-o-overflow/dc2021f-shooow-your-shell-public architecture

> Architecture diagram of the GitHub repository o-o-overflow/dc2021f-shooow-your-shell-public, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/o-o-overflow/dc2021f-shooow-your-shell-public
- Repository: https://github.com/o-o-overflow/dc2021f-shooow-your-shell-public

## Overview

Shooow Your Shell is a multi-architecture shellcode hill-climbing challenge. A team submits hex-encoded shellcode to the service, which checks blocked-byte and progression rules, then tests whether it reads a generated secret under each supported architecture. Successful submissions update the hill history and score. A separate Kubernetes bot synchronizes histories across team pods. The source excerpts show the service’s execution and persistence flow and the bot’s synchronization flow; deployment wiring and the local/remote interaction tools were not sampled, so they are not mapped here.

Main entry points: [`service/service.py`](https://github.com/o-o-overflow/dc2021f-shooow-your-shell-public/blob/public/service/service.py) (Challenge service), [`syncer/bot.py`](https://github.com/o-o-overflow/dc2021f-shooow-your-shell-public/blob/public/syncer/bot.py) (History sync bot), [`service/shuffl.c`](https://github.com/o-o-overflow/dc2021f-shooow-your-shell-public/blob/public/service/shuffl.c) (Sandbox launcher), [`service/runner.c`](https://github.com/o-o-overflow/dc2021f-shooow-your-shell-public/blob/public/service/runner.c) (Shellcode runner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_challenge["Challenge service"]
  node_service["Challenge service<br/>[service.py]"]
  node_submission["Shellcode input<br/>[service.py]"]
  node_rules["Hill constraints<br/>[service.py]"]
  node_secret["Secret generation<br/>[service.py]"]
  node_history[("Hill history<br/>[service.py]")]
  node_score["Score output<br/>[service.py]"]
end

subgraph group_execution["Sandbox execution"]
  node_sandbox["Sandbox launcher<br/>[shuffl.c]"]
  node_qemu["QEMU emulators"]
  node_runner["Shellcode runner<br/>[runner.c]"]
  node_shellcode["Submitted shellcode"]
end

subgraph group_sync["History synchronization"]
  node_syncbot["History sync bot<br/>[bot.py]"]
  node_team_pods["Team game pods"]
  node_kubernetes["Kubernetes API"]
  node_shared_history["Shared history"]
end

node_team(("Submitting team"))

node_team -->|"submits code"| node_service
node_service -->|"reads hex"| node_submission
node_service -->|"checks constraints"| node_rules
node_service -->|"generates secret"| node_secret
node_service -->|"launches tests"| node_sandbox
node_service -->|"reads and writes"| node_history
node_service -->|"writes results"| node_score
node_service -->|"pipes input"| node_shellcode
node_sandbox -->|"executes emulator"| node_qemu
node_qemu -->|"runs launcher"| node_runner
node_runner -->|"executes bytes"| node_shellcode
node_syncbot -->|"queries pods"| node_kubernetes
node_syncbot -->|"copies histories"| node_team_pods
node_team_pods -->|"provides latest"| node_shared_history
node_syncbot -->|"selects latest"| node_shared_history
node_shared_history -->|"distributes history"| node_team_pods

click node_service "https://github.com/o-o-overflow/dc2021f-shooow-your-shell-public/blob/public/service/service.py"
click node_submission "https://github.com/o-o-overflow/dc2021f-shooow-your-shell-public/blob/public/service/service.py"
click node_rules "https://github.com/o-o-overflow/dc2021f-shooow-your-shell-public/blob/public/service/service.py"
click node_secret "https://github.com/o-o-overflow/dc2021f-shooow-your-shell-public/blob/public/service/service.py"
click node_history "https://github.com/o-o-overflow/dc2021f-shooow-your-shell-public/blob/public/service/service.py"
click node_score "https://github.com/o-o-overflow/dc2021f-shooow-your-shell-public/blob/public/service/service.py"
click node_sandbox "https://github.com/o-o-overflow/dc2021f-shooow-your-shell-public/blob/public/service/shuffl.c"
click node_runner "https://github.com/o-o-overflow/dc2021f-shooow-your-shell-public/blob/public/service/runner.c"
click node_syncbot "https://github.com/o-o-overflow/dc2021f-shooow-your-shell-public/blob/public/syncer/bot.py"

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_service,node_submission,node_rules,node_secret,node_history,node_score toneBlue
class node_sandbox,node_qemu,node_runner,node_shellcode toneAmber
class node_syncbot,node_team_pods,node_kubernetes,node_shared_history toneMint
class node_team toneIndigo
```

## Components

### Challenge service

- [Challenge service](https://github.com/o-o-overflow/dc2021f-shooow-your-shell-public/blob/public/service/service.py): `service/service.py`
- [Shellcode input](https://github.com/o-o-overflow/dc2021f-shooow-your-shell-public/blob/public/service/service.py): `service/service.py`
- [Hill constraints](https://github.com/o-o-overflow/dc2021f-shooow-your-shell-public/blob/public/service/service.py): `service/service.py`
- [Secret generation](https://github.com/o-o-overflow/dc2021f-shooow-your-shell-public/blob/public/service/service.py): `service/service.py`
- [Hill history](https://github.com/o-o-overflow/dc2021f-shooow-your-shell-public/blob/public/service/service.py): `service/service.py`
- [Score output](https://github.com/o-o-overflow/dc2021f-shooow-your-shell-public/blob/public/service/service.py): `service/service.py`

### Sandbox execution

- [Sandbox launcher](https://github.com/o-o-overflow/dc2021f-shooow-your-shell-public/blob/public/service/shuffl.c): `service/shuffl.c`
- **QEMU emulators**
- [Shellcode runner](https://github.com/o-o-overflow/dc2021f-shooow-your-shell-public/blob/public/service/runner.c): `service/runner.c`
- **Submitted shellcode**

### History synchronization

- [History sync bot](https://github.com/o-o-overflow/dc2021f-shooow-your-shell-public/blob/public/syncer/bot.py): `syncer/bot.py`
- **Team game pods**
- **Kubernetes API**
- **Shared history**

### Other components

- **Submitting team**

## Connections

- Submitting team → Challenge service: submits code (evidence: `service/service.py`)
- Challenge service → Shellcode input: reads hex (evidence: `service/service.py`)
- Challenge service → Hill constraints: checks constraints (evidence: `service/service.py`)
- Challenge service → Secret generation: generates secret (evidence: `service/service.py`)
- Challenge service → Sandbox launcher: launches tests (evidence: `service/service.py`)
- Challenge service → Hill history: reads and writes (evidence: `service/service.py`)
- Challenge service → Score output: writes results (evidence: `service/service.py`)
- Challenge service → Submitted shellcode: pipes input (evidence: `service/service.py`)
- Sandbox launcher → QEMU emulators: executes emulator (evidence: `service/shuffl.c`)
- QEMU emulators → Shellcode runner: runs launcher
- Shellcode runner → Submitted shellcode: executes bytes (evidence: `service/runner.c`)
- History sync bot → Kubernetes API: queries pods (evidence: `syncer/bot.py`)
- History sync bot → Team game pods: copies histories (evidence: `syncer/bot.py`)
- Team game pods → Shared history: provides latest
- History sync bot → Shared history: selects latest (evidence: `syncer/bot.py`)
- Shared history → Team game pods: distributes history
