SlideShare a Scribd company logo
1 of 13
Download to read offline
UltraVNC DSMPlugin
Vulnerability
Leading to Local Privilege Escalation
(CVE-2022-24750)
Disclosed by: Jing Qiang
Patched by: Rudi De Vos
UltraVNC
Installed as a SYSTEM service
Always have 2 processes running with SYSTEM privilege.
1. Service running in session 0
2. GUI app running in user logged on session (session 2 in my scenario)
2
GUI app
Trayicon to allows admins to adjust VNC configurations
3
Vulnerability Details
● A vulnerability has been found in the DSMPlugin module, which allows a local authenticated user to
achieve local privilege escalation (LPE) on a vulnerable system.
● Affects ALL UltraVNC <= 1.3.8
● The DSMPlugin module is responsible for loading a plugin to encrypt VNC sessions
4
Some known issues on DSMPlugin module
Source: Howto add encryption - UltraVNC VNC OFFICIAL SITE, Remote Desktop Free Opensource (uvnc.com)
If you load a plugin that is not compatible with your windows OS architecture (e.g. 32/64-bits),
an error will be thrown.
5
Other ways of triggering error message
Input a non-existing plugin (SecurVNCPlugin64.dsm) and click “Config”
6
Using Procmon to understand what happened
Windows DLL Search Order pattern even when we are searching for .dsm extension
1. Application Directory
2. System Directory
3. 16-bit System
Directory
4. Windows Directory
5. Current Directory*
6. Directories listed in the
PATH variable
*Because the process is running as SYSTEM, the current directory becomes
C:WindowsSystem32 7
Input without extensions
If no extension is provided, it will auto append .DLL and try to load it
8
What About Directory Traversal?
Looks like we can load a DLL outside of the installed directory
9
Exploitation
Demo: UltraVNC DSMPlugin Privilege Escalation - YouTube
Loading malicious DLL to gain SYSTEM privilege
10
Code Analysis
Tracing the code to error message
winvncLocalization.h
winvncvncproperties.cpp
11
Code Analysis
Before the pop-up appears, it check whether the plugin is loaded. If not, Load the plugin first
winvncvncproperties.cpp
12
Code Analysis - Vulnerable Code
DSMPluginDSMPlugin.cpp
Tracing into the GetDSMPluginPointer()->LoadPlugin() function
The LoadLibrary() at line 379 loads a
DLL in the process running as
SYSTEM. There is no prior check for
the path, which allows any DLL to be
loaded.
The LoadLibrary at line 393 loads a
DLL from the fully qualified path for
the file that contains the specified
module. (Because we are using
GetModuleFileName() API, it will
differ from the Windows Search
Order’s Current Directory)
13

More Related Content

Similar to UltraVNC DSMPlugin LPE Vulnerability.pdf

CHAPTER 3 BASIC DYNAMIC ANALYSIS.ppt
CHAPTER 3 BASIC DYNAMIC ANALYSIS.pptCHAPTER 3 BASIC DYNAMIC ANALYSIS.ppt
CHAPTER 3 BASIC DYNAMIC ANALYSIS.pptManjuAppukuttan2
 
N-Tier Application with Windows Forms - Deployment and Security
N-Tier Application with Windows Forms - Deployment and SecurityN-Tier Application with Windows Forms - Deployment and Security
N-Tier Application with Windows Forms - Deployment and SecurityPeter Gfader
 
BlueHat v18 || Return of the kernel rootkit malware (on windows 10)
BlueHat v18 || Return of the kernel rootkit malware (on windows 10)BlueHat v18 || Return of the kernel rootkit malware (on windows 10)
BlueHat v18 || Return of the kernel rootkit malware (on windows 10)BlueHat Security Conference
 
To pass ite chapter 5 exam
To pass ite chapter 5 examTo pass ite chapter 5 exam
To pass ite chapter 5 examAhmed Abdullah
 
Containerize your Blackbox tests
Containerize your Blackbox testsContainerize your Blackbox tests
Containerize your Blackbox testsKevin Beeman
 
