mandiant / mandiant/capa

IDA Elf section header parsing fails.

Open
#1,394 0 comments 1 reaction 0 assignees View on GitHub
bug ida
Dominant language
Python
Stars
6.2k
Forks
726
Avg merge
11d 11h
Merged PRs (30d)
7

Description

Using the latest capa

1. I have an ELF binary with an e_shoff that is in a region not mapped into IDA. Even with a manual load this data is not present
![image](https://user-images.githubusercontent.com/6619205/226722209-7f560df7-d39d-4a7d-8657-feae3d7daf79.png)

2. When capa attempts to parse the elf header
![image](https://user-images.githubusercontent.com/6619205/226722394-c407832c-0040-42b9-be0d-e5a518af47c7.png)

it correctly recovers the e_shoff value but the read to the shimmed idb file object fails as IDA doesn't have this data present in the IDB. I have no idea why they'd do this, however I have reservations about shimming the IDB as a readable file and doing raw parsing like this after this issue as well as the previous issue https://github.com/mandiant/capa/issues/1393.

This issue is distinct from https://github.com/mandiant/capa/issues/1393 in that the region being referenced is not loaded _at all_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the ELF section-header parsing failure with an e_shoff region that is not loaded into IDA, then inspect the ELF parsing entry point and the shimmed IDB file read described in the report. Compare the behavior with issue #1393 and define completion as handling unmapped section-header data without an unexplained read failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
reverse-engineering
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.