D2
Администратор
- Регистрация
- 19 Фев 2025
- Сообщения
- 4,380
- Реакции
- 0
Защиту от рансомвари Windows 10 можно обойти с помощью инъекции DLL
Разработчики Microsoft обеспечили последнюю версию Windows защитой от троянов-вымогателей, этот механизм называется Controlled Folder Access. Он должен предотвращать изменение файлов неизвестными программами в защищенных папках. На конференции по безопасности DerbyCon исследователь показал, как рансомварь может использовать DLL-инъекцию, чтобы обойти защиту Windows 10.
Controlled Folder Access позволяет защитить некоторые папки и файлы в них, а также добавить указанные приложения в доверенный список, чтобы только они могли изменять файлы в этих папках. Можно не добавлять приложения в доверенный список самому, а использовать список по умолчанию.
Уязвимость нашел Соя Аояма (Soya Aoyama), исследователь безопасности из Fujitsu System Integration Laboratories. Зная, что explorer.exe находится в доверенном списке, он нашел способ внедрить вредоносную DLL в «Проводник» при запуске.
Аояма также поэкспериментировал с Windows Defender и антивирусами. Оказалось, что эта схема остается незамеченной Windows Defender, Avast, ESET, Malwarebytes Premium и McAfee, а ведь у каждого из них есть защита от рансомвари.
Ниже — видео с демонстрацией уязвимости и рассказом Аоямы.
video -
Аояма упоминает, что прежде чем готовить презентацию, он честно отправил информацию об уязвимости в центр безопасности Microsoft, однако сотрудники Microsoft не согласны, что за эту находку полагается награда или что этот баг требует патча. Они объяснили, что, чтобы произвести описанные действия, у злоумышленника уже должен быть доступ к компьютеру жертвы.
Кроме того, таким образом нельзя затронуть других пользователей, только того, к чьей машине доступ уже получен другими способами. Также не происходит превышение прав доступа: тот, кто эксплуатирует эту уязвимость, уже пользуется тем же уровнем прав, что и цель атаки. Однако вкупе с другими уязвимостями эта особенность потенциально может стать интересной для исследователей безопасности (и не только).
Чуть подробнее (оригинал)
Knowing that the explorer.exe program is whitelisted in Controlled Folder Access, Soya Aoyama, a security researcher at Fujitsu System Integration Laboratories Ltd., figured out a way to inject a malicious DLL into Explorer when it is started. Since Explorer is whitelisted, when the DLL is injected it will launch and be able to bypass the ransomware protection feature.
To do this, Aoyama relied on the fact that when explorer.exe starts, it will load DLLs found under the HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers registry key shown below.
The HKEY_CLASSES_ROOT tree is a merge of registry information found in HKEY_LOCAL_MACHINE and HKEY_CURRENT_USER. When performing the merge, Windows gives the data in the HKCU tree precedence.
This means that if a key exists in HKCU, it would take precedence over the same key in HKLM, and be the data merged into the HKEY_CLASSES_ROOT tree. I know this can be a bit confusing, so you can read this document for more information.
By default, when explorer starts it loads Shell.dll from the HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{90AA3A4E-1CBA-4233-B8BB-535773D48449}\InProcServer32 key. To load the malicious DLL into explorer.exe instead, Aoyama simply created a HKCU\Software\Classes\CLSID\{90AA3A4E-1CBA-4233-B8BB-535773D48449}\InProcServer32 key and set its default value to the malicious DLL.
Now when Explorer.exe is killed and restarted, the malicious DLL will be launched inside explorer.exe rather than Shell.dll. You can see an example of the DLL injected into explorer.exe below.
Unfortunately, not only did this bypass the Controlled Folder Access, but it also was not detected by Windows Defender. To be fair, according to Aoyama's tests, it was not detected by Avast, ESET, Malwarebytes Premium, and McAfee - all of which have ransomware protection.
MSRC responds to vulnerability report
Microsoft, though, did not feel that this was a vulnerability that warranted a bounty or that requires a patch.
"If I am interpreting your findings correctly, this report predicated on the attacker having login access to the target's account already," stated Microsoft's response to Aoyama. "Followed by planting a DLL through registry modifications. Since you are only able to write to the HKCU, you will not be able to effect other users, just the target you have already compromised through other means. There also does not appear to be an escalation privileges and you already had the same access level as the target."
Разработчики Microsoft обеспечили последнюю версию Windows защитой от троянов-вымогателей, этот механизм называется Controlled Folder Access. Он должен предотвращать изменение файлов неизвестными программами в защищенных папках. На конференции по безопасности DerbyCon исследователь показал, как рансомварь может использовать DLL-инъекцию, чтобы обойти защиту Windows 10.
Controlled Folder Access позволяет защитить некоторые папки и файлы в них, а также добавить указанные приложения в доверенный список, чтобы только они могли изменять файлы в этих папках. Можно не добавлять приложения в доверенный список самому, а использовать список по умолчанию.
Уязвимость нашел Соя Аояма (Soya Aoyama), исследователь безопасности из Fujitsu System Integration Laboratories. Зная, что explorer.exe находится в доверенном списке, он нашел способ внедрить вредоносную DLL в «Проводник» при запуске.
Аояма также поэкспериментировал с Windows Defender и антивирусами. Оказалось, что эта схема остается незамеченной Windows Defender, Avast, ESET, Malwarebytes Premium и McAfee, а ведь у каждого из них есть защита от рансомвари.
Ниже — видео с демонстрацией уязвимости и рассказом Аоямы.
video -
Аояма упоминает, что прежде чем готовить презентацию, он честно отправил информацию об уязвимости в центр безопасности Microsoft, однако сотрудники Microsoft не согласны, что за эту находку полагается награда или что этот баг требует патча. Они объяснили, что, чтобы произвести описанные действия, у злоумышленника уже должен быть доступ к компьютеру жертвы.
Кроме того, таким образом нельзя затронуть других пользователей, только того, к чьей машине доступ уже получен другими способами. Также не происходит превышение прав доступа: тот, кто эксплуатирует эту уязвимость, уже пользуется тем же уровнем прав, что и цель атаки. Однако вкупе с другими уязвимостями эта особенность потенциально может стать интересной для исследователей безопасности (и не только).
Чуть подробнее (оригинал)
Knowing that the explorer.exe program is whitelisted in Controlled Folder Access, Soya Aoyama, a security researcher at Fujitsu System Integration Laboratories Ltd., figured out a way to inject a malicious DLL into Explorer when it is started. Since Explorer is whitelisted, when the DLL is injected it will launch and be able to bypass the ransomware protection feature.
To do this, Aoyama relied on the fact that when explorer.exe starts, it will load DLLs found under the HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers registry key shown below.