Not a Security Boundary: Bypassing User Account Control
Not a Security Boundary: Bypassing User Account ControlNot a Security Boundary: Bypassing User Account Control
Not a Security Boundary: Bypassing User Account Controlenigma0x3
 
Windows Attacks AT is the new black
Windows Attacks   AT is the new blackWindows Attacks   AT is the new black
Windows Attacks AT is the new blackRob Fuller
 
Windows attacks - AT is the new black
Windows attacks - AT is the new blackWindows attacks - AT is the new black
Windows attacks - AT is the new blackChris Gates
 
Malware analysis
Malware analysisMalware analysis
Malware analysisDen Iir
 
MSMDC_CLI363
MSMDC_CLI363MSMDC_CLI363
MSMDC_CLI363mokacao
 
Lifnaaaaaa e
Lifnaaaaaa eLifnaaaaaa e
Lifnaaaaaa ehenelpj
 
Windows 7 Deployment with ZCM11
Windows 7 Deployment with ZCM11Windows 7 Deployment with ZCM11
Windows 7 Deployment with ZCM11Roel van Bueren
 
TechMentor Fall, 2011 - WDS Tricks You Didn't Know
TechMentor Fall, 2011 - WDS Tricks You Didn't KnowTechMentor Fall, 2011 - WDS Tricks You Didn't Know
TechMentor Fall, 2011 - WDS Tricks You Didn't KnowConcentrated Technology
 
Stuxnet - Case Study
Stuxnet  - Case StudyStuxnet  - Case Study
Stuxnet - Case StudyAmr Thabet
 

Similar to UltraVNC DSMPlugin LPE Vulnerability.pdf (20)

CHAPTER 3 BASIC DYNAMIC ANALYSIS.ppt
CHAPTER 3 BASIC DYNAMIC ANALYSIS.pptCHAPTER 3 BASIC DYNAMIC ANALYSIS.ppt
CHAPTER 3 BASIC DYNAMIC ANALYSIS.ppt
 
N-Tier Application with Windows Forms - Deployment and Security
N-Tier Application with Windows Forms - Deployment and SecurityN-Tier Application with Windows Forms - Deployment and Security
N-Tier Application with Windows Forms - Deployment and Security
 
BlueHat v18 || Return of the kernel rootkit malware (on windows 10)
BlueHat v18 || Return of the kernel rootkit malware (on windows 10)BlueHat v18 || Return of the kernel rootkit malware (on windows 10)
BlueHat v18 || Return of the kernel rootkit malware (on windows 10)
 
Control assistant 4
Control assistant 4Control assistant 4
Control assistant 4
 
Howto Pxeboot
Howto PxebootHowto Pxeboot
Howto Pxeboot
 
To pass ite chapter 5 exam
To pass ite chapter 5 examTo pass ite chapter 5 exam
To pass ite chapter 5 exam
 
Containerize your Blackbox tests
Containerize your Blackbox testsContainerize your Blackbox tests
Containerize your Blackbox tests
 
IIS Web Ecosystem
IIS Web EcosystemIIS Web Ecosystem
IIS Web Ecosystem
 
Not a Security Boundary: Bypassing User Account Control
Not a Security Boundary: Bypassing User Account ControlNot a Security Boundary: Bypassing User Account Control
Not a Security Boundary: Bypassing User Account Control
 
Windows Attacks AT is the new black
Windows Attacks   AT is the new blackWindows Attacks   AT is the new black
Windows Attacks AT is the new black
 
Windows attacks - AT is the new black
Windows attacks - AT is the new blackWindows attacks - AT is the new black
Windows attacks - AT is the new black
 
Malware analysis
Malware analysisMalware analysis
Malware analysis
 
KB Article 1-FINAL
KB Article 1-FINALKB Article 1-FINAL
KB Article 1-FINAL
 
Windows advanced
Windows advancedWindows advanced
Windows advanced
 
CVE-2014-4113
CVE-2014-4113CVE-2014-4113
CVE-2014-4113
 
MSMDC_CLI363
MSMDC_CLI363MSMDC_CLI363
MSMDC_CLI363
 
