在 Mac OS X 上编辑程序集
我目前正在 Windows 上的 IDA Pro 中反汇编 Mach-O 可执行文件(具体来说,该可执行文件在 Mac OS X 上运行)。我有一条想要更改的指令,但 IDA Pro 似乎没有 允许您执行此操作。因此,我尝试在 OS X 上使用 otool 来转储程序集(效果很好)。但是,在 otool 中编辑程序集后,我尝试使用作为<修改后的otool -tV输出的文件名>
重新组装它。这给我带来了一堆错误,例如垃圾字符 43 (+)
。在 Mac OS X 上仅更改 Mach-O 二进制文件中的一条指令的最简单方法是什么?
I'm currently disassembling a Mach-O executable(the executable runs on Mac OS X, to be specific) in IDA Pro on windows. I have one instruction which I want to change, but it doesn't seem that IDA Pro allows you to do this. So, I tried using otool on OS X to dump the assembly(which it does fine). However, after editing the assembly in otool, I tried to reassemble it using as <file name of modified otool -tV output>
. This greets me with a bunch of errors like Junk character 43 (+)
. What's the easiest way to change just a single instruction in a Mach-O binary on Mac OS X?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我使用了 otool 和 otx 来反汇编各种二进制文件,并且我找到了最简单的编辑方法他们的目的是弄清楚我想要的新代码的汇编是什么(使用 nasm 或类似的),然后只需在二进制文件上使用十六进制编辑器(我更喜欢 Hex Fiend)。
I've used both otool and otx to disassemble various binaries, and I've found the easiest way to edit them is to figure out what the assembly of the new code I want is (using nasm or similar), then just use a hex editor (I prefer Hex Fiend) on the binary file.
我使用Synalize It!。
您还可以加载自定义语法(例如 png 文件,显示标题、标签等...)
I use Synalize It!.
You can load also a custom grammar (example for png files, showing header, tags, etc...)