Sploitus

Exploit for ffensive-playbook

githubexploit Β· 2026-04-16

Exploit Code

README175 lines
## https://sploitus.com/exploit?id=F96427D2-B972-581C-8620-E8E4BB1ECA8B
# HackTheBox β€” Writeups Collection

A collection of HackTheBox machine writeups organized by difficulty level. Each writeup documents the exploitation chain, vulnerabilities exploited, and key takeaways.

---

## πŸ“‚ Easy

| Machine | OS | Key Vulnerabilities | Writeup |
|---------|----|---------------------|---------|
| **[Silentium](Easy/Silentium_HTB_Writeup.md)** | Linux | Flowise Low-Code RCE, Gogs Symlink Attack (CVE-2024-55947 bypass) | [Read β†’](Easy/Silentium_HTB_Writeup.md) |
| **[Kobold](Easy/Kobold-Writeup.md)** | Linux | MCP API Command Injection, Docker Group Privilege Escalation | [Read β†’](Easy/Kobold-Writeup.md) |
| **[CCTV](Easy/cctv.md)** | Linux | ZoneMinder SQLi, motionEye Command Injection | [Read β†’](Easy/cctv.md) |

---

## πŸ“‚ Medium

| Machine | OS | Key Vulnerabilities | Writeup |
|---------|----|---------------------|---------|
| **[DevArea](Medium/DevArea.md)** | Linux | Apache CXF XOP Include LFI, Hoverfly Middleware RCE, SUID Binary Abuse | [Read β†’](Medium/DevArea.md) |
| **[Overwatch](Medium/Overwatch.md)** | Windows (AD) | ADIDNS Poisoning, Linked Server Exploitation, WCF Service Command Injection | [Read β†’](Medium/Overwatch.md) |

---

## πŸ“‚ Hard

| Machine | OS | Key Vulnerabilities | Writeup |
|---------|----|---------------------|---------|
| *(None yet)* | | | |

---

## πŸ›‘οΈ Vulnerability Index

### Command Injection

