VirtualAlloc C ++,注入dll,asm [英] VirtualAlloc C++ , injected dll, asm

查看:171
本文介绍了VirtualAlloc C ++,注入dll,asm的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为应用程序中的编解码器预留空间。
我使用VirtualAlloc函数来保留这个空间。
我有X个问题。

I want to reserve space for my codecave in application. I use VirtualAlloc function to reserve this space. I have X questions.


  1. 应该使用什么参数(滑动类型和保护)来分配内存代码-cave?

  1. What parameters (sllocation type and protection) should I use to allocate memory for code-cave?

作为返回值,我得到我的编解码器的地址。在程序的其他部分,我想要JMP到那个编解码器。怎么做?我知道(纠正我,如果我错了)JMP作为agument nuber偏移当前位置。但是我想要JMP来编码。如何计算这个偏移量。

As return value I get address of my codecave. In other part of the program I want to JMP to that codecave. How to do it? I know (correct me if I'm wrong) that JMP takes as agument nuber that is offset from current location. But I want to JMP to ma codecave. How to calculate this offset.

推荐答案

从您的跳转目标地址中减去您的跳转目标地址之后的指令将跳转到您的跳转偏移。

Subtracting the address of your jump target from the address of the instruction after the jump will give you the jump offset.

这篇关于VirtualAlloc C ++,注入dll,asm的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