# harmj0y/cortana architecture

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

- Interactive diagram: https://gitdiagram.com/harmj0y/cortana
- Repository: https://github.com/harmj0y/cortana

## Overview

This repository is a Cortana script pack for extending Armitage or Cobalt Strike during penetration tests. The principal workflow is loading the pack, then using its scripts for host labeling, credential collection, user hunting, payload injection, and evasion; it also adds help references. The README documents these capabilities, but most Cortana and auxiliary implementation files were not sampled, so links between the Cortana scripts and their Ruby modules are shown only as unverified optional relationships.

Main entry points: [`load_all.cna`](https://github.com/harmj0y/cortana/blob/master/load_all.cna) (Load All), [`beacon/beacon.cna`](https://github.com/harmj0y/cortana/blob/master/beacon/beacon.cna) (Beacon Features), [`user_hunter/user_hunter.cna`](https://github.com/harmj0y/cortana/blob/master/user_hunter/user_hunter.cna) (User Hunter Script), [`safetynet/safetynet.cna`](https://github.com/harmj0y/cortana/blob/master/safetynet/safetynet.cna) (SafetyNet Script)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_loading["Pack Loading"]
  node_loader["Load All<br/>[load_all.cna]"]
end

subgraph group_beacon["Beacon Management"]
  node_beacon_scripts["Beacon Features<br/>[beacon.cna]"]
  node_powerup["PowerUp<br/>[PowerUp.ps1]"]
  node_powerview["PowerView<br/>[PowerView.ps1]"]
end

subgraph group_operations["Host Operations"]
  node_cred_collection["Credential Collection<br/>[grabcreds.cna]"]
  node_user_hunt_script["User Hunter Script<br/>[user_hunter.cna]"]
  node_user_hunter_module["User Enumeration Module<br/>[user_hunter.rb]"]
end

subgraph group_integrations["Payload Integrations"]
  node_safetynet_script["SafetyNet Script<br/>[safetynet.cna]"]
  node_payload_injector["Payload Injector"]
  node_veil["Veil Evasion<br/>[veil_evasion.cna]"]
end

subgraph group_help["Help References"]
  node_references["Reference Links<br/>[references.cna]"]
end

node_operator(("Pentester"))

node_operator -->|"loads pack"| node_loader
node_loader -->|"loads script"| node_beacon_scripts
node_loader -->|"loads script"| node_cred_collection
node_loader -->|"loads script"| node_user_hunt_script
node_loader -->|"loads script"| node_safetynet_script
node_loader -->|"loads script"| node_veil
node_loader -->|"loads script"| node_references
node_operator -->|"labels hosts"| node_beacon_scripts
node_operator -->|"collects credentials"| node_cred_collection
node_operator -->|"hunts users"| node_user_hunt_script
node_operator -->|"auto-injects payloads"| node_safetynet_script
node_operator -->|"generates payloads"| node_veil
node_operator -->|"opens help links"| node_references
node_user_hunt_script -.->|"may invoke"| node_user_hunter_module
node_safetynet_script -.->|"may invoke"| node_payload_injector
node_beacon_scripts -.->|"may use"| node_powerup
node_beacon_scripts -.->|"may use"| node_powerview

click node_loader "https://github.com/harmj0y/cortana/blob/master/load_all.cna"
click node_beacon_scripts "https://github.com/harmj0y/cortana/blob/master/beacon/beacon.cna"
click node_powerup "https://github.com/harmj0y/cortana/blob/master/beacon/PowerUp.ps1"
click node_powerview "https://github.com/harmj0y/cortana/blob/master/beacon/PowerView.ps1"
click node_cred_collection "https://github.com/harmj0y/cortana/blob/master/grabcreds/grabcreds.cna"
click node_user_hunt_script "https://github.com/harmj0y/cortana/blob/master/user_hunter/user_hunter.cna"
click node_user_hunter_module "https://github.com/harmj0y/cortana/blob/master/user_hunter/user_hunter.rb"
click node_safetynet_script "https://github.com/harmj0y/cortana/blob/master/safetynet/safetynet.cna"
click node_payload_injector "https://github.com/harmj0y/cortana/blob/master/safetynet/smart_payload_inject.rb"
click node_veil "https://github.com/harmj0y/cortana/blob/master/veil_evasion/veil_evasion.cna"
click node_references "https://github.com/harmj0y/cortana/blob/master/references/references.cna"

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_loader toneBlue
class node_beacon_scripts,node_powerup,node_powerview toneAmber
class node_cred_collection,node_user_hunt_script,node_user_hunter_module toneMint
class node_safetynet_script,node_payload_injector,node_veil toneRose
class node_references,node_operator toneIndigo
```

## Components

### Pack Loading

- [Load All](https://github.com/harmj0y/cortana/blob/master/load_all.cna): `load_all.cna`

### Beacon Management

- [Beacon Features](https://github.com/harmj0y/cortana/blob/master/beacon/beacon.cna): `beacon/beacon.cna`
- [PowerUp](https://github.com/harmj0y/cortana/blob/master/beacon/PowerUp.ps1): `beacon/PowerUp.ps1`
- [PowerView](https://github.com/harmj0y/cortana/blob/master/beacon/PowerView.ps1): `beacon/PowerView.ps1`

### Host Operations

- [Credential Collection](https://github.com/harmj0y/cortana/blob/master/grabcreds/grabcreds.cna): `grabcreds/grabcreds.cna`
- [User Hunter Script](https://github.com/harmj0y/cortana/blob/master/user_hunter/user_hunter.cna): `user_hunter/user_hunter.cna`
- [User Enumeration Module](https://github.com/harmj0y/cortana/blob/master/user_hunter/user_hunter.rb): `user_hunter/user_hunter.rb`

### Payload Integrations

- [SafetyNet Script](https://github.com/harmj0y/cortana/blob/master/safetynet/safetynet.cna): `safetynet/safetynet.cna`
- [Payload Injector](https://github.com/harmj0y/cortana/blob/master/safetynet/smart_payload_inject.rb): `safetynet/smart_payload_inject.rb`
- [Veil Evasion](https://github.com/harmj0y/cortana/blob/master/veil_evasion/veil_evasion.cna): `veil_evasion/veil_evasion.cna`

### Help References

- [Reference Links](https://github.com/harmj0y/cortana/blob/master/references/references.cna): `references/references.cna`

### Other components

- **Pentester**

## Connections

- Pentester → Load All: loads pack (evidence: `README.md`)
- Load All → Beacon Features: loads script (evidence: `README.md`)
- Load All → Credential Collection: loads script (evidence: `README.md`)
- Load All → User Hunter Script: loads script (evidence: `README.md`)
- Load All → SafetyNet Script: loads script (evidence: `README.md`)
- Load All → Veil Evasion: loads script (evidence: `README.md`)
- Load All → Reference Links: loads script (evidence: `README.md`)
- Pentester → Beacon Features: labels hosts (evidence: `README.md`)
- Pentester → Credential Collection: collects credentials (evidence: `README.md`)
- Pentester → User Hunter Script: hunts users (evidence: `README.md`)
- Pentester → SafetyNet Script: auto-injects payloads (evidence: `README.md`)
- Pentester → Veil Evasion: generates payloads (evidence: `README.md`)
- Pentester → Reference Links: opens help links (evidence: `README.md`)
- User Hunter Script → User Enumeration Module: may invoke
- SafetyNet Script → Payload Injector: may invoke
- Beacon Features → PowerUp: may use
- Beacon Features → PowerView: may use
