# ikow/java4shell-poc architecture

> Architecture diagram of the GitHub repository ikow/java4shell-poc, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ikow/java4shell-poc
- Repository: https://github.com/ikow/java4shell-poc

## Overview

Java4Shell is a vulnerability PoC and detection toolkit. Its main workflow is running the bounded Java trigger to observe corruption; separate capabilities scan local hosts and remote services and provide IDS/WAF/SIEM signatures. The README documents a containerized lab and mitigation verification, but their internals were not sampled, so those subsystems are represented at directory level and links are limited to documented relationships. The network scanner source was inspected; other implementation details are based on README descriptions.

Main entry points: [`poc/Base64Trigger.java`](https://github.com/ikow/java4shell-poc/blob/main/poc/Base64Trigger.java) (Base64 Trigger), [`scanner/java4shell_scan.py`](https://github.com/ikow/java4shell-poc/blob/main/scanner/java4shell_scan.py) (Network Scanner), [`scanner/java4shell_scan.sh`](https://github.com/ikow/java4shell-poc/blob/main/scanner/java4shell_scan.sh) (Host Scanner), [`detection/java4shell.rules`](https://github.com/ikow/java4shell-poc/blob/main/detection/java4shell.rules) (IDS Signatures)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_poc["Corruption PoC"]
  node_trigger["Base64 Trigger<br/>[Base64Trigger.java]"]
  node_trigger_result["Corruption Result"]
end

subgraph group_scanning["Exposure Scanning"]
  node_host_scan["Host Scanner<br/>[java4shell_scan.sh]"]
  node_host_state["Local Java State"]
  node_network_scan["Network Scanner<br/>[java4shell_scan.py]"]
  node_remote_findings["Probe Findings"]
end

subgraph group_detections["Detection Rules"]
  node_signature_rules["IDS Signatures<br/>[java4shell.rules]"]
  node_sigma_rules["SIEM Rules<br/>[java4shell.yaml]"]
  node_waf_rules["WAF Rules<br/>[modsecurity.conf]"]
end

subgraph group_lab["Reproduction Lab"]
  node_lab_env["Vulnerable Lab"]
end

node_user(("Operator"))
node_jdk["OpenJDK Base64"]
node_targets["Remote Targets"]
node_traffic_logs["Traffic And Logs"]
node_lab_operator(("Lab Operator"))

node_user -->|"runs"| node_trigger
node_trigger -->|"decodes input"| node_jdk
node_trigger -->|"checks corruption"| node_trigger_result
node_user -->|"runs"| node_host_scan
node_host_scan -->|"checks"| node_host_state
node_user -->|"starts scan"| node_network_scan
node_targets -->|"provides targets"| node_network_scan
node_network_scan -->|"probes and classifies"| node_remote_findings
node_traffic_logs -.->|"matches traffic"| node_signature_rules
node_traffic_logs -.->|"detects signals"| node_sigma_rules
node_traffic_logs -.->|"filters requests"| node_waf_rules
node_lab_operator -->|"starts lab"| node_lab_env
node_lab_operator -->|"runs in lab"| node_trigger

click node_trigger "https://github.com/ikow/java4shell-poc/blob/main/poc/Base64Trigger.java"
click node_host_scan "https://github.com/ikow/java4shell-poc/blob/main/scanner/java4shell_scan.sh"
click node_network_scan "https://github.com/ikow/java4shell-poc/blob/main/scanner/java4shell_scan.py"
click node_signature_rules "https://github.com/ikow/java4shell-poc/blob/main/detection/java4shell.rules"
click node_sigma_rules "https://github.com/ikow/java4shell-poc/blob/main/detection/java4shell.yaml"
click node_waf_rules "https://github.com/ikow/java4shell-poc/blob/main/detection/modsecurity.conf"
click node_lab_env "https://github.com/ikow/java4shell-poc/tree/main/lab"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_trigger,node_trigger_result toneBlue
class node_host_scan,node_host_state,node_network_scan,node_remote_findings toneAmber
class node_signature_rules,node_sigma_rules,node_waf_rules toneMint
class node_lab_env toneRose
class node_user,node_jdk,node_targets,node_traffic_logs,node_lab_operator toneIndigo
```

## Components

### Corruption PoC

- [Base64 Trigger](https://github.com/ikow/java4shell-poc/blob/main/poc/Base64Trigger.java): `poc/Base64Trigger.java`
- **Corruption Result**

### Exposure Scanning

- [Host Scanner](https://github.com/ikow/java4shell-poc/blob/main/scanner/java4shell_scan.sh): `scanner/java4shell_scan.sh`
- **Local Java State**
- [Network Scanner](https://github.com/ikow/java4shell-poc/blob/main/scanner/java4shell_scan.py): `scanner/java4shell_scan.py`
- **Probe Findings**

### Detection Rules

- [IDS Signatures](https://github.com/ikow/java4shell-poc/blob/main/detection/java4shell.rules): `detection/java4shell.rules`
- [SIEM Rules](https://github.com/ikow/java4shell-poc/blob/main/detection/java4shell.yaml): `detection/java4shell.yaml`
- [WAF Rules](https://github.com/ikow/java4shell-poc/blob/main/detection/modsecurity.conf): `detection/modsecurity.conf`

### Reproduction Lab

- [Vulnerable Lab](https://github.com/ikow/java4shell-poc/tree/main/lab): `lab`

### Other components

- **Operator**
- **OpenJDK Base64**
- **Remote Targets**
- **Traffic And Logs**
- **Lab Operator**

## Connections

- Operator → Base64 Trigger: runs (evidence: `README.md`)
- Base64 Trigger → OpenJDK Base64: decodes input (evidence: `poc/Base64Trigger.java`)
- Base64 Trigger → Corruption Result: checks corruption (evidence: `poc/Base64Trigger.java`)
- Operator → Host Scanner: runs (evidence: `README.md`)
- Host Scanner → Local Java State: checks (evidence: `README.md`)
- Operator → Network Scanner: starts scan (evidence: `README.md`)
- Remote Targets → Network Scanner: provides targets (evidence: `scanner/java4shell_scan.py`)
- Network Scanner → Probe Findings: probes and classifies (evidence: `scanner/java4shell_scan.py`)
- Traffic And Logs → IDS Signatures: matches traffic (evidence: `README.md`)
- Traffic And Logs → SIEM Rules: detects signals (evidence: `README.md`)
- Traffic And Logs → WAF Rules: filters requests (evidence: `README.md`)
- Lab Operator → Vulnerable Lab: starts lab (evidence: `README.md`)
- Lab Operator → Base64 Trigger: runs in lab (evidence: `README.md`)
