# watchtowrlabs/watchtowr-vs-ivanti-epmm-cve-2025-4427-cve-2025-4428 architecture

> Architecture diagram of the GitHub repository watchtowrlabs/watchtowr-vs-ivanti-epmm-cve-2025-4427-cve-2025-4428, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/watchtowrlabs/watchtowr-vs-ivanti-epmm-cve-2025-4427-cve-2025-4428
- Repository: https://github.com/watchtowrlabs/watchtowr-vs-ivanti-epmm-cve-2025-4427-cve-2025-4428

## Overview

##### Project type and purpose
- This is a small command-line detection tool written in Python.
- Purpose: send crafted HTTP requests to an Ivanti EPMM server and determine if it is vulnerable to the CVE-2025-4427 + CVE-2025-4428 pre-auth RCE chain. It generates an “artifact” (a proof-of-concept request/response sequence) and prints vulnerability status.

##### File structure
- Top level contains:
- README.md – project description and usage
- watchTowr-vs-Ivanti-EPMM-CVE-2025-4427-CVE-2025-4428.py – the main script
- No subdirectories, no external configs, single-module script.

##### README for additional insights
- Confirms the script runs via “python3 <script> –H <target>.”
- Describes the detection steps (e.g., sending `id` command).
- No external microservices, pure client→server interaction.

##### Main components
a. CLI Frontend
– Parses command-line argument for target URL
– Options parser component (e.g., argparse)
b. HTTP Client
– Builds and sends HTTP requests to /vulnerable endpoint
– Implements any necessary headers or payload encoding
– Uses Python requests library or http.client
c. Vulnerability Detection Module
– Encapsulates the logic of chaining CVE-2025-4427 + CVE-2025-4428 exploits
– Crafts proof-of-concept payloads (e.g., injecting shell commands)
– Parses and inspects HTTP responses for indicators of RCE (e.g., the output of `id`)
d. Output / Reporter
– Interprets the detection module’s result
– Prints “VULNERABLE” or “NOT VULNERABLE” to the console
– Optionally writes an artifact file or log
e. External Target Server
– Ivanti EPMM service under test
– Shows the network boundary between your script and the target

##### Relationships and interactions
- The CLI Frontend feeds the target URL into the HTTP Client.
- The HTTP Client sends requests over the network to the Ivanti EPMM server.
- Responses come back to the Vulnerability Detection Module.
- Detection Module analyzes response, returns a boolean or status string.
- Output / Reporter prints the final verdict to standard output.

##### Architectural patterns and design principles
- Single-process, linear flow (no concurrency required).
- Modular functions: separation of concerns (parsing, HTTP, detection, reporting).
- External dependency: Python standard library plus any HTTP library.

##### Detailed capture of essential elements
- Python runtime as an overall container.
- Optional subprocess or shell invocation if the script uses subprocess for local analysis.
- Detection steps: “Exploit step 1 (CVE-4427) → session established → Exploit step 2 (CVE-4428).”
- That the HTTP Client and Detector collaborate to form the RCE chain.

##### Final advice
- Use precise labels: component names and data formats (JSON, headers, shell output).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% External actor and documentation
    User["User"]:::external
    Docs["Project Documentation (README.md)"]:::docs

    %% Python runtime container
    subgraph "Python Runtime"
        CLI["CLI Parser"]:::cli
        HTTP["HTTP Client"]:::internal
        Detector["Vulnerability Detector"]:::internal
        Reporter["Output Reporter"]:::internal
    end

    Service["Ivanti EPMM Service"]:::externalService

    %% Connections
    User -->|"input target URL"| CLI
    Docs -.->|"usage instructions"| CLI
    CLI -->|"parsed URL"| HTTP
    HTTP -->|"HTTP POST /exploit with payload"| Service
    Service -->|"HTTP 200 + command output"| Detector
    Detector -->|"detection result"| Reporter

    %% Click Events
    click CLI "https://github.com/watchtowrlabs/watchtowr-vs-ivanti-epmm-cve-2025-4427-cve-2025-4428/blob/main/watchTowr-vs-Ivanti-EPMM-CVE-2025-4427-CVE-2025-4428.py"
    click HTTP "https://github.com/watchtowrlabs/watchtowr-vs-ivanti-epmm-cve-2025-4427-cve-2025-4428/blob/main/watchTowr-vs-Ivanti-EPMM-CVE-2025-4427-CVE-2025-4428.py"
    click Detector "https://github.com/watchtowrlabs/watchtowr-vs-ivanti-epmm-cve-2025-4427-cve-2025-4428/blob/main/watchTowr-vs-Ivanti-EPMM-CVE-2025-4427-CVE-2025-4428.py"
    click Reporter "https://github.com/watchtowrlabs/watchtowr-vs-ivanti-epmm-cve-2025-4427-cve-2025-4428/blob/main/watchTowr-vs-Ivanti-EPMM-CVE-2025-4427-CVE-2025-4428.py"
    click Docs "https://github.com/watchtowrlabs/watchtowr-vs-ivanti-epmm-cve-2025-4427-cve-2025-4428/blob/main/README.md"

    %% Styles
    classDef cli fill:#f9b784,stroke:#333,stroke-width:1px
    classDef internal fill:#a0d3f7,stroke:#333,stroke-width:1px
    classDef externalService fill:#b3e6b3,stroke:#333,stroke-width:1px
    classDef docs fill:#e0e0e0,stroke:#333,stroke-width:1px
    classDef external fill:#cccccc,stroke:#333,stroke-width:1px
```
