# infosecn1nja/ad-attack-defense architecture

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

- Interactive diagram: https://gitdiagram.com/infosecn1nja/ad-attack-defense
- Repository: https://github.com/infosecn1nja/ad-attack-defense

## Overview

##### Project Type and Purpose
- This project is a knowledge base focused on the tactics, techniques, and procedures (TTPs) used in Active Directory attacks as well as the guidance to mitigate, detect, and prevent these methods.
- Its purpose is educational and strategic—it maps out the progression of an AD kill chain, listing stages of attacks (Discovery, Privilege Escalation, Defense Evasion, Credential Dumping, Lateral Movement, Persistence) and then provides defensive measures and detection strategies.

##### Breaking Down the File Structure
- Since the only file is “README.md,” the “architecture” isn’t code-driven but rather is an organized, hierarchical document.
- Despite the lack of multiple directories or source files, the document itself has a clear layer/section structure (for example, headings for each attack phase and sections for tools/resources and defenses).

##### Main Components
- Attack Stages – Treat each major heading as a separate component:
○ Discovery
○ Privilege Escalation
○ Defense Evasion
○ Credential Dumping
○ Lateral Movement
○ Persistence
- Defensive Measures – This is represented in the “Defense & Detection” section and includes resources, security updates, and best practices.
- External Resources – Indicate that references, cheat sheets, and eBooks supplement the information.

##### Representing Relationships and Interactions
- Branching where defensive measures are applied—such as how “Defense & Detection” may intercept or mitigate various stages.
- Integration points where the attacker’s tools interface with specific AD vulnerabilities or technologies.

##### Highlighting Architectural Patterns and Design Principles
- Modularity; each stage is a discrete area but is also interconnected. This hints at the modular nature of attacks and defensive measures.
- Annotations to note external resources or key attack examples (for instance, specific CVEs or documented proof-of-concept attacks like Zerologon or PetitPotam).

##### Putting It All Together
- Every component is clearly labeled with a brief descriptor; for example, note next to “Privilege Escalation” that it includes methods such as Kerberoasting, DNSAdmins abuse, or exploiting vulnerabilities like Zerologon.

##### Final Advice
- Detail is key. While the document is vast, do not shy away from capturing as much of the “logical architecture” as possible—even if it means having many components.

Happy diagramming!

## Diagram (Mermaid)

```mermaid
flowchart TD
    A["Active Directory Kill Chain"]:::header

    subgraph "Attack Stages"
        D["Discovery"]:::attack
        P["Privilege Escalation\n(Kerberoasting, DNSAdmins abuse, Zerologon)"]:::attack
        E["Defense Evasion"]:::attack
        C["Credential Dumping"]:::attack
        L["Lateral Movement"]:::attack
        Pe["Persistence"]:::attack
    end

    DM["Defensive Measures\n(Defense & Detection)"]:::defense
    TS["Tools & Scripts\n(BloodHound, Mimikatz, PowerView)"]:::tools
    ER["External Resources\n(references, cheat sheets, eBooks)"]:::resources
    UT["Underlying Technologies\n(PowerShell, Kerberos, NTLM, SMB, AD services)"]:::tech

    A --> D
    D --> P
    P --> E
    E --> C
    C --> L
    L --> Pe

    DM --- D
    DM --- P
    DM --- E
    DM --- C
    DM --- L
    DM --- Pe

    TS --- D
    TS --- P
    TS --- E
    TS --- C
    TS --- L
    TS --- Pe

    ER --- A

    UT --- D
    UT --- P
    UT --- E
    UT --- C
    UT --- L
    UT --- Pe

    click D "https://github.com/infosecn1nja/ad-attack-defense/blob/master/README.md"
    click P "https://github.com/infosecn1nja/ad-attack-defense/blob/master/README.md"
    click E "https://github.com/infosecn1nja/ad-attack-defense/blob/master/README.md"
    click C "https://github.com/infosecn1nja/ad-attack-defense/blob/master/README.md"
    click L "https://github.com/infosecn1nja/ad-attack-defense/blob/master/README.md"
    click Pe "https://github.com/infosecn1nja/ad-attack-defense/blob/master/README.md"
    click DM "https://github.com/infosecn1nja/ad-attack-defense/blob/master/README.md"
    click TS "https://github.com/infosecn1nja/ad-attack-defense/blob/master/README.md"
    click ER "https://github.com/infosecn1nja/ad-attack-defense/blob/master/README.md"
    click UT "https://github.com/infosecn1nja/ad-attack-defense/blob/master/README.md"

    classDef header fill:#cccccc,stroke:#333,stroke-width:2px;
    classDef attack fill:#ff9a9e,stroke:#333,stroke-width:1.5px;
    classDef defense fill:#a8e6cf,stroke:#333,stroke-width:1.5px;
    classDef tools fill:#ffcc5c,stroke:#333,stroke-width:1.5px;
    classDef resources fill:#96ceb4,stroke:#333,stroke-width:1.5px;
    classDef tech fill:#b39ddb,stroke:#333,stroke-width:1.5px;
```
