Flag: Tornado! Hurricane!

 Forums >>  Target Specific - General  >>  ARM Executable - Patching / Assemble

Topic created on: August 16, 2010 06:48 CDT by iktisatcihacker .

Hi,
I am new here and in reverse engineering. As you know we can add assembly code in Ollydbg. Just right click on a string and Assemble :)

Now I am dissassembling an ARM executable. As you know Ollydbg doesnt support ARM. 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...

  AMX   December 14, 2010 05:40.00 CST
I dont know of any program that does this as comfortable as Ollydbg seems to do it (I never used Ollydbg).
A technique I used for binary files was appending code to the file and inserting a branch instruction at the appropriate place. You can calculate a branch like:
uint32_t br = 0xea000000 | ((branch_dest - 8) >> 2);
If you have an elf or something else you would need to adjust some more values in the headers/tables.
For the code you append, just compile it and make it a binary using objcopy for example:
(arm-xxx-)objdump -S -O binary infile.elf outfile.bin
be sure to either compile with -fPIC or use an appropriate linker script

Note: Registration is required to post to the forums.

There are 28,224 total registered users.


Recently Created Topics
Reverse Engineering ...
Jan/23
Career: DoD Agency I...
Jan/22
"Disappearing&q...
Jan/17
Career: Software Sec...
Jan/11
Where is the call st...
Jan/07
IDA Pro 6.1 Breakpoi...
Jan/01
How to create data s...
Dec/30
can i search all mod...
Dec/23
IDA symbol table exp...
Dec/20
An anti-attach trick
Dec/17


Recent Forum Posts
Reverse Engineering ...
NirIzr
"Disappearing&q...
NirIzr
Reverse Engineering ...
charlie
"Disappearing&q...
charlie
An anti-attach trick
Bass
An anti-attach trick
waleeda...
An anti-attach trick
Bass
An anti-attach trick
waleeda...
An anti-attach trick
Bass
Looking for value in...
NirIzr


Recent Blog Entries
cmathieu
Feb/07
Hacker Carnival

waleedassar
Feb/06
OllyDbg v1.10 And Hardware ...

waleedassar
Jan/31
Yet Another Anti-Debug Trick

RolfRolles
Jan/22
Finding Bugs in VMs with a ...

waleedassar
Jan/13
An OllyDbg Bug Disables Sof...

More ...


Recent Blog Comments
waleedassar on:
Feb/07
OllyDbg v1.10 And Hardware ...

NirIzr on:
Feb/07
OllyDbg v1.10 And Hardware ...

NirIzr on:
Feb/05
Yet Another Anti-Debug Trick

trolotou on:
Feb/05
Doudoune Moncler -Pennies F...

waleedassar on:
Feb/01
Yet Another Anti-Debug Trick

More ...


Imagery
SoySauce Blueprint
Jun 6, 2008

[+] expand

View Gallery (11) / Submit