|
[求助]这句代码不能理解
那一句作用是取得HOOK API函数的执行地址。然后从HOOK API函数头中读取头5个字节,再写回原API头中恢复原API代码。 |
|
[求助]VC++ 的变量!!!!
不过,你的VC类型转成Delphi类型是正确的。 |
|
[求助]VC++ 的变量!!!!
不相同,VC++的255代表255个成员,包含下标0在内,而Delphi的[0..255]的255不包含0在内,他是从下标1开始计算的,Delphi的成员个数是0+255=256个成员,所以,VC++的255个成员代表Delphi的[0..254]才对。 |
|
|
|
[求助]关于定位IAT的一个函式的疑问
你说的我理解了,还有几点不理解: 1.具体的PE装载器将PE文件装入内存没有改变PE文件的结构是指什么,是pe结构的各个成员大小没有改变(这是肯定的了),还包括什么?比如成员之间的间距之类的。。。 是指PE的各个结构成员位置间距偏移位置并没有改变。 2.假如我的pe文件大于4k(不妨设为5k),文件映射是以4k(x86结构的内存页文件大小)为基本单位的,这个时候,pe文件是怎么 映射到内存中的呢?是文件的前4k映射到第一个页文件,文件的后1k映射到第二个页文件的前1k(也就是说映射的时候和pe文件的结构是一样的)吗?(我们暂且假设系统把整个pe文件全部映射到内存中) PE文件在编译器编译后,是以4K为对齐的,不足4K的地方会以0填充位置。同样,PE文件被PE装载器加载到内存,也是以4k为对齐单位。不过,PE装载到内存之后每个段节区会被以1000kb为区分段对齐的,如:PE头保存在偏移0-1000 的位置(PE头数据不足1000kb大小的话PE装载器会以0填充到1000以对齐),代码段保存在内存偏移的1000-2000或更多(如果代码段的数据也不足1000单位大小的话和前面一样,PE装载器也会以0填充到1000单位的大小)(注:代码段并没有规定一定会保存在1000-2000之后的位置,资源段或其他段也可能保存在这个位置,我这里只是代码段加以说明一下而已)。这就是磁盘文件为什么要对PE装载器装载的PE必须转换RVA的原因。 3.比如我自己写一个pe分析工具,我在操作的时候,是用文件映射的方式读取的吧,但是这时候我怎么还能够看出来某些结构的RVA呢?(这时候pe装载器还没有装载pe文件,应该还不知道imagebase那,毕竟imagebase可以自己指定) 既然windows pe装载器没有载入,那么我怎么能够确定某一结构的RVA呢? PE有相关的结构成员有保存着其相关结构的RVA,只要读取这些结构就可以知道,详细信息看PE结构说明。 希望给以指点,谢谢 |
|
[求助]关于定位IAT的一个函式的疑问
内存映射文件和PE装载虽然都是将PE文件装入内存,不过,PE装载器将PE文件装入内存虽然没有改变PE文件的结构,但装载器对文件进行过对齐操作,每个PE节区以1000为对齐,改变各个节区的偏移地址,这一点和内存映射不同,内存映射并不对PE文件进行PE节区对齐。其文件内容偏移和磁盘文件里是一样的。而IAT所保存的地址是PE装载后对齐了节区之后的偏移,和磁盘文件的偏移不同,所以需要进行RavToOffset的转换。 |
|
[讨论]有关pe的疑问
你似乎搞错了吧?PE结构中的0x3C是IMAGE_DOS_HEADER结构中的e_lfanew成员偏移地址,并不是'PE'的rva偏移地址。e_lfanew成员保存着的才是'PE'结构的rva偏移。 PIMAGE_DOS_HEADER pIDH; PIMAGE_NT_HEADERS pINH; pIDH = (PIMAGE_DOS_HEADER)lpMemory; pINH = (PIMAGE_NT_HEADERS)((DWORD)pIDH->e_lfanew + (DWORD)pIDH); printf("%s\n",(char*)&pINH->Signature); |
|
[求助]Radasm写DLL问题
[工程]菜单->[工程选项],在工程选项中的连接选项命令最后后添加一个',4'参数就行了。如下面的命令。 7,O,$B\LINK.EXE /SUBSYSTEM:WINDOWS /RELEASE /DLL /DEF:$6 /LIBPATH:"$L" /OUT:"$7",3,4 |
|
|
|
[求助]为啥读这个文件就读不出来
可以读取,只是你这个文本是unicode类型文本文件,读取出来后是unicode的数值,你用MessageBoxA函数就没办法显示出文本了,解决办法是用记事本将你这个文本再用Ansi类型保存一下就行了。 |
|
[求助]关于堆栈平衡的一点疑惑
我猜想你是将栈保存的数据理解错误,你认为函数的参数是指向栈顶的,而函数返回地址是指向参数下面的,不将参数修正就无法令函数返回地址保持在栈顶吧?如果是这样,你的看法就错了, 不管是stdcall还是pascal以及cdecl调用过程,函数在返回时esp栈顶都指向函数返回地址,而参数则保存在函数返回地址的后面esp+4、esp+n等位置才对,所以不管是stdcall还是pascal以及cdecl的调用过程,返回过程时栈顶都是一样环境的,只是stdcall和pascal调用约定会在先返回后再自动修正esp的值,而cdecl调用约定则是程序返回后必须手动修正esp的值。 |
|
[求助]将sub ecx, 1更改为dec ecx后怎么出错呢?
向楼上学习789012 |
|
[求助]将sub ecx, 1更改为dec ecx后怎么出错呢?
首先你要说明你为什么要将sub ecx,1改成dec ecx的原因,因为你上面的代码sub ecx,1和dec ecx都是减去1,除了影响标志位之外没有其他差别了,实在看不明白你为什么要如此修改有什么意义,要达到什么效果。 |
|
[求助]将sub ecx, 1更改为dec ecx后怎么出错呢?
JNB Jump if Not Below CF=0 SUB - Subtract Usage: SUB dest,src Modifies flags: AF CF OF PF SF ZF DEC - Decrement Usage: DEC dest Modifies flags: AF OF PF SF ZF jnb是以CF标志为0作为跳转条件的,SUB会影响CF标志位,所以,可以影响jnb跳转指令,而DEC指令不会影响CF标志,所以不会对jnb指令造成影响,也就是对jnb指令无效。 |
|
[求助]大家汇编怎么学的?
如下面是用WinAPI函数生成。 .data szButtonClass db 'Button',0 szEditClass db 'Edit',0 szButtonName db 'The is Button',0 szEditName db 'The is Edit',0 .code ; 创建Button CreateWindowEx,0,offset szButtonClass,offset szButtonName,WS_CHILD or WS_VISIBLE, 0,0,40,25,hWinMain,1000,hInstance,0 ; 创建Edit CreateWindowEx,0,offset szEditClass,offset szEditName,WS_CHILD or WS_VISIBLE, 0,50,40,25,hWinMain,1001,hInstance,0 |
|
|
|
[求助]大家汇编怎么学的?
提示是叫你将文件保存为*.asm文件,你保存文件没有保存为*.asm文件吧? |
|
[求助]大家汇编怎么学的?
下载RadAsm、MasmPlus安装后直接将你的代码拷贝到软件中,按编译菜单就行了。 |
|
[求助]窗口的滚动条没作用呢?
你是使用RadAsm的资源工程创建的窗口(对话框窗口)吧,这个只须在回调函数里处理WM_HSCROLL(水平滚动条消息)和WM_VSCROLL(垂直滚动条消息)消息就行了,不用ID的,如下例子: DlgProc proc hDlg, uMsg, wParam, lParam local xPos,yPos local sinfo:SCROLLINFO .if uMsg == WM_SIZE ; 在WM_SIZE消息中初始化滚动条大小和范围 invoke RtlZeroMemory,addr sinfo,sizeof sinfo mov eax,lParam mov edx,eax and eax,0ffffh shr edx,16 mov xPos,eax mov yPos,edx mov sinfo.cbSize,sizeof SCROLLINFO mov sinfo.fMask,SIF_RANGE or SIF_PAGE mov sinfo.nMin,0 mov sinfo.nMax,10 mov ecx,50 xor edx,edx div ecx mov sinfo.nPage,eax invoke SetScrollInfo,hDlg,SB_HORZ,addr sinfo,TRUE mov eax,yPos mov ecx,50 xor edx,edx div ecx mov sinfo.nPage,eax invoke SetScrollInfo,hDlg,SB_VERT,addr sinfo,TRUE .elseif uMsg == WM_VSCROLL ; 处理垂直滚动条消息 invoke RtlZeroMemory,addr sinfo,sizeof sinfo mov sinfo.cbSize,sizeof SCROLLINFO mov sinfo.fMask,SIF_ALL invoke GetScrollInfo,hDlg,SB_VERT,addr sinfo push sinfo.nPos pop yPos .if WORD ptr [wParam] == SB_TOP push sinfo.nMin pop sinfo.nPos .elseif WORD ptr [wParam] == SB_BOTTOM push sinfo.nMax pop sinfo.nPos .elseif WORD ptr [wParam] == SB_LINEUP dec sinfo.nPos .elseif WORD ptr [wParam] == SB_LINEDOWN inc sinfo.nPos .elseif WORD ptr [wParam] == SB_PAGEDOWN mov eax,sinfo.nPage add sinfo.nPos,eax .elseif WORD ptr [wParam] == SB_PAGEUP mov eax,sinfo.nPage sub sinfo.nPos,eax .elseif WORD ptr [wParam] == SB_THUMBTRACK push sinfo.nTrackPos pop sinfo.nPos .endif mov eax,sinfo.nMax mov edx,sinfo.nMin .if SDWORD ptr [sinfo.nPos] > eax push sinfo.nMax pop sinfo.nPos .elseif SDWORD ptr [sinfo.nPos] < edx push sinfo.nMin pop sinfo.nPos .endif invoke SetScrollInfo,hDlg,SB_VERT,addr sinfo,TRUE .elseif uMsg == WM_HSCROLL ; 处理水平滚动条消息 invoke RtlZeroMemory,addr sinfo,sizeof sinfo mov sinfo.cbSize,sizeof SCROLLINFO mov sinfo.fMask,SIF_ALL invoke GetScrollInfo,hDlg,SB_HORZ,addr sinfo push sinfo.nPos pop yPos .if WORD ptr [wParam] == SB_TOP push sinfo.nMin pop sinfo.nPos .elseif WORD ptr [wParam] == SB_BOTTOM push sinfo.nMax pop sinfo.nPos .elseif WORD ptr [wParam] == SB_LINEUP dec sinfo.nPos .elseif WORD ptr [wParam] == SB_LINEDOWN inc sinfo.nPos .elseif WORD ptr [wParam] == SB_PAGEDOWN mov eax,sinfo.nPage add sinfo.nPos,eax .elseif WORD ptr [wParam] == SB_PAGEUP mov eax,sinfo.nPage sub sinfo.nPos,eax .elseif WORD ptr [wParam] == SB_THUMBTRACK push sinfo.nTrackPos pop sinfo.nPos .endif mov eax,sinfo.nMax mov edx,sinfo.nMin .if SDWORD ptr [sinfo.nPos] > eax push sinfo.nMax pop sinfo.nPos .elseif SDWORD ptr [sinfo.nPos] < edx push sinfo.nMin pop sinfo.nPos .endif invoke SetScrollInfo,hDlg,SB_HORZ,addr sinfo,TRUE |
|
[求助]反汇编,是指逆向求得它的伪代码,还是它的源代码,还是直接查看它的汇编语言?
反汇编,就是将二进制数据反汇编成人可以识别的汇编代码。 |
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值