📚 OpenRCE is preserved as a read-only archive. Launched at RECon Montreal in 2005. Registration and posting are disabled.








Flag: Tornado! Hurricane!

 Forums >>  IDA Pro  >>  SetFixup(...) Problem

Topic created on: March 6, 2007 08:32 CST by bodzcount .

Hi,

i figured out that I have to use SetFixup(...) to partly solve my register problem. However this function doesn't work, I can set everything with SetFixup(...) except the target which is the most important for me :(
When I do
SetFixup(a,FIXUP_OFF32,0,0x100,0);
and check it in IDA View with Ctrl+R I see always 0xFFFFFFFFFFFFFFFF as target.
Does anybody have a solution for that?
@aeppert: do you use the SetFixup in your PPC script as well?

attached is my script.

regards,
bodz

#include <idc.idc>

static main()
{

auto a;
auto d;
auto ea;
auto start,end;
auto out;
auto codeline;
auto target;
auto offset;
//ea=AskAddr(0x00,"Bitte eine Adresse aus der Funktion angeben");
ea=SelStart();


start=GetFunctionAttr(ea,FUNCATTR_START);
end=GetFunctionAttr(ea,FUNCATTR_END);

for (a=start;a<end;a=a+4)
{
d=GetOpType(a,1);
if (d==4)
{
codeline=GetDisasm(a);
if(strstr(codeline,"(%r13)")!=-1)
{
offset=GetOpnd(a,1);
out=ltoa(offset,16);
Message("\n");
Message(out);
target = (0x4017f0+offset);
out=ltoa(target,16);
Message("  ");
Message(out);
SetFixup(a,FIXUP_OFF32,0,target,0);
}

}
}
//AnalyzeArea(start,end);
Message("\n");
}

  igorsk     March 6, 2007 09:23.03 CST
AFAIK SetFixup supports only segment-relative fixups. If you need to base the fixup to a location in the middle of segment, you'll need to write a plugin and use set_fixup_ex().

  bodzcount     March 6, 2007 09:44.32 CST
The new target should be an area in a ram segment. aeppert told me in another thread, that it is possible somehow with IDC.

Any help is greatly appreciated :)

regards,
Bodz

  bodzcount     March 8, 2007 16:39.20 CST
help :(

  bodzcount     March 9, 2007 06:49.10 CST
what does segment relative fixup mean? When I press ctrl+r there is a field called "Target address". I just want to set this field from within IDC, why is that so complicated????????

  bodzcount     March 9, 2007 07:00.45 CST
I found a solution! I fixed the problem by choosing an appropirate base address. I have also an idea why setting the target address doesnt work: When you do it manually with ctrl+r ida asks you after setting the target address if you really wanna do that. I think IDC just says no automatically to that questions.

regards,
bodz

  igorsk     March 9, 2007 10:06.20 CST
Target address is almost always calculated automatically, you cannot just set it to an arbitrary value.

  bodzcount     March 11, 2007 06:31.57 CDT
But I can set it in IDA-View with the ctrl+r dialog...

Note: Registration is required to post to the forums.

There are 31,328 total registered users.


Recently Created Topics
[help] Unpacking VMP...
Mar/12
Reverse Engineering ...
Jul/06
let 'IDAPython' impo...
Sep/24
set 'IDAPython' as t...
Sep/24
GuessType return une...
Sep/20
About retrieving the...
Sep/07
How to find specific...
Aug/15
How to get data depe...
Jul/07
Identify RVA data in...
May/06
Question about memor...
Dec/12


Recent Forum Posts
Finding the procedur...
rolEYder
Question about debbu...
rolEYder
Identify RVA data in...
sohlow
let 'IDAPython' impo...
sohlow
How to find specific...
hackgreti
Problem with ollydbg
sh3dow
How can I write olly...
sh3dow
New LoadMAP plugin v...
mefisto...
Intel pin in loaded ...
djnemo
OOP_RE tool available?
Bl4ckm4n


Recent Blog Entries
halsten
Mar/14
Breaking IonCUBE VM

oleavr
Oct/24
Anatomy of a code tracer

hasherezade
Sep/24
IAT Patcher - new tool for ...

oleavr
Aug/27
CryptoShark: code tracer ba...

oleavr
Jun/25
Build a debugger in 5 minutes

More ...


Recent Blog Comments
nieo on:
Mar/22
IAT Patcher - new tool for ...

djnemo on:
Nov/17
Kernel debugger vs user mod...

acel on:
Nov/14
Kernel debugger vs user mod...

pedram on:
Dec/21
frida.github.io: scriptable...

capadleman on:
Jun/19
Using NtCreateThreadEx for ...

More ...


Imagery
SoySauce Blueprint
Jun 6, 2008

[+] expand

View Gallery (11) / Submit