Log in

View Full Version : Very Newbie Question - How to translate addresses from IDA to SoftICE?


Cumulous
January 30th, 2004, 19:46
I have a very Newbie question...

When you dissassemble a program in IDA Pro, and you find a code line of interest... How do you translate that address so that when the App is running, and you're in SoftICE - you can find and/or break on that line?

Thanks to all who would have the patience to answer!

doug
January 30th, 2004, 21:35
the address should be the same, _unless_ it gets relocated.

in that case:

1. Find the (default) ImageBase of the file. (check that in IDA or lordpe)
2. Find the new imageBase (in softice: "what module_name" for example)
3. new_address = Your_address - Default_Image_Base + New_Image_Base

new_address : address "in softice"
your_address : address "in ida"

you can find the module_name using sice command "proc" and cycle through the list (generally it's just the filename without the extension)

Also check
http://www.woodmann.net/forum/showthread.php?t=3864&highlight=relocation

and all other search results on "reloc".

sgdt
January 31st, 2004, 02:50
Quote:
[Originally Posted by Cumulous]I have a very Newbie question...

When you dissassemble a program in IDA Pro, and you find a code line of interest... How do you translate that address so that when the App is running, and you're in SoftICE - you can find and/or break on that line?

Thanks to all who would have the patience to answer!


If the issue is constant relocation, and you have MSVC, you can rebase the image with the rebase program. Not that I recomend this, as it alters the image, but it sure beats always having to do math...

However, I think the issue is a little more SoftIce Centric...

You can, on small applications, use ida2sice3i.rar to load everything into SoftIce directly from IDA. A hint when using this is to "hide" stuff you don't and won't need with the '-' on the num key pad. It speeds things up and shrinks the size of the of the symbol table (too big and it can crash even if you configure SoftIce for obscenely large symbol room).

Alternatively, you can generate a map from IDA, and use one of the "MAP to SoftIce" utilities. You don't get the IDA disasm, variables, and comments, but at least the function names are there.

Then, you'll be able to break by symbol name, instead of always having to remember the module name and address's and context.

Cumulous
January 31st, 2004, 13:56
Quote:
[Originally Posted by doug]
1. Find the (default) ImageBase of the file. (check that in IDA or lordpe)
2. Find the new imageBase (in softice: "what module_name" for example)
3. new_address = Your_address - Default_Image_Base + New_Image_Base



Thank you, Doug - I'm sure that will help immensely. However, one followup question - if you don't mind...

While I had no problems determining the ImageBase in SoftICE, I am new to IDA, and I am uncertain where to determine the default ImageBase there. I am using IDA Pro 4.5. There was no information in the program's Help system - and looking elsewhere usually yielded "Use a PE Editor to look at the PE Header".

Where can I find this information in IDA Pro 4.5?

Cumulous
January 31st, 2004, 13:58
Quote:
[Originally Posted by sgdt]
You can, on small applications, use ida2sice3i.rar to load everything into SoftIce directly from IDA. A hint when using this is to "hide" stuff you don't and won't need with the '-' on the num key pad. It speeds things up and shrinks the size of the of the symbol table (too big and it can crash even if you configure SoftIce for obscenely large symbol room).

Alternatively, you can generate a map from IDA, and use one of the "MAP to SoftIce" utilities. You don't get the IDA disasm, variables, and comments, but at least the function names are there.


Do the utilities you reference work on IDA Pro 4.5 and SoftICE Driver Suite 3.0? Many of the "extras" I've run across were designed for older versions - which is why I'm asking.

dELTA
January 31st, 2004, 14:04
Mostek's IDA2Softice plugin at least, which is referenced above, works for all versions of IDA (and Softice).