# mythicc2profiles/httpx architecture

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

- Interactive diagram: https://gitdiagram.com/mythicc2profiles/httpx
- Repository: https://github.com/mythicc2profiles/httpx

## Overview

httpx is a configurable Mythic C2 profile with a Mythic-facing profile service and a separate HTTP(S) listener. The main workflow loads profile definitions into Mythic, then the listener loads instance and agent configuration, registers HTTP routes, and proxies agent messages to Mythic. Configurable message placement and transforms shape that traffic; payload hosting and domain-rotation options are documented capabilities. Some builder and GraphQL implementation details were only partially sampled, so those relationships are not expanded beyond visible evidence.

Main entry points: [`C2_Profiles/httpx/httpx/c2_code/webserver/initialize.go`](https://github.com/mythicc2profiles/httpx/blob/main/C2_Profiles/httpx/httpx/c2_code/webserver/initialize.go) (Route and proxy setup), [`C2_Profiles/httpx/httpx/c2_code/main.go`](https://github.com/mythicc2profiles/httpx/blob/main/C2_Profiles/httpx/httpx/c2_code/main.go) (Listener entry), [`C2_Profiles/httpx/httpx/c2functions/builder.go`](https://github.com/mythicc2profiles/httpx/blob/main/C2_Profiles/httpx/httpx/c2functions/builder.go) (Profile builder), [`C2_Profiles/httpx/main.go`](https://github.com/mythicc2profiles/httpx/blob/main/C2_Profiles/httpx/main.go) (Profile service entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mythic["Mythic integration"]
  node_profile_entry["Profile service entry<br/>[main.go]"]
  node_profile_builder["Profile builder<br/>[builder.go]"]
  node_payload_query["Payload query<br/>[graphql_queries.go]"]
  node_generated_graphql["GraphQL client types<br/>[generated.go]"]
  node_graphql_transport["Authenticated GraphQL transport<br/>[utils.go]"]
end

subgraph group_runtime["HTTP runtime"]
  node_listener_entry["Listener entry<br/>[main.go]"]
  node_route_proxy["Route and proxy setup<br/>[initialize.go]"]
  node_wire_transforms["Wire transforms<br/>[transforms.go]"]
end

subgraph group_config["Profile configuration"]
  node_instance_config["Instance configuration<br/>[config.go]"]
  node_agent_config["Agent message config<br/>[config.go]"]
end

node_mythic_platform(("Mythic platform"))
node_mythic_server["Mythic server"]
node_c2_client(("HTTP&#40;S&#41; agent"))

node_profile_entry -->|"initializes definitions"| node_profile_builder
node_profile_entry -->|"starts C2 service"| node_mythic_platform
node_listener_entry -->|"loads instance settings"| node_instance_config
node_listener_entry -->|"loads agent settings"| node_agent_config
node_listener_entry -->|"initializes routes"| node_route_proxy
node_listener_entry -->|"starts listener"| node_route_proxy
node_c2_client -.->|"sends HTTP traffic"| node_route_proxy
node_route_proxy -->|"proxies agent messages"| node_mythic_server
node_route_proxy -->|"decodes client messages"| node_wire_transforms
node_route_proxy -->|"encodes server messages"| node_wire_transforms
node_profile_builder -->|"gets config files"| node_mythic_platform
node_profile_builder -.->|"uses GraphQL client"| node_graphql_transport
node_payload_query -->|"generates query types"| node_generated_graphql

click node_profile_entry "https://github.com/mythicc2profiles/httpx/blob/main/C2_Profiles/httpx/main.go"
click node_profile_builder "https://github.com/mythicc2profiles/httpx/blob/main/C2_Profiles/httpx/httpx/c2functions/builder.go"
click node_payload_query "https://github.com/mythicc2profiles/httpx/blob/main/C2_Profiles/httpx/httpx/c2functions/graphql_queries.go"
click node_generated_graphql "https://github.com/mythicc2profiles/httpx/blob/main/C2_Profiles/httpx/httpx/c2functions/generated.go"
click node_graphql_transport "https://github.com/mythicc2profiles/httpx/blob/main/C2_Profiles/httpx/httpx/mythicGraphql/utils.go"
click node_listener_entry "https://github.com/mythicc2profiles/httpx/blob/main/C2_Profiles/httpx/httpx/c2_code/main.go"
click node_instance_config "https://github.com/mythicc2profiles/httpx/blob/main/C2_Profiles/httpx/httpx/c2_code/webserver/config.go"
click node_agent_config "https://github.com/mythicc2profiles/httpx/blob/main/C2_Profiles/httpx/httpx/c2_code/webserver/config.go"
click node_route_proxy "https://github.com/mythicc2profiles/httpx/blob/main/C2_Profiles/httpx/httpx/c2_code/webserver/initialize.go"
click node_wire_transforms "https://github.com/mythicc2profiles/httpx/blob/main/C2_Profiles/httpx/httpx/c2_code/webserver/transforms.go"

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_profile_entry,node_profile_builder,node_payload_query,node_generated_graphql,node_graphql_transport toneBlue
class node_listener_entry,node_route_proxy,node_wire_transforms toneAmber
class node_instance_config,node_agent_config,node_mythic_server toneMint
class node_mythic_platform,node_c2_client toneIndigo
```

## Components

### Mythic integration

- [Profile service entry](https://github.com/mythicc2profiles/httpx/blob/main/C2_Profiles/httpx/main.go): `C2_Profiles/httpx/main.go`
- [Profile builder](https://github.com/mythicc2profiles/httpx/blob/main/C2_Profiles/httpx/httpx/c2functions/builder.go): `C2_Profiles/httpx/httpx/c2functions/builder.go`
- [Payload query](https://github.com/mythicc2profiles/httpx/blob/main/C2_Profiles/httpx/httpx/c2functions/graphql_queries.go): `C2_Profiles/httpx/httpx/c2functions/graphql_queries.go`
- [GraphQL client types](https://github.com/mythicc2profiles/httpx/blob/main/C2_Profiles/httpx/httpx/c2functions/generated.go): `C2_Profiles/httpx/httpx/c2functions/generated.go`
- [Authenticated GraphQL transport](https://github.com/mythicc2profiles/httpx/blob/main/C2_Profiles/httpx/httpx/mythicGraphql/utils.go): `C2_Profiles/httpx/httpx/mythicGraphql/utils.go`

### HTTP runtime

- [Listener entry](https://github.com/mythicc2profiles/httpx/blob/main/C2_Profiles/httpx/httpx/c2_code/main.go): `C2_Profiles/httpx/httpx/c2_code/main.go`
- [Route and proxy setup](https://github.com/mythicc2profiles/httpx/blob/main/C2_Profiles/httpx/httpx/c2_code/webserver/initialize.go): `C2_Profiles/httpx/httpx/c2_code/webserver/initialize.go`
- [Wire transforms](https://github.com/mythicc2profiles/httpx/blob/main/C2_Profiles/httpx/httpx/c2_code/webserver/transforms.go): `C2_Profiles/httpx/httpx/c2_code/webserver/transforms.go`

### Profile configuration

- [Instance configuration](https://github.com/mythicc2profiles/httpx/blob/main/C2_Profiles/httpx/httpx/c2_code/webserver/config.go): `C2_Profiles/httpx/httpx/c2_code/webserver/config.go`
- [Agent message config](https://github.com/mythicc2profiles/httpx/blob/main/C2_Profiles/httpx/httpx/c2_code/webserver/config.go): `C2_Profiles/httpx/httpx/c2_code/webserver/config.go`

### Other components

- **Mythic platform**
- **Mythic server**
- **HTTP(S) agent**

## Connections

- Profile service entry → Profile builder: initializes definitions (evidence: `C2_Profiles/httpx/main.go`)
- Profile service entry → Mythic platform: starts C2 service (evidence: `C2_Profiles/httpx/main.go`)
- Listener entry → Instance configuration: loads instance settings (evidence: `C2_Profiles/httpx/httpx/c2_code/main.go`)
- Listener entry → Agent message config: loads agent settings (evidence: `C2_Profiles/httpx/httpx/c2_code/main.go`)
- Listener entry → Route and proxy setup: initializes routes (evidence: `C2_Profiles/httpx/httpx/c2_code/main.go`)
- Listener entry → Route and proxy setup: starts listener (evidence: `C2_Profiles/httpx/httpx/c2_code/main.go`)
- HTTP(S) agent → Route and proxy setup: sends HTTP traffic
- Route and proxy setup → Mythic server: proxies agent messages (evidence: `C2_Profiles/httpx/httpx/c2_code/webserver/initialize.go`)
- Route and proxy setup → Wire transforms: decodes client messages (evidence: `C2_Profiles/httpx/httpx/c2_code/webserver/initialize.go`)
- Route and proxy setup → Wire transforms: encodes server messages (evidence: `C2_Profiles/httpx/httpx/c2_code/webserver/initialize.go`)
- Profile builder → Mythic platform: gets config files (evidence: `C2_Profiles/httpx/httpx/c2functions/builder.go`)
- Profile builder → Authenticated GraphQL transport: uses GraphQL client
- Payload query → GraphQL client types: generates query types (evidence: `C2_Profiles/httpx/httpx/c2functions/graphql_queries.go`)
