Platón adatintelligencia.
Vertical Search & Ai.

A „MagicDot” Windows gyengesége kiváltság nélküli Rootkit tevékenységet tesz lehetővé

Találka:

A known issue associated with the DOS-to-NT path conversion process in Windows opens up significant risk for businesses, by allowing attackers to gain rootkit-like post-exploitation capabilities to conceal and impersonate files, directories, and processes.

That’s according to Or Yair, security researcher at SafeBreach, who outlined the issue during a session at Black Hat Asia 2024 in Singapore this week. He also detailed four different vulnerabilities related to the issue, which he a „MagicDot“–including a dangerous remote code-execution bug that can be triggered simply by extracting an archive.

Pontok és szóközök a DOS-NT útvonalkonverzióban

The MagicDot group of problems exist thanks to the way that Windows changes DOS paths to BT paths.

When users open files or folders on their PCs, Windows accomplishes this by referencing the path where the file exists; normally, that’s a DOS path that follows the “C:UsersUserDocumentsexample.txt” format. However, a different underlying function called NtCreateFile is used to actually perform the operation of opening the file; and NtCreateFile asks for an NT path and not a DOS path. Thus, Windows converts the familiar DOS path visible to users into an NT path, prior to calling NtCreateFile to enable the operation.

A kihasználható probléma azért áll fenn, mert az átalakítási folyamat során a Windows automatikusan eltávolítja a DOS-útvonal minden pontját, valamint a végén lévő felesleges szóközöket. Így a DOS elérési utak, mint a következők:

  • C:exampleexample.   

  • C:exampleexample… 

  • C:exampleexample    

…are all converted to “??C:exampleexample” as an NT path.

Yair discovered that this automatic stripping out of erroneous characters could allow attackers to create specially crafted DOS paths that would be converted to NT paths of their choice – which could then be used to either render files unusable, or to conceal malicious content and activities.

Privileged Rootkit szimulálása

A MagicDot-problémák mindenekelőtt lehetőséget teremtenek számos olyan utólagos kizsákmányolási technikára, amelyek segítenek a támadóknak megőrizni a lopakodást.

For instance, it’s possible to lock up malicious content and prevent users, even admins, from examining it. “By placing a simple trailing dot at the end of a malicious file name or by naming a file or a directory with dots and/or spaces only, I could make all user-space programs that use the normal API inaccessible to them…users would not be able to read, write, delete, or do anything else with them, Yair explained in the session.

Aztán egy kapcsolódó támadás során a Yair úgy találta, hogy ez a technika használható fájlok vagy könyvtárak elrejtésére az archív fájlokon belül.

“I simply ended a file name in an archive with a dot to prevent Explorer from listing or extracting it,” Yair said. “As a result, I was able to place a malicious file inside an innocent ZIP—whoever used Explorer to view and extract the archive contents was unable to see that file existed inside.”

A harmadik támadási módszer magában foglalja a rosszindulatú tartalom elfedését legitim fájlútvonalak megszemélyesítésével.

“If there was a harmless file called ‘benign,’ I was able to [use DOS-to-NT path conversion] to create a malicious file in the same directory [also named] benign,” the researcher explained, adding that the same approach could be used to impersonate folders and even broader Windows processes. “As a result, when a user reads the malicious file, the content of the original harmless file would be returned instead,” leaving the victim none the wiser that they were actually opening malicious content.

Összességében a MagicDot útvonalak manipulálása rootkit-szerű képességeket biztosíthat az ellenfeleknek rendszergazdai jogosultságok nélkül, magyarázta Yair, aki közzétette. részletes műszaki megjegyzések a támadási módszerekről a munkamenettel párhuzamosan.

“I found I could hide files and processes, hide files in archives, affect prefetch file analysis, make Task Manager and Process Explorer users think a malware file was a verified executable published by Microsoft, disable Process Explorer with a denial of service (DoS) vulnerability, and more,” he said—all without admin privileges or the ability to run code in the kernel, and without intervention in the chain of API calls that retrieve information.

