IDA pro asm instructions change
Asked Answered
W

3

17

I just want to know how I can change asm instructions in the IDA-view A:

  1. How to edit instructions(for instance: jnz to jmp)?
  2. How to insert new instructions(call func1, call func2 inserted to existing code)?

I know how to make dif files, I know how to apply the changes on my DLL, but how can I "make the difference"? How can I edit the code in IDA?

I learned how to modify a DLL:

  1. Modify code(how?)
  2. Generate dif file.
  3. Apply the code modifications to the DLL with the dif file and a script.
Whispering answered 13/6, 2011 at 7:51 Comment(1)
possible duplicate of IDA Pro and editing executablesJohppa
E
21
  1. There is a Edit / Patch menu that used to be shown by default but that is hidden in recent IDA releases. If it is your case, edit the cfg/idagui.cfg file, look for the DISPLAY_PATCH_SUBMENU = NO line and change the setting. On the next IDA session, you will be able to change single byte / word values or assemble some code like in OllyDbg.
  2. Once you have patched your database, go to File / Produce file / Create DIF file, it will let you create a simple diff file in the form offset / value before / value after (it is not the common diff file format)
  3. To apply the diff file to an existing file, you can use the source code of a dif file patcher that was released in the IDA Pro Book
Effable answered 13/6, 2011 at 17:46 Comment(0)
P
3

Use Edit->patch program->assemble to write in assembly syntax

Use Edit->patch program -> patch bytes to edit bytes in the binary

Finally, use Edit->patch program -> apply patch to input file to apply patches. I'v personally used it in IDA 7.0

Pacer answered 19/6, 2019 at 16:36 Comment(0)
E
2

Try IDA Pro 6.1 or 6.2. It has the ability to write the changes to the input file directly.

Evasion answered 6/4, 2012 at 20:59 Comment(1)
How ? I couldn't find it in IDA.Cob

© 2022 - 2024 — McMap. All rights reserved.