
Ensure you have appropriate permissions and authorization from the target system owner before using this script.
impacket-smbserversudo python3 CVE-2024-21413.py
This script prompts the user to provide SMTP server details, email credentials, recipient information, URL, subject, and select an email template from the Templates folder. Based on the chosen template, the script will prompt for additional input specific to that template. After gathering the required information, it sends an email with the specified content and attachments. Additionally, it can start an Impacket SMB server to capture NTLM hashes for further analysis.
The email templates are stored in the Templates folder. After running the script, you will be prompted to choose an email template file from this folder. Depending on the selected template, you will need to provide different inputs.
Available Email Templates:
Based on the selected email template, the following parameters are required:
SMTP Server Name: Hostname or IP of the SMTP server.SMTP Port: Port number of the SMTP server.Username: SMTP server username for authentication.Password: SMTP server password for authentication.Sender Email: Email address of the sender.Recipient Email: Email address of the recipient.URL: URL to include in the email.Subject: Email subject.For the "Blocked Account Reset Password Email Template," additional parameters like recipient's first name is needed.


You can chain this CVE with CVE-2023-21716 or CVE-2022-30190 to obtain Remote Code Execution (RCE).
This tool is intended for educational and ethical testing purposes only. Unauthorized scanning, testing, or exploiting of systems is illegal and unethical. Ensure you have explicit, authorized permission to engage in any testing or exploitation activities against target systems. The script needs to be run as a superuser.
Dionis Shabani