Edit (patch) a binary file in IDA Pro

前端 未结 6 1546
广开言路
广开言路 2021-02-12 19:50

i would like to know how to edit a binary file in ida pro (i just need to change one instruction!)

(its ARM binary)

thanks

相关标签:
6条回答
  • 2021-02-12 20:32

    I think IDA used to have a feature to do that, but it's not present in the current versions.

    You should just use a hex editor. Note the file offset in IDA and edit the file at that address. If you'd like to see the changes in IDA, use the "File" -> "Load file" -> "Reload the input file" menu item.

    0 讨论(0)
  • 2021-02-12 20:32

    First do as Lundman suggested, then choose File / Produce / DIF file.

    Then apply the diff file using an external tool

    0 讨论(0)
  • 2021-02-12 20:35
    1. select the instruction you need to change in "IDA View" subview.

    2. switch to "Hex View" subview. You will see several highlighting hex numbers.

    3. press "F2", edit it, when you finish, press "F2" again.

    4. That's all. you will see your change in other subviews.

    0 讨论(0)
  • 2021-02-12 20:46

    Possibly edit:

    idagui.cfg: DISPLAY_PATCH_SUBMENU = YES

    If the menu is not enabled, then use

    Edit/Patch code/Change Byte

    0 讨论(0)
  • 2021-02-12 20:49

    IDA 6.2 has the "Edit" -> "Patch program" menu enabled out of the box. No need to modify idagui.cfg. There is also an "Apply patches to input file" option that that will modify the target file.

    0 讨论(0)
  • 2021-02-12 20:54

    Here is how i did

    Edit > Patch Program > Assemble 
    

    After Assembling/patching instruction click on Apply Patches to Binary

    done :)

    enter image description here

    0 讨论(0)
提交回复
热议问题