# iamnewbiez/wshell architecture

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

- Interactive diagram: https://gitdiagram.com/iamnewbiez/wshell
- Repository: https://github.com/iamnewbiez/wshell

## Overview

##### Project type and purpose
- This is an open-source toolkit of webshell one-liner generators and support scripts. It provides quick “write-and-run” payloads in multiple languages (PHP, ASPX, PowerShell, JavaScript) plus helper scripts (tmux.sh) to establish and manage reverse shells.

##### File structure
- Top-level files:
- Invoke-PowerShellTcp.ps1 – PowerShell reverse-TCP script
- script.js – likely a browser-based payload injector or helper
- tmux.sh – session persistence / multiplexing helper
- alt-asp-ext.txt, alt-php-ext.txt – notes on alternative file extensions
- Language subdirectories:
- aspx/ (images.aspx, webshell.ashx) – .NET-based webshells
- php/ (echo, nc.php, rev, shell.php, test2) – PHP webshells and netcat wrappers
- README shows how to generate a simple PHP webshell on the fly.

##### README for additional insights
- Focuses on PHP payload generation. No overarching architecture described—this is a library of payload modules.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Attacker Side
    subgraph "Attacker Side"
        direction TB
        subgraph "Payload Generator"
            direction TB
            JS["script.js"] 
            PS["Invoke-PowerShellTcp.ps1"]
            ALTASP["alt-asp-ext.txt"]
            ALTPHP["alt-php-ext.txt"]
        end
        subgraph "Listener / Session Manager"
            direction TB
            TMUX["tmux.sh"]
        end
    end

    %% Network Channel
    subgraph "Network Channel"
        direction TB
        HTTP(("HTTP/HTTPS"))
        TCP(("TCP Reverse Shell"))
    end

    %% Target Server
    subgraph "Target Server"
        direction TB
        subgraph "ASPX Web Server & Runtime"
            direction TB
            ASPX_IMAGES["images.aspx"]
            ASPX_SHELL["webshell.ashx"]
        end
        subgraph "PHP Web Server & Runtime"
            direction TB
            PHPECHO["echo"]
            PHPNC["nc.php"]
            PHPREV["rev"]
            PHPSHELL["shell.php"]
            PHPTEST["test2"]
        end
    end

    %% Connections: Payload to HTTP
    JS -->|HTTP POST/GET| HTTP
    PS -->|HTTP POST/GET| HTTP
    ALTASP -->|HTTP payload| HTTP
    ALTPHP -->|HTTP payload| HTTP

    %% HTTP to Web Server
    HTTP -->|"Invoke ASPX"| ASPX_IMAGES
    HTTP -->|"Invoke ASPX"| ASPX_SHELL
    HTTP -->|"Invoke PHP"| PHPECHO
    HTTP -->|"Invoke PHP"| PHPNC
    HTTP -->|"Invoke PHP"| PHPREV
    HTTP -->|"Invoke PHP"| PHPSHELL
    HTTP -->|"Invoke PHP"| PHPTEST

    %% Reverse shell from Server to TCP
    ASPX_IMAGES -->|Reverse-TCP| TCP
    ASPX_SHELL -->|Reverse-TCP| TCP
    PHPECHO -->|Reverse-TCP| TCP
    PHPNC -->|Reverse-TCP| TCP
    PHPREV -->|Reverse-TCP| TCP
    PHPSHELL -->|Reverse-TCP| TCP
    PHPTEST -->|Reverse-TCP| TCP

    %% TCP to Listener
    TCP -->|Shell Session| TMUX

    %% Click Events
    click JS "https://github.com/iamnewbiez/wshell/blob/main/script.js"
    click PS "https://github.com/iamnewbiez/wshell/blob/main/Invoke-PowerShellTcp.ps1"
    click ALTASP "https://github.com/iamnewbiez/wshell/blob/main/alt-asp-ext.txt"
    click ALTPHP "https://github.com/iamnewbiez/wshell/blob/main/alt-php-ext.txt"
    click TMUX "https://github.com/iamnewbiez/wshell/blob/main/tmux.sh"
    click ASPX_IMAGES "https://github.com/iamnewbiez/wshell/blob/main/aspx/images.aspx"
    click ASPX_SHELL "https://github.com/iamnewbiez/wshell/blob/main/aspx/webshell.ashx"
    click PHPECHO "https://github.com/iamnewbiez/wshell/tree/main/php/echo"
    click PHPNC "https://github.com/iamnewbiez/wshell/blob/main/php/nc.php"
    click PHPREV "https://github.com/iamnewbiez/wshell/tree/main/php/rev"
    click PHPSHELL "https://github.com/iamnewbiez/wshell/blob/main/php/shell.php"
    click PHPTEST "https://github.com/iamnewbiez/wshell/tree/main/php/test2"

    %% Styling
    classDef attacker fill:#D0E7FF,stroke:#333,stroke-width:1px
    classDef network fill:#D0FFD0,stroke:#333,stroke-width:1px
    classDef target fill:#FFD0D0,stroke:#333,stroke-width:1px

    class JS,PS,ALTASP,ALTPHP,TMUX attacker
    class HTTP,TCP network
    class ASPX_IMAGES,ASPX_SHELL,PHPECHO,PHPNC,PHPREV,PHPSHELL,PHPTEST target
```
