
Proof-of-concept for Cisco AnyConnect HostScan local privilege escalation via DLL hijacking and IPC command injection, demonstrating DLL proxying to load a malicious dbghelp.dll.
Cisco AnyConnect Posture (HostScan) Local Privilege Escalation: CVE-2021-1366
A vulnerability in the interprocess communication (IPC) channel of Cisco AnyConnect Secure Mobility Client for Windows could allow an authenticated, local attacker to perform a DLL hijacking attack on an affected device if the VPN Posture (HostScan) Module is installed on the AnyConnect client.
This POC sends 2 priv_file_copy IPC commands to the Cisco Security Service ciscod.exe to copy 2 DLLs to the C:\Program Files(x86)\Cisco\Cisco HostScan\bin\ directory. Upon the restart of the Cisco Security Service, ciscod.exe loads the malicious dbghelp.dll (using DLL proxying).
Cisco\Cisco HostScan directory in the %TEMP% folderdbghelp.dll and copy it to the folder %TEMP%\Cisco\Cisco HostScan"C:\Windows\SysWOW64\dbghelp.dll" to the folder %TEMP%\Cisco\Cisco HostScan and rename it to dbghelp_orig.dllciscod.exe and replace it with this POC process that sends the 2 IPC commandsProcessHollowing.exe C:\Program Files(x86)\Cisco\Cisco HostScan\bin\ciscod.exe CVE-2021-1366.exe
dbghelp.dll and dbghelp_orig.dll, should be copied to C:\Program Files(x86)\Cisco\Cisco HostScan\bin\https://www.coresecurity.com/core-labs/articles/analysis-cisco-anyconnect-posture-hostscan-local-privilege-escalation-cve-2021
https://www.coresecurity.com/core-labs/advisories/cisco-anyconnect-posture-hostscan-security-service-local-privilege-escalation
https://itm4n.github.io/dll-proxying/
https://github.com/ivkin25/Process-Hollowing