# morsmalleo/ahmyth architecture

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

- Interactive diagram: https://gitdiagram.com/morsmalleo/ahmyth
- Repository: https://github.com/morsmalleo/ahmyth

## Overview

AhMyth is an Android remote-access tool with an Electron desktop controller and an Android payload. The documented user flow is to build a standalone APK or use an APK template, install the payload, then manage the device through the Victim’s Lab. The sampled code shows the desktop app accepting Socket.IO connections and the Android service starting its connection manager; the broader capability details come from the README, not a full inspection of those subsystems. The diagram keeps capabilities coarse-grained and marks documented workflow links separately from sampled implementation evidence.

Main entry points: [`AhMyth-Server/app/app`](https://github.com/morsmalleo/ahmyth/tree/master/AhMyth-Server/app/app) (APK Builder), [`AhMyth-Server/app/main.js`](https://github.com/morsmalleo/ahmyth/blob/master/AhMyth-Server/app/main.js) (Desktop App), [`AhMyth-Client/app/src/main/java/ahmyth/mine/king/ahmyth/MainActivity.java`](https://github.com/morsmalleo/ahmyth/blob/master/AhMyth-Client/app/src/main/java/ahmyth/mine/king/ahmyth/MainActivity.java) (Payload Activity), [`AhMyth-Client/app/src/main/java/ahmyth/mine/king/ahmyth/MainService.java`](https://github.com/morsmalleo/ahmyth/blob/master/AhMyth-Client/app/src/main/java/ahmyth/mine/king/ahmyth/MainService.java) (Background Service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop Controller"]
  node_desktopapp["Desktop App<br/>[main.js]"]
  node_lab["Victim’s Lab"]
  node_victims["Victim Registry<br/>[Victim.js]"]
  node_socketserver["Socket Listener<br/>[main.js]"]
end

subgraph group_payload["Android Payload"]
  node_activity["Payload Activity<br/>[MainActivity.java]"]
  node_service["Background Service<br/>[MainService.java]"]
  node_connection["Command Handler"]
  node_transport["Socket Client<br/>[IOSocket.java]"]
end

subgraph group_capabilities["Device Capabilities"]
  node_media["Camera and Mic"]
  node_location["Location<br/>[LocManager.java]"]
  node_files["File Access<br/>[FileManager.java]"]
  node_personaldata["Personal Data"]
end

subgraph group_delivery["Payload Delivery"]
  node_builder["APK Builder"]
  node_template["APK Template"]
end

node_operator(("Operator"))
node_android(("Android Device"))

node_operator -->|"builds payload"| node_builder
node_template -.->|"supplies template"| node_builder
node_builder -->|"installs payload"| node_android
node_android -.->|"runs payload"| node_activity
node_activity -->|"starts service"| node_service
node_service -->|"starts connection"| node_connection
node_operator -->|"controls device"| node_lab
node_desktopapp -->|"opens interface"| node_lab
node_desktopapp -->|"starts listener"| node_socketserver
node_socketserver -->|"registers connection"| node_victims
node_connection -->|"uses socket"| node_transport

click node_builder "https://github.com/morsmalleo/ahmyth/tree/master/AhMyth-Server/app/app"
click node_template "https://github.com/morsmalleo/ahmyth/tree/master/AhMyth-Server/app/app/Factory"
click node_desktopapp "https://github.com/morsmalleo/ahmyth/blob/master/AhMyth-Server/app/main.js"
click node_lab "https://github.com/morsmalleo/ahmyth/tree/master/AhMyth-Server/app/app/views"
click node_victims "https://github.com/morsmalleo/ahmyth/blob/master/AhMyth-Server/app/app/assets/js/model/Victim.js"
click node_socketserver "https://github.com/morsmalleo/ahmyth/blob/master/AhMyth-Server/app/main.js"
click node_activity "https://github.com/morsmalleo/ahmyth/blob/master/AhMyth-Client/app/src/main/java/ahmyth/mine/king/ahmyth/MainActivity.java"
click node_service "https://github.com/morsmalleo/ahmyth/blob/master/AhMyth-Client/app/src/main/java/ahmyth/mine/king/ahmyth/MainService.java"
click node_connection "https://github.com/morsmalleo/ahmyth/blob/master/AhMyth-Client/app/src/main/java/ahmyth/mine/king/ahmyth/ConnectionManager.java"
click node_transport "https://github.com/morsmalleo/ahmyth/blob/master/AhMyth-Client/app/src/main/java/ahmyth/mine/king/ahmyth/IOSocket.java"
click node_media "https://github.com/morsmalleo/ahmyth/tree/master/AhMyth-Client/app/src/main/java/ahmyth/mine/king/ahmyth"
click node_location "https://github.com/morsmalleo/ahmyth/blob/master/AhMyth-Client/app/src/main/java/ahmyth/mine/king/ahmyth/LocManager.java"
click node_files "https://github.com/morsmalleo/ahmyth/blob/master/AhMyth-Client/app/src/main/java/ahmyth/mine/king/ahmyth/FileManager.java"
click node_personaldata "https://github.com/morsmalleo/ahmyth/tree/master/AhMyth-Client/app/src/main/java/ahmyth/mine/king/ahmyth"

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_desktopapp,node_lab,node_victims,node_socketserver toneBlue
class node_activity,node_service,node_connection,node_transport toneAmber
class node_media,node_location,node_files,node_personaldata toneMint
class node_builder,node_template toneRose
class node_operator,node_android toneIndigo
```

## Components

### Desktop Controller

- [Desktop App](https://github.com/morsmalleo/ahmyth/blob/master/AhMyth-Server/app/main.js): `AhMyth-Server/app/main.js`
- [Victim’s Lab](https://github.com/morsmalleo/ahmyth/tree/master/AhMyth-Server/app/app/views): `AhMyth-Server/app/app/views`
- [Victim Registry](https://github.com/morsmalleo/ahmyth/blob/master/AhMyth-Server/app/app/assets/js/model/Victim.js): `AhMyth-Server/app/app/assets/js/model/Victim.js`
- [Socket Listener](https://github.com/morsmalleo/ahmyth/blob/master/AhMyth-Server/app/main.js): `AhMyth-Server/app/main.js`

### Android Payload

- [Payload Activity](https://github.com/morsmalleo/ahmyth/blob/master/AhMyth-Client/app/src/main/java/ahmyth/mine/king/ahmyth/MainActivity.java): `AhMyth-Client/app/src/main/java/ahmyth/mine/king/ahmyth/MainActivity.java`
- [Background Service](https://github.com/morsmalleo/ahmyth/blob/master/AhMyth-Client/app/src/main/java/ahmyth/mine/king/ahmyth/MainService.java): `AhMyth-Client/app/src/main/java/ahmyth/mine/king/ahmyth/MainService.java`
- [Command Handler](https://github.com/morsmalleo/ahmyth/blob/master/AhMyth-Client/app/src/main/java/ahmyth/mine/king/ahmyth/ConnectionManager.java): `AhMyth-Client/app/src/main/java/ahmyth/mine/king/ahmyth/ConnectionManager.java`
- [Socket Client](https://github.com/morsmalleo/ahmyth/blob/master/AhMyth-Client/app/src/main/java/ahmyth/mine/king/ahmyth/IOSocket.java): `AhMyth-Client/app/src/main/java/ahmyth/mine/king/ahmyth/IOSocket.java`

### Device Capabilities

- [Camera and Mic](https://github.com/morsmalleo/ahmyth/tree/master/AhMyth-Client/app/src/main/java/ahmyth/mine/king/ahmyth): `AhMyth-Client/app/src/main/java/ahmyth/mine/king/ahmyth`
- [Location](https://github.com/morsmalleo/ahmyth/blob/master/AhMyth-Client/app/src/main/java/ahmyth/mine/king/ahmyth/LocManager.java): `AhMyth-Client/app/src/main/java/ahmyth/mine/king/ahmyth/LocManager.java`
- [File Access](https://github.com/morsmalleo/ahmyth/blob/master/AhMyth-Client/app/src/main/java/ahmyth/mine/king/ahmyth/FileManager.java): `AhMyth-Client/app/src/main/java/ahmyth/mine/king/ahmyth/FileManager.java`
- [Personal Data](https://github.com/morsmalleo/ahmyth/tree/master/AhMyth-Client/app/src/main/java/ahmyth/mine/king/ahmyth): `AhMyth-Client/app/src/main/java/ahmyth/mine/king/ahmyth`

### Payload Delivery

- [APK Builder](https://github.com/morsmalleo/ahmyth/tree/master/AhMyth-Server/app/app): `AhMyth-Server/app/app`
- [APK Template](https://github.com/morsmalleo/ahmyth/tree/master/AhMyth-Server/app/app/Factory): `AhMyth-Server/app/app/Factory`

### Other components

- **Operator**
- **Android Device**

## Connections

- Operator → APK Builder: builds payload (evidence: `README.md`)
- APK Template → APK Builder: supplies template (evidence: `README.md`)
- APK Builder → Android Device: installs payload (evidence: `README.md`)
- Android Device → Payload Activity: runs payload (evidence: `README.md`)
- Payload Activity → Background Service: starts service (evidence: `AhMyth-Client/app/src/main/java/ahmyth/mine/king/ahmyth/MainActivity.java`)
- Background Service → Command Handler: starts connection (evidence: `AhMyth-Client/app/src/main/java/ahmyth/mine/king/ahmyth/MainService.java`)
- Operator → Victim’s Lab: controls device (evidence: `README.md`)
- Desktop App → Victim’s Lab: opens interface (evidence: `AhMyth-Server/app/main.js`)
- Desktop App → Socket Listener: starts listener (evidence: `AhMyth-Server/app/main.js`)
- Socket Listener → Victim Registry: registers connection (evidence: `AhMyth-Server/app/main.js`)
- Command Handler → Socket Client: uses socket (evidence: `AhMyth-Client/app/src/main/java/ahmyth/mine/king/ahmyth/ConnectionManager.java`)
