[Tools] Elfina—A multi-architecture ELF loader supporting x86 and x86-64 binaries
Last Update:
Word Count:
Read Time:
Elfina
Elfina is a multi-architecture ELF loader supporting x86 and x86-64 binaries.
Background
Recently, I have been studying reverse engineering on Windows and the PE file format.
After that, I started exploring ELF binaries to learn more about Linux reverse engineering and rootkit development.
To better understand how ELF executables are loaded and executed, I developed Elfina as a learning project focused on the Linux kernel and the ELF file format.
If you find this project useful or informative, a ⭐ would be appreciated!
GitHub repository: https://github.com/iss4cf0ng/Elfina
Disclaimer
This project is intended for educational and research purposes only.
It is designed to help understand:
- ELF file format
- Reverse engineering concepts
Features
- Multi-architecture ELF loader
- Support for x86 and x86-64 ELF binaries
- Multiple execution methods
--mmaploading--memfdexecution
- ELF probing
--infodisplays ELF metadata and structure
Supported ELF Architectures
| Architecture | Bits | Common Devices |
|---|---|---|
| x86 (i386) | 32-bit | Old PCs, 32-bit Linux |
| x86-64 | 64-bit | Modern PCs, servers |
| ARM32 | 32-bit | Raspberry Pi 2, older Android |
| AArch64 (ARM64) | 64-bit | Raspberry Pi 3/4/5, modern Android |
| RISC-V 64 | 64-bit | SiFive boards, VisionFive, emerging Linux devices |
Quick Start
Requirements
1 | |
Download and extract the release package:1
2
3
4
5wget https://github.com/iss4cf0ng/Elfina/releases/latest/download/elfina-linux.tar.gz
tar -xzf elfina-linux.tar.gz
cd elfina
chmod +x ./elfina
chmod +x ./elfina32
The layout is shown as follows:1
2
3elfina/
├ elfina
└ elfina32
Usage
1 | |
Build from Source
Clone the repository and compile the project:1
2
3git clone https://github.com/iss4cf0ng/Elfina
cd Elfina
make
or1
2chmod +x build.sh
./build.sh
Demonstration
elfina (x86-64)
elfina32 (32-bit)
On Windows Subsystem for Linux (WSL2), Elfina cannot execute 32-bit ELF binary files. Probing (--info) and 64-bit execution work fine. For full 32-bit support, use a native Linux environment or a VM such as VirtualBox or VMWare.
THANKS FOR READING