So we started doing some directory enumeration but immediately by browsing the website we see that the interface has a link to wiki.editor.htb.
We add the subdomain to our hosts file and continuing we can clearly see that it is the same website between wiki.editor.htb and editor.htb:8080.
Immediately we observe the that this wiki framework has a version.
Looking up online we can find a known RCE CVE-2025-24893. And a public exploit available here.
We download it and run it.
There is a mysql service running and we see also two other interesting ports, 19999 and 8125. Looking it up online it seems that 19999 is for a monitoring service named Netdata.
We run few interesting search commands to find a password based on MySQL first.
Looking at the file hibernate.cfg.xml we spot that it configures credentials for different types of databases. For mysql it default creds that don’t work after checking.
<!-- MySQL configuration.
Uncomment if you want to use MySQL and comment out other database configurations.
Notes:
- if you want the main wiki database to be different than "xwiki" you will also have to set the property xwiki.db in xwiki.cfg file
- if you're using a MySQL 8+ JDBC driver, you don't need the "hibernate.connection.driver_class" which will
generate a warning since it's not needed as the driver is registered automatically
<property name="hibernate.connection.url">jdbc:mysql://localhost/xwiki?useSSL=false</property>
<property name="hibernate.connection.username">xwiki</property>
<property name="hibernate.connection.password">xwiki</property>
<property name="hibernate.connection.driver_class">com.mysql.cj.jdbc.Driver</property>
<property name="hibernate.dbcp.poolPreparedStatements">true</property>
<property name="hibernate.dbcp.maxOpenPreparedStatements">20</property>
<property name="hibernate.connection.charSet">UTF-8</property>
<property name="hibernate.connection.useUnicode">true</property>
<property name="hibernate.connection.characterEncoding">utf8</property>
<mapping resource="xwiki.hbm.xml"/>
<mapping resource="feeds.hbm.xml"/>
<mapping resource="instance.hbm.xml"/>
<mapping resource="notification-filter-preferences.hbm.xml"/>
<mapping resource="mailsender.hbm.xml"/>
We spot though that there may be other files that actually have the creds set for the production environment and we see that the field specifying the password was hibernate.connection.password. So we search based on that.
In order to exploit this we need to put a module of the ndsudo command in our PATH and make it malicious so it gives us a root shell or whatever we want to achieve.
Now if we place bash as nvme on that folder it will run with SUID privileges.
1
2
3
oliver@editor:~/topath$ cp /bin/bash ./nvme
oliver@editor:~/topath$ /opt/netdata/usr/libexec/netdata/plugins.d/ndsudo nvme-list
/home/oliver/topath/nvme: list: No such file or directory
The problem here is that the command appends a list argument and bash get’s confused. We tried other quick wins but failed.