# 3ndg4me/autoblue-ms17-010 architecture

> Architecture diagram of the GitHub repository 3ndg4me/autoblue-ms17-010, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/3ndg4me/autoblue-ms17-010
- Repository: https://github.com/3ndg4me/autoblue-ms17-010

## Overview

##### Project type and purpose
- This is an open-source exploit toolkit for the MS17-010 (“EternalBlue”) vulnerability.
- It contains shellcode generation, exploit execution, and optional listener setup—everything needed to build and deliver a payload and catch the reverse shell.

##### File structure
- Top-level scripts:
- eternal_checker.py – scans a target for MS17-010 vulnerability.
- eternalblue_exploit7.py / 8.py / 10.py – variants of the EternalBlue exploit, each targeting different Windows versions or connection counts.
- zzz_exploit.py – alternate exploit using named pipes (Eternal Romance style).
- listener_prep.sh – shell script to scaffold a Metasploit multi/handler.
- shellcode/ – assembly source, helper scripts, and merger to build a unified shellcode binary sc_all.bin.
- mysmb.py – custom Impacket-like library used by exploits to talk SMB.
- requirements.txt – Python dependencies (e.g. Impacket).
- Configuration & build:
- shell_prep.sh – compiles x86/x64 kernel shellcode, optionally invokes msfvenom.
- shellcode/eternalblue_sc_merge.py – merges the two architectures into sc_all.bin.
- Libraries & dependencies:
- Python 3 (preferred)
- Impacket
- Metasploit Framework (msfvenom, msfconsole)

##### README for additional insights
- It outlines a two-stage workflow: generate shellcode → set up a listener → run the exploit.
- Exploit scripts speak SMB directly or leverage Metasploit handlers.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Shellcode Generation Pipeline
    subgraph "Shellcode Generation Pipeline"
        direction TB
        SP["shell_prep.sh"]:::build
        ASMX86["eternalblue_kshellcode_x86.asm"]:::build
        ASMX64["eternalblue_kshellcode_x64.asm"]:::build
        MERGE["eternalblue_sc_merge.py"]:::build
        SCBIN["sc_all.bin"]:::artifact
        SP --> ASMX86
        SP --> ASMX64
        ASMX86 --> MERGE
        ASMX64 --> MERGE
        MERGE --> SCBIN
    end

    %% Exploit Execution
    subgraph "Exploit Execution"
        direction TB
        E7["eternalblue_exploit7.py"]:::python
        E8["eternalblue_exploit8.py"]:::python
        E10["eternalblue_exploit10.py"]:::python
        ZZZ["zzz_exploit.py"]:::python
        SMB["mysmb.py"]:::python
        SCBIN --> E7
        SCBIN --> E8
        SCBIN --> E10
        SCBIN --> ZZZ
        E7 --> SMB
        E8 --> SMB
        E10 --> SMB
        ZZZ --> SMB
    end

    %% Vulnerability Checker
    VC["eternal_checker.py"]:::python

    %% Listener Setup
    LS["listener_prep.sh"]:::build
    MSF["Metasploit multi/handler"]:::external

    %% Attacker Host & Dependencies
    subgraph "Attacker Host"
        direction TB
        PY["Python 3 Runtime"]:::external
        REQ["requirements.txt"]:::external
        README["README.md"]:::external
        LICENSE["LICENSE"]:::external
    end

    %% Target System
    TARGET["Windows Target\nSMB Service (TCP/445)"]:::cloud

    %% Flows
    SCBIN -->|"use shellcode"| E7
    SCBIN -->|"use shellcode"| E8
    SCBIN -->|"use shellcode"| E10
    SCBIN -->|"use shellcode"| ZZZ
    LS --> MSF
    E7 -->|"<TCP 445 exploit>"| TARGET:::network
    E8 -->|"<TCP 445 exploit>"| TARGET:::network
    E10 -->|"<TCP 445 exploit>"| TARGET:::network
    ZZZ -->|"<Named Pipe exploit>"| TARGET:::network
    TARGET -->|"<Reverse Shell>"| MSF:::network
    VC -->|"<Scan SMB>"| TARGET:::network

    %% Click Events
    click SP "https://github.com/3ndg4me/autoblue-ms17-010/blob/master/shellcode/shell_prep.sh"
    click ASMX86 "https://github.com/3ndg4me/autoblue-ms17-010/blob/master/shellcode/eternalblue_kshellcode_x86.asm"
    click ASMX64 "https://github.com/3ndg4me/autoblue-ms17-010/blob/master/shellcode/eternalblue_kshellcode_x64.asm"
    click MERGE "https://github.com/3ndg4me/autoblue-ms17-010/blob/master/shellcode/eternalblue_sc_merge.py"
    click E7 "https://github.com/3ndg4me/autoblue-ms17-010/blob/master/eternalblue_exploit7.py"
    click E8 "https://github.com/3ndg4me/autoblue-ms17-010/blob/master/eternalblue_exploit8.py"
    click E10 "https://github.com/3ndg4me/autoblue-ms17-010/blob/master/eternalblue_exploit10.py"
    click ZZZ "https://github.com/3ndg4me/autoblue-ms17-010/blob/master/zzz_exploit.py"
    click VC "https://github.com/3ndg4me/autoblue-ms17-010/blob/master/eternal_checker.py"
    click LS "https://github.com/3ndg4me/autoblue-ms17-010/blob/master/listener_prep.sh"
    click SMB "https://github.com/3ndg4me/autoblue-ms17-010/blob/master/mysmb.py"
    click REQ "https://github.com/3ndg4me/autoblue-ms17-010/blob/master/requirements.txt"
    click README "https://github.com/3ndg4me/autoblue-ms17-010/blob/master/README.md"
    click LICENSE "https://github.com/3ndg4me/autoblue-ms17-010/tree/master/LICENSE"

    %% Styles
    classDef build fill:#D0E6FF,stroke:#0057D9
    classDef python fill:#DFFFD0,stroke:#3E8E41
    classDef external fill:#FFE5B4,stroke:#D47900
    classDef network stroke:#D10000,stroke-width:2px
    classDef artifact fill:#F0F0F0,stroke:#555
    classDef cloud fill:#E0F7FA,stroke:#007C91,stroke-dasharray: 5 5
```
