Search code examples
ida

Automatically marking unexplored areas as code in IDA


I have a binary file that I am disassembling in IDA. Because IDA can't find every single code path, I need to manually go through and find unexplored areas in the binary and convert them to code by basically repeating Ctrl+U and C. This is obviously very time consuming.

Is there a way to automatically find unexplored areas and attempt to convert them to code?


Solution

  • In the end, I chose to convert the binary image into an ELF file and marked the binary code as executable.

    When I loaded this ELF file into IDA, the ELF file headers told IDA that it was a code section and IDA began using its own heuristics to automatically disassemble as much as possible as code.

    Here's the short script I used to achieve this.