# red-cadets/vkactf-2024 architecture

> Architecture diagram of the GitHub repository red-cadets/vkactf-2024, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/red-cadets/vkactf-2024
- Repository: https://github.com/red-cadets/vkactf-2024

## Overview

##### Project Type and Purpose
- This is an open-source CTF write-ups repository (VKACTF-2024). Its purpose is to store, categorize, and present challenge files (“give”) and their corresponding solutions (“solution”) across multiple categories (crypto, pwn, misc, reverse, web).

##### File Structure Analysis
- Top-level: README.md and a single directory `categories/`.
- Under `categories/`: five subdirectories: `crypto/`, `pwn/`, `misc/`, `reverse/`, `web/`.
- Under each category: multiple challenge directories named like `cry-1e-LFG`, `pwn-1e-Robbery-of-Uncle-Sam`, etc.
- Inside each challenge directory:
- `give/` – the provided files for the challenge.
- `solution/` – the write-up folder containing:
– `exploit/` (source code of the exploit),
– `writeup.md` (the narrative solution).
- Some code in `give/` appears in various languages (Python, Go, protobufs), but there is no build/deploy pipeline or runtime server.

##### README Insights
- The README serves as an index to all write-ups, grouping them by category with hyperlinks to each `writeup.md`.

- Main Components:
A. Repository Root
B. README (index)
C. Categories (crypto, pwn, misc, reverse, web)
D. Challenge Modules (one per challenge)
E. Sub-components per challenge:
– “give” (input files)
– “solution” – includes:
- writeup.md
- exploit (code)
- img (supporting visuals)
- Relationships:
- The repository root contains README and the `categories/` directory.
- Each category contains multiple challenges.
- Each challenge branches into two parallel streams: “give” (the problem statement/artifacts) and “solution” (the analysis and deliverables).

##### Architectural Patterns & Principles
- Hierarchical modularity: grouping by category, then by challenge, then by content type.
- Separation of concerns: original challenge (“give”) is strictly separated from analysis and artifacts (“solution”).
- Consistency: every challenge follows the same directory pattern, enabling automation (e.g., static site generator).

##### Technologies & Artifacts
- Markdown (writeup.md) for documentation.
- Python, Go, and protobuf files for challenge code.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "VKACTF-2024 Repo"
        direction TB
        README["README.md"]:::index
        CATEGORIES["categories/"]:::dir
    end

    %% Categories
    subgraph "categories/" 
        direction TB
        CRYPTO["crypto/"]:::crypto
        PWN["pwn/"]:::pwn
        MISC["misc/"]:::misc
        REVERSE["reverse/"]:::reverse
        WEB["web/"]:::web
    end

    %% README links to categories
    README -->|indexes| CRYPTO
    README -->|indexes| PWN
    README -->|indexes| MISC
    README -->|indexes| REVERSE
    README -->|indexes| WEB

    %% Crypto category challenges
    subgraph "crypto/" 
        direction TB
        subgraph "cry-1e-LFG" 
            direction TB
            G1["give/"]:::give
            S1["solution/"]:::solution
            G1 -->|proceeds to| S1
            subgraph "solution contents"
                direction TB
                W1["writeup.md"]:::writeup
                E1["exploit/"]:::exploit
                I1["img/"]:::img
                subgraph "exploit code"
                    direction TB
                    EX1["exploit.py"]:::code
                    EX2["utils.py"]:::code
                end
            end
        end

        subgraph "cry-2m-FSS"
            direction TB
            G2["give/"]:::give
            S2["solution/"]:::solution
            G2 -->|proceeds to| S2
            subgraph "solution contents"
                direction TB
                W2["writeup.md"]:::writeup
                E2["exploit/"]:::exploit
                I2["img/"]:::img
                subgraph "exploit code"
                    direction TB
                    EX3["exploit.py"]:::code
                    EX4["delete_y.py"]:::code
                end
            end
        end
    end

    %% Click events
    click README "https://github.com/red-cadets/vkactf-2024/blob/main/README.md"
    click CATEGORIES "https://github.com/red-cadets/vkactf-2024/tree/main/categories/"
    click CRYPTO "https://github.com/red-cadets/vkactf-2024/tree/main/categories/crypto/"
    click PWN "https://github.com/red-cadets/vkactf-2024/tree/main/categories/pwn/"
    click MISC "https://github.com/red-cadets/vkactf-2024/tree/main/categories/misc/"
    click REVERSE "https://github.com/red-cadets/vkactf-2024/tree/main/categories/reverse/"
    click WEB "https://github.com/red-cadets/vkactf-2024/tree/main/categories/web/"
    click G1 "https://github.com/red-cadets/vkactf-2024/tree/main/categories/crypto/cry-1e-LFG/give/"
    click EX1 "https://github.com/red-cadets/vkactf-2024/blob/main/categories/crypto/cry-1e-LFG/solution/exploit/exploit.py"
    click EX2 "https://github.com/red-cadets/vkactf-2024/blob/main/categories/crypto/cry-1e-LFG/solution/exploit/utils.py"
    click W1 "https://github.com/red-cadets/vkactf-2024/blob/main/categories/crypto/cry-1e-LFG/solution/writeup.md"
    click I1 "https://github.com/red-cadets/vkactf-2024/tree/main/categories/crypto/cry-1e-LFG/solution/img/"
    click S1 "https://github.com/red-cadets/vkactf-2024/tree/main/categories/crypto/cry-1e-LFG/solution/"
    click G2 "https://github.com/red-cadets/vkactf-2024/tree/main/categories/crypto/cry-2m-FSS/give/"
    click EX3 "https://github.com/red-cadets/vkactf-2024/blob/main/categories/crypto/cry-2m-FSS/solution/exploit/exploit.py"
    click EX4 "https://github.com/red-cadets/vkactf-2024/blob/main/categories/crypto/cry-2m-FSS/solution/exploit/delete_y.py"
    click W2 "https://github.com/red-cadets/vkactf-2024/blob/main/categories/crypto/cry-2m-FSS/solution/writeup.md"
    click I2 "https://github.com/red-cadets/vkactf-2024/tree/main/categories/crypto/cry-2m-FSS/solution/img/"
    click S2 "https://github.com/red-cadets/vkactf-2024/tree/main/categories/crypto/cry-2m-FSS/solution/"

    %% Styles
    classDef index fill:#f9f,stroke:#333,stroke-width:2px
    classDef dir fill:#bbf,stroke:#333,stroke-width:1px
    classDef crypto fill:#ffd,stroke:#333,stroke-width:1px
    classDef pwn fill:#dfd,stroke:#333,stroke-width:1px
    classDef misc fill:#ddf,stroke:#333,stroke-width:1px
    classDef reverse fill:#fdd,stroke:#333,stroke-width:1px
    classDef web fill:#fdc,stroke:#333,stroke-width:1px
    classDef give fill:#def,stroke:#333,stroke-width:1px
    classDef solution fill:#dfd,stroke:#333,stroke-width:1px
    classDef writeup fill:#fff,stroke:#333,stroke-width:1px
    classDef exploit fill:#fee,stroke:#333,stroke-width:1px
    classDef img fill:#efe,stroke:#333,stroke-width:1px
    classDef code fill:#eee,stroke:#333,stroke-width:1px
```
