Skip to content

Add headless Solana SBF ELF loader - #1

Open
AkhtarXx wants to merge 1 commit into
Decurity:mainfrom
AkhtarXx:fix/headless-sbf-loader
Open

Add headless Solana SBF ELF loader#1
AkhtarXx wants to merge 1 commit into
Decurity:mainfrom
AkhtarXx:fix/headless-sbf-loader

Conversation

@AkhtarXx

Copy link
Copy Markdown

Summary

  • add a dedicated loader for 64-bit little-endian Solana SBF/eBPF ELF files
  • recognize both EM_BPF (247) and EM_SBPF (263) and select the EBPF processor automatically
  • map allocated ELF sections and recover imported runtime symbols in an external segment
  • guard processor callbacks when an expected segment is unavailable
  • add unit tests and a reproducible real headless IDA smoke-test harness

Motivation

IDA’s stock ELF loader can request interactive confirmation for an unknown Solana machine ID before the Python processor module can handle the file. This blocks unattended analysis. Handling the format in a loader removes that prompt and makes processor selection deterministic.

Testing

  • python3 -m unittest discover -s tests -v — 6 tests passed
  • real headless IDA imports for EM_BPF (0xf7) and EM_SBPF (0x107) — return code 0 for both
  • both real runs selected Solana SBF/eBPF ELF, created an external segment, recovered abort, sol_log_, and sol_memcpy_, and identified 38 functions in the bundled sample
  • git diff --check passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant