# rub-syssec/nyx-net architecture

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

- Interactive diagram: https://gitdiagram.com/rub-syssec/nyx-net
- Repository: https://github.com/rub-syssec/nyx-net

## Overview

This tree captures Nyx-Net’s target-side network specifications, not the Rust fuzzing engine described in the README. The principal visible workflow is defining a protocol input format and interaction code, then building an interpreter specification and serialized format; target-specific handlers implement packet behavior. The README describes fuzzing packed targets and incremental snapshots, but the runtime fuzzer and packing pipeline are outside this tree. Edges are limited to relationships shown in excerpts or explicitly documented; unsampled target implementations are represented by their spec paths.

Main entry points: [`targets/specs/daap/nyx_net_spec.py`](https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/daap/nyx_net_spec.py) (DAAP spec), [`targets/specs/dicom/nyx_net_spec.py`](https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/dicom/nyx_net_spec.py) (DICOM spec), [`targets/specs/dtls/nyx_net_spec.py`](https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/dtls/nyx_net_spec.py) (DTLS spec), [`targets/specs/ftp/nyx_net_spec.py`](https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/ftp/nyx_net_spec.py) (FTP spec)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_specs["Network specs"]
  node_daap["DAAP spec<br/>[nyx_net_spec.py]"]
  node_dicom["DICOM spec<br/>[nyx_net_spec.py]"]
  node_dns["DNS spec<br/>[nyx_net_spec.py]"]
  node_dtls["DTLS spec<br/>[nyx_net_spec.py]"]
  node_ftp["FTP spec<br/>[nyx_net_spec.py]"]
  node_ftpserver["FTP server spec<br/>[nyx_net_spec.py]"]
  node_http["HTTP spec<br/>[nyx_net_spec.py]"]
  node_mysql["MySQL server spec<br/>[nyx_net_spec.py]"]
  node_rtsp["RTSP spec<br/>[nyx_net_spec.py]"]
  node_rtspplain["RTSP plain spec<br/>[nyx_net_spec.py]"]
  node_sip["SIP spec<br/>[nyx_net_spec.py]"]
  node_smtp["SMTP spec<br/>[nyx_net_spec.py]"]
  node_ssh["SSH spec<br/>[nyx_net_spec.py]"]
  node_tls["TLS spec<br/>[nyx_net_spec.py]"]
  node_mario["Super Mario spec<br/>[nyx_net_spec.py]"]
end

subgraph group_handlers["Target handlers"]
  node_dtls_handler["DTLS bytecode handlers<br/>[bytecode_spec.h]"]
  node_daap_send["DAAP send code"]
  node_dicom_send["DICOM send code"]
  node_ftp_send["FTP send code"]
  node_rtsp_send["RTSP send code"]
  node_ssh_send["SSH packet code"]
end

subgraph group_support["Spec support"]
  node_tester["Spec format tester<br/>[main.c]"]
  node_mario_lib["Nyx target hooks<br/>[libnyx.c]"]
end

node_daap -->|"loads send code"| node_daap_send
node_dicom -->|"loads send code"| node_dicom_send
node_ftp -->|"loads send code"| node_ftp_send
node_rtsp -->|"loads send code"| node_rtsp_send
node_ssh -->|"loads packet code"| node_ssh_send
node_dtls -.->|"defines packet handlers"| node_dtls_handler
node_tester -.->|"runs target hooks"| node_mario_lib

