I know how to write an opcode and how to increment and decrement machine code using plus and minus keys. However, how do I write a sequence of machine code at an offset?
E.g. if I want to write five 0x90, how would I do that?
Reverse Engineering Stack Exchange is a question and answer site for researchers and developers who explore the principles of a system through analysis of its structure, function, and operation. It only takes a minute to sign up.Sign up to join this community
wx[?][fs] 9090 write two intel nops (from wxfile or wxseek)
First seek to the address you want to write, then write:
> s 0x000009d5 > wx 34313335
You can also use:
> w \x34\x31\x33\x35
This will write '4135' at the address pointed by
Radare2 also give you the option to point to the address that you want to write on:
> w \x34\x31\x33\x35 @0x000007b0
Write "4135" at 0x000007b0
Use the one you feel more comfortable.