【发布时间】:2015-08-15 04:32:26
【问题描述】:
我的项目有问题。我想在任何程序中插入我的代码。我解释了情况:我的程序获取文件(PE 类型)并从第一节开始异或数据到最后一节。然后我在最后一节下载了我的 ASM 代码,它可以解码这些数据。我将最后一节标记为(写入、执行、数据)。我的 ASM 代码:
mov eax, /*I insert address of the beginning of the first section*/
mov ebx, /* I insert orginal EntryPoint (need to use jmp in the end)*/
mov cx, /*I insert number of bytes between Last Section and First*/
DO:
mov ch, [eax]
xor ch,2
mov [eax], ch
inc eax
loop DO
jmp ebx
我修复了VirtualSize、SizeOfRawData(每个人都加 24 + 对齐)。我还更改了SizeOfImage 和BaseOfCode(这里我写了新地址我的asm 代码(pLastSectHeader->Misc.VirtualSize))。
但是当我运行我的应用程序(我注入的)时我遇到了问题。请帮我解决我的问题 :) 我试着做这几周。
P.S 我在普通 C + WinAPI 上的代码 http://pastebin.com/Q4EJvM2J
【问题讨论】:
-
欢迎来到 Stack Overflow!您可能想查看how to ask a question。正确格式化您的问题将大大有助于获得您正在寻找的答案。
-
祝您好运说服反恶意软件,您这样做是出于好意。
标签: c winapi assembly code-injection portable-executable