Lifnaaaaaa e
Lifnaaaaaa eLifnaaaaaa e
Lifnaaaaaa e
 
Windows 7 Deployment with ZCM11
Windows 7 Deployment with ZCM11Windows 7 Deployment with ZCM11
Windows 7 Deployment with ZCM11
 
TechMentor Fall, 2011 - WDS Tricks You Didn't Know
TechMentor Fall, 2011 - WDS Tricks You Didn't KnowTechMentor Fall, 2011 - WDS Tricks You Didn't Know
TechMentor Fall, 2011 - WDS Tricks You Didn't Know
 
Stuxnet - Case Study
Stuxnet  - Case StudyStuxnet  - Case Study
Stuxnet - Case Study
 

Recently uploaded

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
The Evolution of Money: Digital Transformation and CBDCs in Central Banking
The Evolution of Money: Digital Transformation and CBDCs in Central BankingThe Evolution of Money: Digital Transformation and CBDCs in Central Banking
The Evolution of Money: Digital Transformation and CBDCs in Central BankingSelcen Ozturkcan
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 

Recently uploaded (20)

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
The Evolution of Money: Digital Transformation and CBDCs in Central Banking
The Evolution of Money: Digital Transformation and CBDCs in Central BankingThe Evolution of Money: Digital Transformation and CBDCs in Central Banking
The Evolution of Money: Digital Transformation and CBDCs in Central Banking
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

UltraVNC DSMPlugin LPE Vulnerability.pdf

  • 1. UltraVNC DSMPlugin Vulnerability Leading to Local Privilege Escalation (CVE-2022-24750) Disclosed by: Jing Qiang Patched by: Rudi De Vos
  • 2. UltraVNC Installed as a SYSTEM service Always have 2 processes running with SYSTEM privilege. 1. Service running in session 0 2. GUI app running in user logged on session (session 2 in my scenario) 2
  • 3. GUI app Trayicon to allows admins to adjust VNC configurations 3
  • 4. Vulnerability Details ● A vulnerability has been found in the DSMPlugin module, which allows a local authenticated user to achieve local privilege escalation (LPE) on a vulnerable system. ● Affects ALL UltraVNC <= 1.3.8 ● The DSMPlugin module is responsible for loading a plugin to encrypt VNC sessions 4
  • 5. Some known issues on DSMPlugin module Source: Howto add encryption - UltraVNC VNC OFFICIAL SITE, Remote Desktop Free Opensource (uvnc.com) If you load a plugin that is not compatible with your windows OS architecture (e.g. 32/64-bits), an error will be thrown. 5
  • 6. Other ways of triggering error message Input a non-existing plugin (SecurVNCPlugin64.dsm) and click “Config” 6
  • 7. Using Procmon to understand what happened Windows DLL Search Order pattern even when we are searching for .dsm extension 1. Application Directory 2. System Directory 3. 16-bit System Directory 4. Windows Directory 5. Current Directory* 6. Directories listed in the PATH variable *Because the process is running as SYSTEM, the current directory becomes C:WindowsSystem32 7
  • 8. Input without extensions If no extension is provided, it will auto append .DLL and try to load it 8
  • 9. What About Directory Traversal? Looks like we can load a DLL outside of the installed directory 9
  • 10. Exploitation Demo: UltraVNC DSMPlugin Privilege Escalation - YouTube Loading malicious DLL to gain SYSTEM privilege 10
  • 11. Code Analysis Tracing the code to error message winvncLocalization.h winvncvncproperties.cpp 11
  • 12. Code Analysis Before the pop-up appears, it check whether the plugin is loaded. If not, Load the plugin first winvncvncproperties.cpp 12
  • 13. Code Analysis - Vulnerable Code DSMPluginDSMPlugin.cpp Tracing into the GetDSMPluginPointer()->LoadPlugin() function The LoadLibrary() at line 379 loads a DLL in the process running as SYSTEM. There is no prior check for the path, which allows any DLL to be loaded. The LoadLibrary at line 393 loads a DLL from the fully qualified path for the file that contains the specified module. (Because we are using GetModuleFileName() API, it will differ from the Windows Search Order’s Current Directory) 13