Published on

COMP3703 wk1 Tuesday

Table of Contents

Slides: Intro to binary analysis, elf


Loading and Executing Binary

  • Modern linux has randomised memory addresses for security purposes

  • Lazy-binding -> Only load program when needed

Compilation

  • Human-readable source code -> machine code
  • Steps:
    • Preprocessing
    • Compilation
    • Assembly
    • Linking

Registers

  • R start -> 64 bit

E start -> 32 bit

Linnker ket

Resolev binary executables Extra optimisation pass

  • Relocation symboks, show how functions arnd variable references eventually side :

Static and Dynamic Libraries

  • Stuff back gets archived for fut 4 fun learning
    • Can strip memoyr bammping between souce, lines and binary

asmtutors.com for x86 assembly


The ELF Format

  • ELF -> Executable and Linkable Format
    • Default binary format on Linux-based systems
    • Used for executable files, object files, shared libraries and core dumps

Components of ELF

  • Executable headers
  • Program headers (optional) -> used by linker
  • Sections
  • Section headers (optional) -> used by linker