An automated alert flagged unusual XML processing activity on a web server. Analysis of the provided PCAP reveals a full attack chain — port scanning, directory enumeration via Gobuster, XXE injection to read sensitive server files, credential theft leading to MySQL access, and finally webshell upload for persistent RCE.
Filtering for completed TCP handshakes identifies the attacker’s initial reconnaissance:
bash
tcp.flags.syn == 1 && tcp.flags.ack == 1
The highest open port discovered on the victim web server was 3306 — MySQL, which becomes significant later in the attack chain.
The attacker used Gobuster 3.6 to brute-force the web server, discovering the vulnerable upload endpoint:
Vulnerable URI: /review/upload.php
Filtering for POST requests reveals the attacker’s XXE payload delivery:
bash
http.request.method == "POST"

The first malicious XML file uploaded was TheGreatGatsby.xml — containing an XXE payload targeting the server’s filesystem. The payload read the web application configuration file directly from the server:
Target: file:///var/www/html/config.php

The response exposed database credentials stored in plaintext within config.php:

| Credential | Value |
|---|---|
| Database User | webuser |
| Password | Winter2024 |
With credentials in hand the attacker connected directly to the MySQL server on port 3306. Filtering for the login request:
bash
mysql.login_request

Initial MySQL connection timestamp: 2024-05-31 12:08
Following database access the attacker uploaded a PHP webshell to establish persistent remote code execution on the server:
Webshell filename: booking.php

booking.php provided the attacker with ongoing RCE capability, surviving any credential rotation that may follow incident response.
| Type | Value |
|---|---|
| Port | 3306 |
| URI | /review/upload.php |
| Filename | TheGreatGatsby.xml |
| Filename | config.php |
| Filename | booking.php |
| Credential | webuser:Winter2024 |
| Technique | ID |
|---|---|
| Network Service Discovery | T1046 |
| Exploit Public-Facing Application | T1190 |
| Server Software Component: Web Shell | T1505.003 |
| Credentials in Files | T1552.001 |
| Command and Scripting Interpreter: PHP | T1059.006 |
XXE injection remains a critical risk in any application processing user-supplied XML without disabling external entity resolution. Storing database credentials in plaintext config files within the web root compounds the impact significantly — a single file read vulnerability escalated to full database compromise and persistent access. Detection opportunities exist at each stage: anomalous XML POST requests, unexpected outbound filesystem reads in application logs, and direct database connections from the web server process rather than the application layer.
I successfully completed XXE Infiltration Blue Team Lab at @CyberDefenders! https://cyberdefenders.org/blueteam-ctf-challenges/achievements/inksec/xxe-infiltration/
#CyberDefenders #CyberSecurity #BlueYard #BlueTeam #InfoSec #SOC #SOCAnalyst #DFIR #CCD #CyberDefender