# urban20/sabueso-mitm architecture

> Architecture diagram of the GitHub repository urban20/sabueso-mitm, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/urban20/sabueso-mitm
- Repository: https://github.com/urban20/sabueso-mitm

## Overview

##### Project type and purpose
- This is a single‐script, Python‐based network penetration tool that performs an ARP spoofing “man-in-the-middle” (MITM) attack and then sniffs HTTP/HTTPS packets to extract hostnames or IPs.
- Unlike a multi‐service backend or full-stack app, it’s a CLI security utility, structured as a linear pipeline of modules.

##### File structure
- Top‐level files:
- mitm.py   → The only source file; contains the entire logic.
- requirements.txt → Declares Python dependencies (scapy, possibly others).
- readme.md → Describes purpose and usage.
- .gitignore
- No subdirectories or multiple services. All “layers” live inside mitm.py.

##### README for additional insights
- The README explains:
- Attack type: ARP spoofing.
- Workflow: Poison ARP tables → Intercept traffic → Sniff & parse HTTP/HTTPS packets → Extract hostnames/IPs.
- Uses scapy for packet crafting/sniffing.
- Warning about disrupting victim connectivity.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "Attacker Host"
        direction TB
        ARP["ARP Manager Module"]:::module
        SNF["Sniffer Module"]:::module
        PRS["Parser/Logger Module"]:::module
    end

    LIB["scapy (External Library)"]:::library
    VIC1((Victim A)):::external
    VIC2((Victim B)):::external
    OUT["Console/File Output"]:::output

    ARP -->|“ARP replies/poisoning”| VIC1
    ARP -->|“ARP replies/poisoning”| VIC2
    VIC1 -->|“intercepted packets”| SNF
    VIC2 -->|“intercepted packets”| SNF
    SNF -->|“raw packets”| PRS
    PRS -->|“extracted hostnames/IPs”| OUT

    LIB -->|“provides packet crafting/sniffing API”| ARP
    LIB -->|“provides packet crafting/sniffing API”| SNF

    click ARP "https://github.com/urban20/sabueso-mitm/blob/master/mitm.py"
    click SNF "https://github.com/urban20/sabueso-mitm/blob/master/mitm.py"
    click PRS "https://github.com/urban20/sabueso-mitm/blob/master/mitm.py"
    click LIB "https://github.com/urban20/sabueso-mitm/blob/master/requirements.txt"
    click OUT "https://github.com/urban20/sabueso-mitm/blob/master/mitm.py"
    click VIC1 "https://github.com/urban20/sabueso-mitm/blob/master/mitm.py"
    click VIC2 "https://github.com/urban20/sabueso-mitm/blob/master/mitm.py"
    click ARP "https://github.com/urban20/sabueso-mitm/blob/master/mitm.py"
    click SNF "https://github.com/urban20/sabueso-mitm/blob/master/mitm.py"
    click PRS "https://github.com/urban20/sabueso-mitm/blob/master/mitm.py"
    click LIB "https://github.com/urban20/sabueso-mitm/blob/master/requirements.txt"
    click OUT "https://github.com/urban20/sabueso-mitm/blob/master/mitm.py"
    click VIC1 "https://github.com/urban20/sabueso-mitm/blob/master/mitm.py"
    click VIC2 "https://github.com/urban20/sabueso-mitm/blob/master/mitm.py"
    click LIB "https://github.com/urban20/sabueso-mitm/blob/master/requirements.txt"
    click OUT "https://github.com/urban20/sabueso-mitm/blob/master/mitm.py"
    click VIC1 "https://github.com/urban20/sabueso-mitm/blob/master/mitm.py"
    click VIC2 "https://github.com/urban20/sabueso-mitm/blob/master/mitm.py"

    classDef module fill:#ADD8E6,stroke:#000,stroke-width:1px
    classDef library fill:#FFD580,stroke:#000,stroke-width:1px
    classDef external fill:#D3D3D3,stroke:#000,stroke-width:1px
    classDef output fill:#90EE90,stroke:#000,stroke-width:1px
```
