📄 762.html
字号:
PAGE:004B4A78 mov [ebp-2Ch], ebx<br />
PAGE:004B4A7B mov esi, [ebp+8]<br />
PAGE:004B4A7E push esi<br />
PAGE:004B4A7F call _KeAttachProcess@4 ; KeAttachProcess(x)<br />
PAGE:004B4A84 push 2<br />
PAGE:004B4A86 pop edi<br />
PAGE:004B4A87 push edi<br />
PAGE:004B4A88 push (offset loc_4FFFFE+2)<br />
PAGE:004B4A8D push 1<br />
PAGE:004B4A8F lea eax, [ebp-2Ch]<br />
PAGE:004B4A92 push eax<br />
PAGE:004B4A93 lea eax, [ebp-4Ch]<br />
PAGE:004B4A96 push eax<br />
PAGE:004B4A97 push ebx<br />
PAGE:004B4A98 push ebx<br />
PAGE:004B4A99 lea eax, [ebp-20h]<br />
PAGE:004B4A9C push eax<br />
PAGE:004B4A9D push esi<br />
PAGE:004B4A9E push ds:_InitNlsSectionPointer<br />
PAGE:004B4AA4 call _MmMapViewOfSection@40 ; MmMapViewOfSection(x,x,x,x,x,x,x,x,x,x)<br />
PAGE:004B4AA9 mov [ebp-24h], eax<br />
PAGE:004B4AAC cmp eax, ebx<br />
PAGE:004B4AAE jl loc_5267FF<br />
PAGE:004B4AB4 lea eax, [ebp-1Ch]<br />
<br />
注意下面这个210参数,类似一个Flag。在后面你会发现,如果该参数不等于210,那么映射的PEB地址将不会产生随机值,而是会跟以前的一样,始终在7FFDF000位置。<br />
<br />
PAGE:004B4AB7 push eax<br />
PAGE:004B4AB8 push 210h<br />
;注意这个参数!<br />
PAGE:004B4ABD push esi<br />
PAGE:004B4ABE call _MiCreatePebOrTeb@12 ; MiCreatePebOrTeb(x,x,x)<br />
<br />
真正完成工作<br />
_MiCreatePebOrTeb@12 函数<br />
<br />
PAGE:004B01AE call _ExAllocatePoolWithTag@12 ; ExAllocatePoolWithTag(x,x,x)<br />
PAGE:004B01B3 mov esi, eax<br />
<br />
PAGE:004B01B5 test esi, esi<br />
PAGE:004B01B7 jz loc_52678E<br />
PAGE:004B01BD mov eax, [ebp+arg_8]<br />
PAGE:004B01C0 mov ecx, [ebp+arg_8]<br />
PAGE:004B01C3 and eax, 0FFFh<br />
PAGE:004B01C8 neg eax<br />
PAGE:004B01CA sbb eax, eax<br />
PAGE:004B01CC neg eax<br />
PAGE:004B01CE shr ecx, 0Ch<br />
<br />
PAGE:004B01FB cmp [ebp+arg_8], 210h<br />
PAGE:004B0202 jz loc_4B4A0A<br />
;这里将210与压栈的参数比较,如果压入栈的不是210呢<br />
<br />
<br />
PAGE:004B0208 loc_4B0208: ; CODE XREF: MiCreatePebOrTeb(x,x,x)+48ADj<br />
PAGE:004B0208 mov edi, [ebp+arg_C]<br />
PAGE:004B020B mov eax, _MmHighestUserAddress<br />
PAGE:004B0210 push edi<br />
PAGE:004B0211 push dword ptr [ebx+11Ch]<br />
PAGE:004B0217 add eax, 0FFFF0001h<br />
PAGE:004B021C push 1000h<br />
PAGE:004B0221 push eax<br />
PAGE:004B0222 mov eax, [ebp+arg_8]<br />
PAGE:004B0225 add eax, 0FFFh<br />
PAGE:004B022A and eax, 0FFFFF000h<br />
PAGE:004B022F push eax<br />
PAGE:004B0230 call _MiFindEmptyAddressRangeDownTree@20 ; MiFindEmptyAddressRangeDownTree(x,x,x,x,x)<br />
PAGE:004B0235 test eax, eax<br />
PAGE:004B0237 mov [ebp+arg_C], eax<br />
PAGE:004B023A jl loc_5267A5<br />
<br />
<br />
<br />
关键是这里<br />
PAGE:004B4A0A loc_4B4A0A: ; CODE XREF: MiCreatePebOrTeb(x,x,x)+66j<br />
PAGE:004B4A0A mov edi, _MmHighestUserAddress<br />
;总是7FFEFFFF<br />
PAGE:004B4A10 lea eax, [ebp+var_C]<br />
PAGE:004B4A13 push eax<br />
PAGE:004B4A14 add edi, 0FFFF0001h<br />
;此时edi为7FFE0000<br />
PAGE:004B4A1A call _KeQueryTickCount@4 ; KeQueryTickCount(x)<br />
PAGE:004B4A1F mov eax, [ebp+var_C]<br />
PAGE:004B4A22 and eax, 0Fh<br />
;只取最后一个字节的值,比如此时为0C<br />
PAGE:004B4A25 cmp eax, 1<br />
;看eax此时是不是为01<br />
PAGE:004B4A28 mov [ebp+var_C], eax<br />
PAGE:004B4A2B jbe loc_4B4928<br />
;如果是就跳到去处理<br />
<br />
PAGE:004B4A31 loc_4B4A31: ; CODE XREF: MiCreatePebOrTeb(x,x,x)+4792j<br />
PAGE:004B4A31 shl eax, 0Ch<br />
PAGE:004B4A34 sub edi, eax<br />
PAGE:004B4A36 lea eax, [edi+0FFFh]<br />
PAGE:004B4A3C push eax<br />
PAGE:004B4A3D push edi<br />
PAGE:004B4A3E push ebx<br />
PAGE:004B4A3F mov [ebp+var_4], edi<br />
<br />
PAGE:004B4928 loc_4B4928: ; CODE XREF: MiCreatePebOrTeb(x,x,x)+488Fj<br />
如果eax为1,那么就更改为2.这样避免最后计算出来为7FFDF000.而是为7FFDE000<br />
PAGE:004B4928 push 2<br />
PAGE:004B492A pop eax<br />
PAGE:004B492B mov [ebp+var_C], eax<br />
PAGE:004B492E jmp loc_4B4A31<br />
<br />
<br />
<br />
因为KeTickCount是进程的一个时间计数,所以无法预测。<br />
<br />
.text:0041CAA8 mov edi, edi<br />
.text:0041CAAA push ebp<br />
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -