gaasedelen / patching

An Interactive Binary Patching Plugin for IDA Pro
MIT License
872 stars 113 forks source link

Not working since IDA Pro 9.0 #24

Closed loqstrz closed 1 day ago

loqstrz commented 3 months ago

Hi, please port this amazing plugin so it works on the latest IDA Pro 9.0.

https://web.archive.org/web/20240810011600/https://out5.hex-rays.com/beta90_6ba923/idapython_porting_guide.md

loqstrz commented 3 months ago

The errors im receiving in the console are:

plugins/util/ida.py: "import ida_struct" No module named 'ida_struct' plugins/patching/asm.py: from patching.util.ida import plugins/patching/core.py: from patching.asm import plugins/patching/init.py: from patching.core import PatchingCore plugins/patching.py: import patching

Hazuki-san commented 2 months ago

I agreed. This plugin SHOULD be in IDA 9.0

Alois44623 commented 1 month ago

yup, would really appreciate a port as well :c

breaking153 commented 1 month ago

Well I fix it myself by reading the doc. :) you can check that https://github.com/breaking153/patching

kidimbwi commented 1 month ago

Well I fix it myself by reading the doc. :) you can check that https://github.com/breaking153/patching

glad to report that patching is working well in version 9. Thank you very much @breaking153 for updating this great tool.

ohyeah521 commented 1 month ago

@breaking153 测试发现修改arm指令后无法保存,随便修改j个NOP,然后 Edit-Patch Program- Applay patches to input file

Keypatch: attempting to modify "MOV R11, #0" at 0x15888 to "nop "
Keypatch: successfully patched 4 byte(s) at 0x15888 from [00 B0 A0 E3] to [00 F0 20 E3]
15889: has no file mapping (original: B0 patched: F0)...skipping...
1588A: has no file mapping (original: A0 patched: 20)...skipping...
Applied 0/2 patch(es)
breaking153 commented 1 month ago

@breaking153 测试发现修改arm指令后无法保存,随便修改j个NOP,然后 Edit-Patch Program- Applay patches to input file

Keypatch: attempting to modify "MOV R11, #0" at 0x15888 to "nop "
Keypatch: successfully patched 4 byte(s) at 0x15888 from [00 B0 A0 E3] to [00 F0 20 E3]
15889: has no file mapping (original: B0 patched: F0)...skipping...
1588A: has no file mapping (original: A0 patched: 20)...skipping...
Applied 0/2 patch(es)

test.zip

这个不是插件的问题,是file mapping不匹配的问题,你直接通过change bytes也没办法保存的,会显示skipping,我用别的arm架构软件是可以apply的

ohyeah521 commented 1 month ago

@breaking153 明白了,感谢

loqstrz commented 4 weeks ago

@breaking153 Nice! How long did it take you to port this?

breaking153 commented 4 weeks ago

@breaking153 Nice! How long did it take you to port this?

well. it takes me about 2 hours to port it while some API just change its module,it's won't take too long.

ramanveerji commented 1 week ago

Well I fix it myself by reading the doc. :) you can check that https://github.com/breaking153/patching

how to install and use this?

kidimbwi commented 1 week ago

you will find installation instructions here: https://github.com/breaking153/patching#installation

ramanveerji commented 1 week ago

you will find installation instructions here: https://github.com/breaking153/patching#installation

The cmd is same for installation. I tried to use the breaking153 repo url in cmd and still it is not working.

kidimbwi commented 1 week ago

download a zip of the code, uzip it to a convenient location on your hard drive and copy the plugins folder to %appdata%\Hex-Rays\IDA Pro\

Patching

ramanveerji commented 1 week ago

download a zip of the code, uzip it to a convenient location on your hard drive and copy the plugins folder to %appdata%\Hex-Rays\IDA Pro\

Patching

Okay

breaking153 commented 1 week ago

@ramanveerji you can just unzip it into /Plugins/dir and it will work, no need to run the command of original repo :)

ramanveerji commented 1 week ago

@ramanveerji you can just unzip it into /Plugins/dir and it will work, no need to run the command of original repo :)

Thank you 😊🙏

gaasedelen commented 1 day ago

Hi guys -

For IDA 9 compatibility, you should try the develop branch. The develop branch contains several other fixes and tweaks:

I also fixed an important keystone issue today, the artifacts are available below:

I'll probably merge v0.2.0 onto master in the coming days, such that the one-liner / auto-install will be working as expected for IDA 9 users.

edit: it looks like the cross-repo packaging is working again, so the full patching plugin + keystone bundles for dev as of today are available here: https://github.com/gaasedelen/patching/actions/runs/11990362399

gaasedelen commented 1 day ago

Closing as everything has been merged onto master.

You should (in theory) be able to update your installed plugin to latest on master the one-liners in the main README.