Comp Security- Week 4 Flashcards
What register is the instruction pointer?
EIP
The EIP register is…
The instruction pointer; points to address. It holds the address of the next instruction inside of memory to be executed
What are the EFLAGS Registers?
Flags for logical conditions (true/false); condition codes
What are ESP AND EBP used for?
Related to stack pointer; created when we have functions called
In AT&T which comes first source or destination?
Source before destination
In Intel which comes first source or destination?
Destination before Source
Suppose we have ebx=eax how would it look like in At&T syntax, how in Intel?
AT&T: movl %eax, %ebx
Intel: mov ebx, eax
The GDB debugger provides a direct method to examine memory using command…
x
x/11xb main means
Examine 11 bytes in hexadecimal starting at main
x/2xw $eip means
Examine 2 words (4bytes) in hexadecimal at $eip
x/i $eip means
Display the memory as disassembled assembly language instructions
List the memory layout from high address to low address
Stack, heap, data, text
Stack
Memory allocated temporarily when we have a function call, procedure call, etc. It stores information
Ex. Local variables that are mainly used for function calls
Heap
Dynamically allocated storage (Dynamically= i dont know its size)
Ex when call malloc() calloc() new()
Data
Statically (i know its size) allocated memory thats declared in code
Ex. String, array