|
[求助]mfc 請問如何創建一張BMP,jpeg ,emf格式的圖出來呢?
楼主去用GDI+试试! |
|
[求助][成果6.1]软件保护壳技术专题 - 添加新节的疑惑
多谢玩命老大,明白了。如果我把代码节的Characteristics字段改成0E0000020h,应该也可以吧! |
|
[求助][成果6.1]软件保护壳技术专题 - 添加新节的疑惑
晕,你的程序没有问题啊,怎么会出现这种问题啊?是不是编译连接的选项有问题? |
|
[成果6.1]软件保护壳技术专题 - 添加新节
这个程序在处理源程序最后一个节(如果最后一个节的文件大小为0)的时候有点问题: mov eax, dwLastSecTbl ; eax = orig last section table fva assume eax : ptr IMAGE_SECTION_HEADER mov ecx, dword ptr [eax].VirtualAddress add ecx, dword ptr [eax].Misc.VirtualSize ; ecx = new section rva mov ebx, dword ptr [eax].PointerToRawData ;如果源程序最后一个节的PointerToRawData为0 add ebx, dword ptr [eax].SizeOfRawData ; SizeOfRawData也为0 invoke PEAlign, ecx, dwSecAlig mov dword ptr [esi].VirtualAddress, eax ;; set section pointertorawdata invoke PEAlign, ebx, dwFileAlig mov dword ptr [esi].PointerToRawData, eax ;此时eax为0 ;; update the sizeofimage ;; SizeofImage表示从文件到内存映射文件的内容通过节对齐的大小 ;; 这个值等于当前最后一节的内存偏移 + 当前最后一节的经过节对齐的大小 ;; 大家可以思考一下。这个值很有用,可以利用此值做一些特殊的感染来躲过启发式 ;; 搜索。呵呵... mov eax, dword ptr [esi].VirtualAddress add eax, dword ptr [esi].Misc.VirtualSize invoke PEAlign, eax, dwSecAlig mov edx, dwNTHeader assume edx : ptr IMAGE_NT_HEADERS mov dword ptr [edx].OptionalHeader.SizeOfImage, eax push dword ptr [esi].PointerToRawData ;PointerToRawData 为0 pop edi add edi, pMem ;pe文件起始处 ;; clear the new sec ;; 在这里做一下清0工作ZeroMemory mov ecx, dwSectionSize xor eax, eax cld rep stosb ;MZ标志被覆盖了 在MASM32写的程序中,如果最后一个段为.data段就可能出现这个问题: .data? hInstance dd ? hWinMain dd ? 比如是这个段! 我把例子文件发上来! |
|
[成果6.1]软件保护壳技术专题 - 添加新节
这个和导入加密表有同样的错误,LogicShellExit这个标号的位置错了! |
|
[成果6.3]软件保护壳专题 - 处理TLS表
6.2专题还没理解,新的又出来了,我也玩命了! |
|
[成果6.2]软件保护壳技术专题 - 加密引入表
代码好像有问题: invoke CreateFile, pFilename,\ GENERIC_WRITE + GENERIC_READ,\ FILE_SHARE_WRITE + FILE_SHARE_READ,\ NULL,\ OPEN_EXISTING,\ FILE_ATTRIBUTE_NORMAL,\ 0 .IF eax == INVALID_HANDLE_VALUE jmp OpenFileFailed .ENDIF 如果CreateFile失败则跳向OpenFileFailed,看OpenFileFailed OpenFileFailed: lea eax, g_szOpenFileFailed jmp ShowErr 继续: ShowErr: invoke PrintLine, offset g_szOutFormat, eax mov al, 1 mov g_bError, al jmp LogicShellExit 继续: LogicShellExit: ;; close handle & write it invoke UnmapViewOfFile, pMem ;还没映射,没有地址 invoke CloseHandle, hMap ;此时内存映射文件对象还没创立,这样好像会出错! invoke CloseHandle, hFile .IF g_bError == 0 ;; show success message invoke PrintLine, offset g_szOutFormat, offset g_szDone .ENDIF assume eax : nothing assume esi : nothing assume edi : nothing ret 不知道对不对,偶是菜鸟,在看雪老是怀疑自己的智商!像这样的程序,不知怎么反汇编才看的比较清楚?慢慢琢磨源码吧! |
|
|
|
|
|
[成果6.2]软件保护壳技术专题 - 加密引入表
看的头晕啊,牛人啊! |
操作理由
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 }}
勋章
兑换勋章
证书
证书查询 >
能力值