| CVE | Machine | Description | Reference |
|-----|---------|-------------|-----------|
| β€” | **Kobold** | MCP API `/api/mcp/connect` accepts unsanitized `command` and `args` parameters, enabling arbitrary OS command execution via JSON payload | [Kobold Writeup β†’](Easy/Kobold-Writeup.md#initial-access) |
| [CVE-2025-60787](https://nvd.nist.gov/vuln/detail/CVE-2025-60787) | **CCTV** | motionEye configuration parameters (`picture_filename`, `image_file_name`) are written to config files without sanitization, then executed by the `motion` daemon in a shell context | [CCTV Writeup β†’](Easy/cctv.md#privilege-escalation) |
| [CVE-2024-45388](https://github.com/gunzf0x/CVE-2025-60787) | **DevArea** | Hoverfly middleware API allows authenticated users to inject arbitrary scripts via PUT request to `/api/v2/hoverfly/middleware` | [DevArea Writeup β†’](Medium/DevArea.md#hoverfly-rce) |
| β€” | **Overwatch** | WCF Monitoring Service `KillProcess` SOAP endpoint accepts unsanitized `processName` parameter, enabling command injection via semicolon chaining | [Overwatch Writeup β†’](Medium/Overwatch.md#privilege-escalation) |

### SQL Injection

| CVE | Machine | Description | Reference |
|-----|---------|-------------|-----------|
| [CVE-2024-51482](https://www.penligent.ai/hackinglabs/cve-2024-51482-the-zoneminder-sql-injection-that-kept-security-teams-exposed-past-1-37-61/) | **CCTV** | Time-based blind SQL injection in ZoneMinder's event tagging functionality via the `tid` parameter in `/zm/index.php?view=request&request=event&action=removetag` | [CCTV Writeup β†’](Easy/cctv.md#cve-2024-51482--time-based-blind-sql-injection) |

### File Inclusion / SSRF

| CVE | Machine | Description | Reference |
|-----|---------|-------------|-----------|
| [CVE-2022-46364](https://vulners.com/cve/CVE-2022-46364) | **DevArea** | Apache CXF XOP Include vulnerability allows arbitrary file read via `` in multipart SOAP requests | [DevArea Writeup β†’](Medium/DevArea.md#cve-2022-46364--apache-cxf-xop-include-ssrflfi) |

### Privilege Escalation

| Technique | Machine | Description | Reference |
|-----------|---------|-------------|-----------|
| **Docker Group** | **Kobold** | User membership in the `docker` group allows mounting the host filesystem via `docker run --privileged -v /:/hostfs`, equivalent to root access | [Kobold Writeup β†’](Easy/Kobold-Writeup.md#privilege-escalation) |
| **SUID Binary Abuse** | **DevArea** | `syswatch.sh` calls `bash` without absolute path, enabling PATH hijacking. Overwriting `/usr/bin/bash` with a SUID-creating script escalates to root | [DevArea Writeup β†’](Medium/DevArea.md#privilege-escalation) |
| **Service as Root** | **CCTV** | motionEye service configured to run as `User=root` in systemd, meaning any command injection through the service executes with root privileges | [CCTV Writeup β†’](Easy/cctv.md#motioneye-discovery) |
| **Gogs Symlink Attack** | **Silentium** | CVE-2024-55947 bypass β€” creating a symlink to `/root/.ssh/authorized_keys` in a repository, then writing SSH key content via API resolves through the symlink | [Silentium Writeup β†’](Easy/Silentium_HTB_Writeup.md#privilege-escalation) |
| **WCF Service Injection** | **Overwatch** | NSSM-managed WCF service runs as SYSTEM. Command injection via SOAP `processName` parameter enables arbitrary command execution as SYSTEM | [Overwatch Writeup β†’](Medium/Overwatch.md#privilege-escalation) |

### Active Directory Attacks

| Technique | Machine | Description | Reference |
|-----------|---------|-------------|-----------|
| **ADIDNS Poisoning** | **Overwatch** | Service account with DNS modification rights creates fake A record for linked server `SQL07`, redirecting NTLM authentication to attacker-controlled machine for hash capture via Responder | [Overwatch Writeup β†’](Medium/Overwatch.md#linked-server-exploitation--adidns-poisoning) |
| **Linked Server Exploitation** | **Overwatch** | MSSQL linked server self-mapping allows queries to execute in the context of the current user on remote servers, enabling cross-server authentication relay | [Overwatch Writeup β†’](Medium/Overwatch.md#step-2--check-login-mappings) |
| **NTLM Relay + Responder** | **Overwatch** | Fake DNS record causes SQL Server to send NTLMv2 authentication to attacker, who captures the hash with Responder and cracks it offline | [Overwatch Writeup β†’](Medium/Overwatch.md#step-5--capture-the-hash) |

### Credential Discovery

| Technique | Machine | Description | Reference |
|-----------|---------|-------------|-----------|
| **Hardcoded Connection String** | **Overwatch** | MSSQL connection string with plaintext credentials found in `overwatch.exe` binary via `strings` analysis | [Overwatch Writeup β†’](Medium/Overwatch.md#credential-discovery) |
| **Systemd Service File** | **DevArea** | Hoverfly admin credentials found in plaintext in `/etc/systemd/system/hoverfly.service` ExecStart parameter | [DevArea Writeup β†’](Medium/DevArea.md#credential-discovery) |
| **Config File Inspection** | **CCTV** | motionEye admin password stored in plaintext in `/etc/motioneye/motion.conf` | [CCTV Writeup β†’](Easy/cctv.md#extract-motioneye-admin-credentials) |
| **Environment Variables** | **Silentium** | SMTP password discovered in `/proc/1/environ` inside container, reused for host SSH access | [Silentium Writeup β†’](Easy/Silentium_HTB_Writeup.md#environment-variable-enumeration) |
| **Default Credentials** | **CCTV** | ZoneMinder shipped with default `admin:admin` credentials | [CCTV Writeup β†’](Easy/cctv.md#zoneminder-default-credentials) |

### Low-Code / AI Platform Exploitation

| Technique | Machine | Description | Reference |
|-----------|---------|-------------|-----------|
| **Flowise Custom MCP Tool** | **Silentium** | Flowise low-code AI platform allows creation of custom MCP tools that execute arbitrary commands, enabling RCE as root inside the container | [Silentium Writeup β†’](Easy/Silentium_HTB_Writeup.md#flowise-rce) |

---

## πŸ“Š Vulnerability Summary by Category

### Critical (RCE)
- **CVE-2024-51482** β€” ZoneMinder SQL Injection β†’ [CCTV](Easy/cctv.md)
- **CVE-2025-60787** β€” motionEye Command Injection β†’ [CCTV](Easy/cctv.md)
- **CVE-2024-45388** β€” Hoverfly Middleware RCE β†’ [DevArea](Medium/DevArea.md)
- **CVE-2022-46364** β€” Apache CXF XOP Include LFI β†’ [DevArea](Medium/DevArea.md)
- MCP API Command Injection β†’ [Kobold](Easy/Kobold-Writeup.md)
- WCF Service Command Injection β†’ [Overwatch](Medium/Overwatch.md)
- Flowise Custom MCP Tool RCE β†’ [Silentium](Easy/Silentium_HTB_Writeup.md)

### High (Privilege Escalation)
- Docker Group Privilege Escalation β†’ [Kobold](Easy/Kobold-Writeup.md)
- SUID Binary PATH Hijacking β†’ [DevArea](Medium/DevArea.md)
- Gogs Symlink Attack β†’ [Silentium](Easy/Silentium_HTB_Writeup.md)
- ADIDNS Poisoning + NTLM Capture β†’ [Overwatch](Medium/Overwatch.md)

### Medium (Information Disclosure)
- Hardcoded Credentials in Binaries β†’ [Overwatch](Medium/Overwatch.md)
- Plaintext Credentials in Service Files β†’ [DevArea](Medium/DevArea.md)
- Environment Variable Credential Leak β†’ [Silentium](Easy/Silentium_HTB_Writeup.md)
- Default Credentials β†’ [CCTV](Easy/cctv.md)

---

## πŸ”— External References

### CVE Databases
- [CVE-2022-46364 β€” Apache CXF XOP Include](https://vulners.com/cve/CVE-2022-46364)
- [CVE-2024-45388 β€” Hoverfly Middleware RCE](https://github.com/gunzf0x/CVE-2025-60787)
- [CVE-2024-51482 β€” ZoneMinder SQL Injection](https://www.penligent.ai/hackinglabs/cve-2024-51482-the-zoneminder-sql-injection-that-kept-security-teams-exposed-past-1-37-61/)
- [CVE-2024-55947 β€” Gogs Symlink Vulnerability](https://nvd.nist.gov/vuln/detail/CVE-2024-55947)
- [CVE-2025-60787 β€” motionEye Command Injection](https://nvd.nist.gov/vuln/detail/CVE-2025-60787)

### Exploit Repositories
- [CVE-2025-60787 Exploit (gunzf0x)](https://github.com/gunzf0x/CVE-2025-60787)

### Tools Used
- [sqlmap](https://sqlmap.org/) β€” SQL injection exploitation
- [Responder](https://github.com/lgandx/Responder) β€” LLMNR/NBT-NS/mDNS poisoner
- [impacket](https://github.com/fortra/impacket) β€” Network protocol exploitation
- [evil-winrm](https://github.com/Hackplayers/evil-winrm) β€” WinRM shell
- [netexec](https://github.com/Pennyw0rth/NetExec) β€” Network scanner
- [John the Ripper](https://www.openwall.com/john/) β€” Password cracking
- [Hashcat](https://hashcat.net/hashcat/) β€” Password cracking

---

## πŸ“ Writeup Structure

Each writeup follows this structure:

1. **Attack Chain Overview** β€” Visual diagram of the exploitation path
2. **Table of Contents** β€” Quick navigation
3. **Reconnaissance** β€” Nmap scans, service discovery, enumeration
4. **Initial Access** β€” First foothold on the system
5. **Post-Exploitation** β€” System enumeration after initial access
6. **Privilege Escalation** β€” Escalation to higher privileges
7. **Flag Capture** β€” User and root flag retrieval
8. **Key Takeaways** β€” Security lessons learned
9. **Exploit References** β€” Cheat sheets and command references

---

## πŸ“ Directory Structure

```
HTB/
β”œβ”€β”€ README.md                  # This file
β”œβ”€β”€ Easy/                      # Easy machines (empty)
β”œβ”€β”€ Medium/                    # Medium machines
β”‚   β”œβ”€β”€ Kobold-Writeup.md
β”‚   β”œβ”€β”€ DevArea
β”‚   └── cctv
└── Hard/                      # Hard machines
    β”œβ”€β”€ Overwatch.md
    └── Silentium_HTB_Writeup.md
```

---

*Last updated: April 2026*