click node_daap "https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/daap/nyx_net_spec.py"
click node_dicom "https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/dicom/nyx_net_spec.py"
click node_dns "https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/dns/nyx_net_spec.py"
click node_dtls "https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/dtls/nyx_net_spec.py"
click node_ftp "https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/ftp/nyx_net_spec.py"
click node_ftpserver "https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/ftp_server/nyx_net_spec.py"
click node_http "https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/http/nyx_net_spec.py"
click node_mysql "https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/mysql_server/nyx_net_spec.py"
click node_rtsp "https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/rtsp/nyx_net_spec.py"
click node_rtspplain "https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/rtsp_no_regex/nyx_net_spec.py"
click node_sip "https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/sip/nyx_net_spec.py"
click node_smtp "https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/smtp/nyx_net_spec.py"
click node_ssh "https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/ssh/nyx_net_spec.py"
click node_tls "https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/tls/nyx_net_spec.py"
click node_mario "https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/super_mario/nyx_net_spec.py"
click node_dtls_handler "https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/dtls/bytecode_spec.h"
click node_daap_send "https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/daap/send_code.include.c"
click node_dicom_send "https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/dicom/send_code.include.c"
click node_ftp_send "https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/ftp/send_code.include.c"
click node_rtsp_send "https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/rtsp/send_code.include.c"
click node_ssh_send "https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/ssh/send_code.include_pkt.c"
click node_tester "https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/spec_format_tester/main.c"
click node_mario_lib "https://github.com/rub-syssec/nyx-net/blob/main/targets/setup_scripts/super_mario/libnyx.c"

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_daap,node_dicom,node_dns,node_dtls,node_ftp,node_ftpserver,node_http,node_mysql,node_rtsp,node_rtspplain,node_sip,node_smtp,node_ssh,node_tls,node_mario toneBlue
class node_dtls_handler,node_daap_send,node_dicom_send,node_ftp_send,node_rtsp_send,node_ssh_send toneAmber
class node_tester,node_mario_lib toneMint
```

## Components

### Network specs

- [DAAP spec](https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/daap/nyx_net_spec.py): `targets/specs/daap/nyx_net_spec.py`
- [DICOM spec](https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/dicom/nyx_net_spec.py): `targets/specs/dicom/nyx_net_spec.py`
- [DNS spec](https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/dns/nyx_net_spec.py): `targets/specs/dns/nyx_net_spec.py`
- [DTLS spec](https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/dtls/nyx_net_spec.py): `targets/specs/dtls/nyx_net_spec.py`
- [FTP spec](https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/ftp/nyx_net_spec.py): `targets/specs/ftp/nyx_net_spec.py`
- [FTP server spec](https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/ftp_server/nyx_net_spec.py): `targets/specs/ftp_server/nyx_net_spec.py`
- [HTTP spec](https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/http/nyx_net_spec.py): `targets/specs/http/nyx_net_spec.py`
- [MySQL server spec](https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/mysql_server/nyx_net_spec.py): `targets/specs/mysql_server/nyx_net_spec.py`
- [RTSP spec](https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/rtsp/nyx_net_spec.py): `targets/specs/rtsp/nyx_net_spec.py`
- [RTSP plain spec](https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/rtsp_no_regex/nyx_net_spec.py): `targets/specs/rtsp_no_regex/nyx_net_spec.py`
- [SIP spec](https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/sip/nyx_net_spec.py): `targets/specs/sip/nyx_net_spec.py`
- [SMTP spec](https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/smtp/nyx_net_spec.py): `targets/specs/smtp/nyx_net_spec.py`
- [SSH spec](https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/ssh/nyx_net_spec.py): `targets/specs/ssh/nyx_net_spec.py`
- [TLS spec](https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/tls/nyx_net_spec.py): `targets/specs/tls/nyx_net_spec.py`
- [Super Mario spec](https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/super_mario/nyx_net_spec.py): `targets/specs/super_mario/nyx_net_spec.py`

### Target handlers

- [DTLS bytecode handlers](https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/dtls/bytecode_spec.h): `targets/specs/dtls/bytecode_spec.h`
- [DAAP send code](https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/daap/send_code.include.c): `targets/specs/daap/send_code.include.c`
- [DICOM send code](https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/dicom/send_code.include.c): `targets/specs/dicom/send_code.include.c`
- [FTP send code](https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/ftp/send_code.include.c): `targets/specs/ftp/send_code.include.c`
- [RTSP send code](https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/rtsp/send_code.include.c): `targets/specs/rtsp/send_code.include.c`
- [SSH packet code](https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/ssh/send_code.include_pkt.c): `targets/specs/ssh/send_code.include_pkt.c`

### Spec support

- [Spec format tester](https://github.com/rub-syssec/nyx-net/blob/main/targets/specs/spec_format_tester/main.c): `targets/specs/spec_format_tester/main.c`
- [Nyx target hooks](https://github.com/rub-syssec/nyx-net/blob/main/targets/setup_scripts/super_mario/libnyx.c): `targets/setup_scripts/super_mario/libnyx.c`

## Connections

- DAAP spec → DAAP send code: loads send code (evidence: `targets/specs/daap/nyx_net_spec.py`)
- DICOM spec → DICOM send code: loads send code (evidence: `targets/specs/dicom/nyx_net_spec.py`)
- FTP spec → FTP send code: loads send code (evidence: `targets/specs/ftp/nyx_net_spec.py`)
- RTSP spec → RTSP send code: loads send code (evidence: `targets/specs/rtsp/nyx_net_spec.py`)
- SSH spec → SSH packet code: loads packet code (evidence: `targets/specs/ssh/nyx_net_spec.py`)
- DTLS spec → DTLS bytecode handlers: defines packet handlers
- Spec format tester → Nyx target hooks: runs target hooks