The HKEY_CLASSES_ROOT tree is a merge of registry information found in HKEY_LOCAL_MACHINE and HKEY_CURRENT_USER. When performing the merge, Windows gives the data in the HKCU tree precedence.
This means that if a key exists in HKCU, it would take precedence over the same key in HKLM, and be the data merged into the HKEY_CLASSES_ROOT tree. I know this can be a bit confusing, so you can read this document for more information.
By default, when explorer starts it loads Shell.dll from the HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{90AA3A4E-1CBA-4233-B8BB-535773D48449}\InProcServer32 key. To load the malicious DLL into explorer.exe instead, Aoyama simply created a HKCU\Software\Classes\CLSID\{90AA3A4E-1CBA-4233-B8BB-535773D48449}\InProcServer32 key and set its default value to the malicious DLL.
Now when Explorer.exe is killed and restarted, the malicious DLL will be launched inside explorer.exe rather than Shell.dll. You can see an example of the DLL injected into explorer.exe below.

Unfortunately, not only did this bypass the Controlled Folder Access, but it also was not detected by Windows Defender. To be fair, according to Aoyama's tests, it was not detected by Avast, ESET, Malwarebytes Premium, and McAfee - all of which have ransomware protection.
MSRC responds to vulnerability report

Microsoft, though, did not feel that this was a vulnerability that warranted a bounty or that requires a patch.
"If I am interpreting your findings correctly, this report predicated on the attacker having login access to the target's account already," stated Microsoft's response to Aoyama. "Followed by planting a DLL through registry modifications. Since you are only able to write to the HKCU, you will not be able to effect other users, just the target you have already compromised through other means. There also does not appear to be an escalation privileges and you already had the same access level as the target."