„Fontos, hogy a kiberbiztonsági közösség felismerje ezt a kockázatot, és fontolóra vegye a kiváltságtalan rootkit-észlelési technikák és szabályok kidolgozását” – figyelmeztetett.

A Series of ‘MagicDot’ Vulnerabilities

A MagicDot-útvonalak kutatása során Yairnek négy különböző sebezhetőséget is sikerült feltárnia a mögöttes problémával kapcsolatban, amelyek közül hármat azóta a Microsoft javított.

Egy távoli kódvégrehajtás (RCE) biztonsági rése (CVE-2023 36396-, CVSS 7.8) a Windows új kibontási logikájában az összes újonnan támogatott archívumtípushoz lehetővé teszi a támadók számára, hogy rosszindulatú archívumot hozzanak létre, amely a kibontás után bárhová írhat egy távoli számítógépen, ami kódfuttatáshoz vezet.

"
Basically, let’s say you upload an archive to your GitHub tárház egy remek letölthető eszközként hirdeti” – mondja Yair a Dark Readingnek. „És amikor a felhasználó letölti, az nem egy végrehajtható fájl, csak ki kell bontani az archívumot, ami teljesen biztonságos, biztonsági kockázatok nélküli műveletnek tekinthető. De most már maga a kicsomagolás képes kódot futtatni a számítógépén, és ez súlyosan helytelen és nagyon veszélyes."

A második hiba a jogosultság-emelés (EoP) sebezhetősége (CVE-2023 32054-, CVSS 7.3), amely lehetővé teszi a támadók számára, hogy jogosultságok nélkül írjanak fájlba egy korábbi verzió árnyékmásolatból történő visszaállítási folyamatának manipulálásával.

The third bug is Process Explorer unprivileged DOS for anti-analysis bug, for which CVE-2023-42757 has been reserved, with details to follow. And the fourth bug, also an EoP issue, allows unprivileged attackers to delete files. Microsoft confirmed that the flaw led to “unexpected behavior,” but hasn’t yet issued a CVE or a fix for it.

“I create a folder inside the demo folder called …<space> and inside, I write a file named c.txt,” explained Yair. “Then when an administrator attempts to delete the …<space> folder, the entire demo folder is deleted instead.”

Potentially Wider ‘MagicDot’ Ramifications

While Microsoft addressed Yair’s specific vulnerabilities, the DOS-to-NT path conversion auto-stripping of periods and spaces persists – even though that’s the root cause of the vulnerabilities.

“That means there might be many more potential vulnerabilities and post-exploitation techniques to find using this issue,” the researcher warns. “This issue is still exists and can lead to many more issues and vulnerabilities, which can be much more dangerous than the ones we know about.”

Hozzáteszi, hogy a problémának a Microsofton túlmutató következményei is vannak.

“We believe the implications are relevant not only to Microsoft Windows, which is the world’s most widely used desktop OS, but also to all software vendors, most of whom also allow known issues to persist from version to version of their software,” he warned.

Eközben a szoftverfejlesztők biztonságosabbá tehetik kódjukat az ilyen típusú sebezhetőségekkel szemben, ha DOS-elérési út helyett NT-útvonalakat használnak.

“Most high-level API calls in Windows support NT paths,” Yair said. “Using NT paths avoids the conversion process and ensures the provided path is the same path that is being actually operated on.”

Vállalkozások számára a biztonsági csapatoknak olyan észleléseket kell létrehozniuk, amelyek csalárd pontokat és szóközöket keresnek a fájl elérési útjain belül.

“There are pretty easy detections that you can develop for these, to look for files or directories, that have trailing dots or spaces in them, because if you find those, on your computer, it means that someone did it on purpose because it’s not that easy to do,” Yair explains. “Normal users can’t just create a file with ends with a dot or space, Microsoft will prevent that. Attackers will need to use a alacsonyabb API amely közelebb van a kernelhez, és ehhez némi szakértelemre lesz szükség.”

spot_img

Legújabb intelligencia

spot_img

Beszélj velünk

Szia! Miben segíthetek?