↓ Skip to main content
Background Image

4. File Formats & Binary Structure

·290 words·2 mins
HoXoN
Author
HoXoN
Table of Contents

Binary File Formats
#

Executable file formats
#

Executable file formats are specialized file types that contain instructions a computer can directly run. These files are the final product of compiling and linking source code, and they’re loaded into memory by the operating system’s loader to launch applications or perform tasks.

FormatOS/PlatformExtension(s)About
PEWindows.exe, .dllPortable Executable; includes headers and sections for code/data
ELFLinux, Unix-like.elf, noneExecutable and Linkable Format; modular and flexible
Mach-OmacOS, iOSnoneUsed in Apple systems; supports fat binaries for multiple architectures
MZDOS.exeLegacy format; often a stub for newer formats
COMDOS, Windows.comVery simple, flat memory model
BINUnix, embedded systems.binRaw binary; often firmware or low-level code
  • Understanding file formats matters for reverse engineering
  • Operating system dependency : Different OS – different formats
  • Static vs Dynamic analysis preparation
In this part, I give you the freedom to choose what you need and look it up on Google. If you don’t understand something from the videos, keep searching and exploring—don’t give up! 😄❤️

Portable Executable - Windows
#


PE Tools and Analysis
#

  • PE viewers - PEview, CFF Explorer, PE-bear
  • Command line tools - dumpbin, objdump

Executable and Linkable Format - Linux
#

ELF Tools and Analysis
#

  • readelf - comprehensive ELF analyzer
  • objdump - disassembly and headers
  • hexdump - raw binary viewing
  • file command - quick format identification

Mach-O - Apple
#

Mach-O Tools and Analysis
#

  • otool - object file displaying tool
  • nm - symbol table viewer
  • lipo - universal binary manipulation
  • class-dump - Objective-C class information