Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IDA Pro disassembly shows ? instead of hex or plain ascii in .data?

I am using IDA Pro to disassemble a Windows DLL file. At one point I have a line of code saying

mov esi, dword_xxxxxxxx

I need to know what the dword is, but double-clicking it brings me to the .data page and everything is in question marks.

How do I get the plain text that is supposed to be there?

like image 974
bunbun Avatar asked Jun 29 '16 07:06

bunbun


People also ask

What is Ida disassembler?

A disassembler like IDA Pro is capable of creating maps of their execution to show the binary instructions that are actually executed by the processor in a symbolic representation called assembly language.

How does Ida perform code analysis?

IDA performs automatic code analysis, using cross-references between code sections, knowledge of parameters of API calls, and other information. However, the nature of disassembly precludes total accuracy, and a great deal of human intervention is necessarily required; IDA has interactive functionality to aid in improving the disassembly.

How does IDA Pro recognize an executable file?

Upon opening the executable, IDA Pro will automatically recognize the file format of the executable: in our case, it is a PE Windows executable. It will also recognize the architecture the executable was compiled against.

How does Ida handle assembly instructions?

During that time, IDA will also load and parse the actual code instructions of the executable file into the assembly instructions of the selected processor module. Those assembly instructions are then also showed to the user for analysis.


1 Answers

If you see question marks in IDA, this means that there's no physical data at this location on the file (on your disk drive).

Sections in PE files have a physical size (given by the SizeOfRawData field of the section header). This physical size (on disk) might be different from the size of the section once it is mapped onto the process memory by the Windows' loader (this size is given by the VirtualSize field of the section header).

So, if the VirtualSize field is bigger than the SizeOfRawData field, a part of the section has no physical existence and it exists only in memory (once the file is mapped onto the process address space).

On most case, at program entry point, you can assume this memory is filled with 0 (but some parts of the memory might be written by the windows loader).

To get the locations where the data is being written, read or loaded you can use cross-references (xref). Here's an example :

enter image description here

Click on the name of the data from which you want the xref :

enter image description here

Then press 'x', you'll be shown all known (to ida) location where the data is used :

enter image description here

The second column indicates how the data is used:

  • r means it is read
  • w means it is written
  • o means it is loaded as a pointer
like image 195
Neitsa Avatar answered Oct 20 '22 14:10

Neitsa