Cartes-fiches

Cartes-fiches 9 Cartes-fiches
Utilisateurs 0 Utilisateurs
Sprache English
Niveau Université
Crée / Actualisé 21.06.2019 / 21.06.2019
Attribution de licence Non précisé
Lien de web
Intégrer
0 Réponses exactes 9 Réponses textes 0 Réponses à choix multiple
Fermer la fenêtre

Describe the memory layout of a 32 bit system inluding the EIP and ESP pointer.

Attribution de licence: Non précisé
Fermer la fenêtre

What are the charecteristics of the stack?

Stack:

  • There is one contiguous memory region containing the stack for the process
  • LIFO - Last in, First Out
  • Contains funtion local variables
  • Also contains: Saved Instruction Pointer (SIP)
  • Current function adds data to the top (bottom) of the stack
Fermer la fenêtre

What are the charecteristics of the heap?

Heap: 

  • There is on contiguous memory region containing the heap
  • Memory allocator returns specific pieces of the memory region
  • For malloc()
  • Alos contains: heap management data
Fermer la fenêtre

What is stored in the code region in memory?

Code region contains:

  • Compiled program code
Fermer la fenêtre

What is the ELF format, and name 3 types.

Programs are stored in ELF files

ELF: Executable and Linkable Format

  • Like COFF, PE (EXE), ....

ELF types:

  • ET_EXEC: Executable File
  • ET_REL: Relocatable File
  • ET_DYN: Shared Object File

ELF "views"

  • Sections
  • Segments
Fermer la fenêtre

Describe the ELF Format how is it structured?

Attribution de licence: Non précisé

Sturcture of ELF file from top to bottom:

  1. ELF Header
  2. Program Header Table (contains the location of sections)
  3. Sections (are contained in segments)
  4. Section Header Table (contains locationn of sections
Fermer la fenêtre

In the ELF format what can be contained in the sections?

Sections:

  • .text: Executable instructions
  • .bss: Unitialized data (usualy the heap)
  • .data: initialized data
  • .rodata: Read-Only data
  • .got: Global Offset Table
  • .plt: Prcedure Linkage Table
  • .init / .fini: initialiyation instructions ("glibc")
Fermer la fenêtre

How is an ELF file loaded what is loaded into the stack, heap and code block?

Attribution de licence: Non précisé

.plt, .text, .init get written into code block

.got, .data, .bss is written into the heap

unalocated space is the stack.