如何用十六进制编辑器更改指令? [英] How does one change an instruction with a hex editor?
问题描述
我正在搞一些逆向工程,但我不知道如何用十六进制编辑器将jnz更改为jz。我知道它会因系统而异,但我不确定在哪里寻找这些信息。我正在使用Mac OS X 64位,并使用IDA Pro反汇编代码。
I am messing around with some reverse engineering, but I don't know how to change a jnz to jz with a hex editor. I understand it will vary between systems but I'm not sure where to look to find this information. I'm working on Mac OS X 64 bit and I disassembled code with IDA Pro.
推荐答案
如果您发现 jz
,它将看起来像 74 XX
或 0F 84 XX XX XX XX
。如果它是 74
,请将其更改为 75
。如果它是 84
的那个,请将其更改为 85
。这些信息可以在英特尔的手册(第2A卷)中找到。
If you've found a jz
, it will either look like 74 XX
or 0F 84 XX XX XX XX
. If it's a 74
, change it to 75
. If it's the one with 84
, change it to 85
. This information can be found, among other places, in Intel's manual (volume 2A).
只要它们都是基于x86的系统,它们在各系统之间不会有所不同,如果他们不是那么 jz
和 jnz
甚至可能不存在。
It will not vary between systems, as long as they're all x86 based, and if they aren't then jz
and jnz
may not even exist..
这篇关于如何用十六进制编辑器更改指令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!