Exploit Title: OpenSMTPD 6.6.2 - Remote Code Execution.
The new Date: 2020-01-29.
Exploit Author: 1F98D.
Original Author: Qualys Security Advisory.
Vendor Homepage: https://www.opensmtpd.org/.
Software Link: https://github.com/OpenSMTPD/OpenSMTPD/releases/tag/6.6.1p1.
Version: OpenSMTPD < 6.6.2.
Tested on: OpenBSD 6.6, OpenBSD 6.5, OpenBSD 6.4, OpenBSD 5.9.
OpenSMTPD after commit a8e222352f and before version 6.6.2 does not adequately escape dangerous characters from user-controlled input. An attacker can exploit this to execute arbitrary shell commands on the target.
sudo apt install python3-pip
pip3 install --user pwn
python3 poc1.py LHOST LPORT RHOST RPORT
https://packetstormsecurity.com/files/156145/OpenSMTPD-6.6.2-Remote-Code-Execution.html