views:

76

answers:

2

Hi,

I must patch an arm executable in my Pocket PC.

I am dissassembling the ARM executable with IDA Pro. But I can not edit binary. As you know Ollydbg let us to edit binary / add assembly code (Right Click->Assemble) But it doesnt support ARM. So I dissassembly it with IDA Pro. But in IDA , I can not add my assembly code into my ARM Executable. After "Edit>Patch Program>Assemble" , It gives an error. (Sorry, This processor module doesnt support the assembler).

So how can add my assembly code into this ARM executable?

Thanks...

A: 

You could try to disassemble the (whole) binary into assembler, then use an assembler to go back to a binary (gnu/binutils tools for example). Then once that works add your modifications to the assembler.

The other alternative is to assemble your new function, find a place in the binary where you can place your new code and replace one or two of the instructions with a branch link to your new code. This is a hand binary modification, not something a gui tool is going to do. Will have to hand compute the branch link instruction.

dwelch
the second way is more useful for me I used this way in Ollydbg for x86 executables. thanks for answer. but I didnt understand hand modification?? Which program/software will I use for modification?
newbiereverser
and by the way, the program that I want to patch is running on Windows Mobile.. So gnu/binutils tools can be used for it? thanks..
newbiereverser
A: 

Not particularly helpful, but I usually look up the instructions set reference and find the instruction encoding, and then fiddle with the hexdump until the disassembly matches what I want.

You can probably use gas to assemble instructions for you and then copy the hexdump around, too.

tc.