;invoke MessageBox,0,offset vp,offset vp,1
;--------------判断操作系统
invoke CheckOS
.if eax == 0
ret
.endif
;---------------得到密码窗口句柄,以及线程句柄,进程句柄
MOV EBX,WINHAND
.if EBX!=NULL
invoke GetWindowThreadProcessId,eBx,addr parid
MOV WINTHREADID,EAX
;invoke wsprintf,offset bufferPassWnd,offset Wndformat,ebx,eax
;invoke MessageBox,0,offset bufferPassWnd,offset vp,1
.else
invoke MessageBox,0,offset nowin2,offset vp,1
ret
.endif
;-------------根据窗口所在的进程的进程号得到这个进程加载的USER32.DLL的基地址
invoke GetUser32Base,parid
mov modbase,eax
;--------------根据窗口所在的线程得到该线程的TEB地址
invoke OpenThread,THREAD_QUERY_INFORMATION,FALSE,WINTHREADID
.if eax != NULL
mov THREADHAND,EAX
invoke LoadLibrary,offset Ntdll
invoke GetProcAddress,eax,offset _ZwQueryInformationThread
mov apiquerthread,eax
push 0
push sizeof THREAD_BASIC_INFORMATION
lea ecx,threadinfo
push ecx
push ThreadBasicInformation
push THREADHAND
call apiquerthread
.IF EAX == STATUS_SUCCESS
lea ecx,threadinfo
mov esi,[ecx+4] ;得到TEB了
.ELSE
invoke MessageBox,0,offset errgetteb,offset vp,1
ret
.ENDIF
.else
invoke MessageBox,0,offset erropenthread,offset vp,1
ret
.endif
;invoke wsprintf,offset bufferteb,offset tebformat,esi
;invoke MessageBox,0,offset bufferteb,offset vp,1
;-------------------------得到TEB中的RealClientID
add esi,6cch
add esi,1ch
invoke Toolhelp32ReadProcessMemory,parid,esi,offset buffer1,4,NULL
.if eax == TRUE
mov eax,offset buffer1
mov eax,[eax]
mov edi,eax
.if eax !=NULL
;invoke wsprintf,offset bufferrealcid,offset realcidformat,eax
;invoke MessageBox,0,offset bufferrealcid,offset vp,1
.else
invoke MessageBox,0,offset errnorealcid,offset vp,1
ret
.endif
.endif
;密码窗口句柄取低16位
xor eax,eax
mov ebx,WINHAND
mov ax,bx
add ax,ax
add ax,bx ;3
add ax,ax ;6
add ax,ax ;12
mov ebx,eax
pushad
invoke GetUnknowVarOffset
.if eax !=NULL
mov eax,VarOffset
add eax,modbase
add eax,VirtualAddress
;invoke wsprintf,offset buffervar,offset varformat,eax
;invoke MessageBox,0,offset buffervar,offset vp,1
.else
invoke MessageBox,0,offset errnounknowvar,offset vp,1
ret
.endif
popad
mov ecx,VarOffset
add ecx,modbase
add ecx,VirtualAddress
invoke Toolhelp32ReadProcessMemory,parid,ecx,offset buffer1,4,NULL
.if eax == TRUE
mov ecx,offset buffer1
mov ecx,[ecx]
;push ecx
;invoke wsprintf,offset buffervar2,offset varformat2,ecx
;invoke MessageBox,0,offset buffervar2,offset vp,1
;pop ecx
.endif
add ebx,ecx ;窗口句柄低16位*12+GUI TABLE BASE
invoke Toolhelp32ReadProcessMemory,parid,ebx,offset buffer1,4,NULL
.if eax == TRUE
mov ecx,offset buffer1
mov ecx,[ecx]
上一页 1 2 3 4 5 6 7 8 9 10 下一页 |