Documente Academic
Documente Profesional
Documente Cultură
0xbfffffff
Registers
stack pointer (ESP): register containing the
address of the top of the stack
base pointer (EBP): register containing the
address of the bottom of the stack frame
instruction pointer (EIP): register containing
the address of the instruction to be executed
Other examples: EAX (return value), etc.
Instructions
mov dest, src: copy 4 bytes from src to dest.
0xbfffffc0
For registers, move their value, and for
addresses, move the data at the address.
top of the
(Intel notation)
jmp address: execute the instruction at
address
$ cat example.c
pop reg = mov reg, ESP; add ESP, 4
void func(int a) {
push data = sub ESP, 4; mov data, ESP
int8_t b = 0;
enter N bytes= push EBP; mov EBP, ESP;
return;
sub ESP, N bytes (required for locals)
}
call func = push EIP; jmp func address
int main(int argc, char** argv) {
leave = mov ESP, EBP; pop EBP
func(0);
ret = pop EIP; jmp EIP
return 0;
}
stack
prologue
epilogue
prologue
epilogue
EBP
0xbfffffff
ESP
0xbffffff0
Registers
stack pointer (ESP): register containing the
address of the top of the stack
base pointer (EBP): register containing the
address of the bottom of the stack frame
instruction pointer (EIP): register containing
the address of the instruction to be executed
Other examples: EAX (return value), etc.
Instructions
mov dest, src: copy 4 bytes from src to dest.
For registers, move their value, and for
addresses, move the data at the address.
(Intel notation)
jmp address: execute the instruction at
address
pop reg = mov reg, ESP; add ESP, 4
0xbfffffc0
push data = sub ESP, 4; mov data, ESP
enter N bytes= push EBP; mov EBP, ESP;
sub ESP, N bytes (required for locals)
call func = push EIP; jmp func address
0x08046e60
leave = mov ESP, EBP; pop EBP
ret = pop EIP; jmp EIP
prologue
epilogue
prologue
epilogue
EBP
0xbfffffff
Registers
ESP
stack pointer (ESP): register containing the
0xbfffffec
address of the top of the stack
base pointer (EBP): register containing the
address of the bottom of the stack frame
instruction pointer (EIP): register containing
the address of the instruction to be executed
Other examples: EAX (return value), etc.
Instructions
mov dest, src: copy 4 bytes from src to dest.
For registers, move their value, and for
addresses, move the data at the address.
(Intel notation)
jmp address: execute the instruction at
address
pop reg = mov reg, ESP; add ESP, 4
0xbfffffc0
push data = sub ESP, 4; mov data, ESP
enter N bytes= push EBP; mov EBP, ESP;
sub ESP, N bytes (required for locals)
call func = push EIP; jmp func address
0x08046e60
leave = mov ESP, EBP; pop EBP
ret = pop EIP; jmp EIP
0xbfffffff
prologue
epilogue
prologue
epilogue
0xbfffffff
Registers
stack pointer (ESP): register containing the ESP, EBP
0xbfffffec
address of the top of the stack
base pointer (EBP): register containing the
address of the bottom of the stack frame
instruction pointer (EIP): register containing
the address of the instruction to be executed
Other examples: EAX (return value), etc.
Instructions
mov dest, src: copy 4 bytes from src to dest.
For registers, move their value, and for
addresses, move the data at the address.
(Intel notation)
jmp address: execute the instruction at
address
pop reg = mov reg, ESP; add ESP, 4
0xbfffffc0
push data = sub ESP, 4; mov data, ESP
enter N bytes= push EBP; mov EBP, ESP;
sub ESP, N bytes (required for locals)
call func = push EIP; jmp func address
0x08046e60
leave = mov ESP, EBP; pop EBP
ret = pop EIP; jmp EIP
0xbfffffff
prologue
epilogue
prologue
epilogue
0xbfffffff
Registers
stack pointer (ESP): register containing the EBP
0xbfffffec
address of the top of the stack
base pointer (EBP): register containing the
ESP
address of the bottom of the stack frame
instruction pointer (EIP): register containing 0xbfffffe8
the address of the instruction to be executed
Other examples: EAX (return value), etc.
Instructions
mov dest, src: copy 4 bytes from src to dest.
For registers, move their value, and for
addresses, move the data at the address.
(Intel notation)
jmp address: execute the instruction at
address
pop reg = mov reg, ESP; add ESP, 4
0xbfffffc0
push data = sub ESP, 4; mov data, ESP
enter N bytes= push EBP; mov EBP, ESP;
sub ESP, N bytes (required for locals)
call func = push EIP; jmp func address
0x08046e60
leave = mov ESP, EBP; pop EBP
ret = pop EIP; jmp EIP
0xbfffffff
0x00000000
prologue
epilogue
prologue
epilogue
0xbfffffff
Registers
stack pointer (ESP): register containing the EBP
0xbfffffec
address of the top of the stack
base pointer (EBP): register containing the
address of the bottom of the stack frame
instruction pointer (EIP): register containing
the address of the instruction to be executed
Other examples: EAX (return value), etc.
ESP
Instructions
0xbfffffe4
mov dest, src: copy 4 bytes from src to dest.
For registers, move their value, and for
addresses, move the data at the address.
(Intel notation)
jmp address: execute the instruction at
address
pop reg = mov reg, ESP; add ESP, 4
0xbfffffc0
push data = sub ESP, 4; mov data, ESP
enter N bytes= push EBP; mov EBP, ESP;
sub ESP, N bytes (required for locals)
call func = push EIP; jmp func address
0x08046e60
leave = mov ESP, EBP; pop EBP
ret = pop EIP; jmp EIP
0xbfffffff
0x00000000
0x08046fce
prologue
epilogue
prologue
epilogue
0xbfffffff
Registers
stack pointer (ESP): register containing the EBP
0xbfffffec
address of the top of the stack
base pointer (EBP): register containing the
address of the bottom of the stack frame
instruction pointer (EIP): register containing
the address of the instruction to be executed
Other examples: EAX (return value), etc.
ESP
Instructions
0xbfffffe0
mov dest, src: copy 4 bytes from src to dest.
For registers, move their value, and for
addresses, move the data at the address.
(Intel notation)
jmp address: execute the instruction at
address
pop reg = mov reg, ESP; add ESP, 4
0xbfffffc0
push data = sub ESP, 4; mov data, ESP
enter N bytes= push EBP; mov EBP, ESP;
sub ESP, N bytes (required for locals)
call func = push EIP; jmp func address
0x08046e60
leave = mov ESP, EBP; pop EBP
ret = pop EIP; jmp EIP
0xbfffffff
0x00000000
0x08046fce
0xbfffffec
prologue
epilogue
prologue
epilogue
0xbfffffff
Registers
stack pointer (ESP): register containing the
address of the top of the stack
base pointer (EBP): register containing the
address of the bottom of the stack frame
instruction pointer (EIP): register containing
the address of the instruction to be executed
Other examples: EAX (return value), etc.
ESP, EBP
Instructions
0xbfffffe0
mov dest, src: copy 4 bytes from src to dest.
For registers, move their value, and for
addresses, move the data at the address.
(Intel notation)
jmp address: execute the instruction at
address
pop reg = mov reg, ESP; add ESP, 4
0xbfffffc0
push data = sub ESP, 4; mov data, ESP
enter N bytes= push EBP; mov EBP, ESP;
sub ESP, N bytes (required for locals)
call func = push EIP; jmp func address
0x08046e60
leave = mov ESP, EBP; pop EBP
ret = pop EIP; jmp EIP
0xbfffffff
0x00000000
0x08046fce
0xbfffffec
prologue
epilogue
prologue
epilogue
0xbfffffff
Registers
stack pointer (ESP): register containing the
address of the top of the stack
base pointer (EBP): register containing the
address of the bottom of the stack frame
instruction pointer (EIP): register containing
the address of the instruction to be executed
Other examples: EAX (return value), etc.
EBP
Instructions
0xbfffffe0
mov dest, src: copy 4 bytes from src to dest.
For registers, move their value, and for
ESP
addresses, move the data at the address.
0xbfffffd0
(Intel notation)
jmp address: execute the instruction at
address
pop reg = mov reg, ESP; add ESP, 4
0xbfffffc0
push data = sub ESP, 4; mov data, ESP
enter N bytes= push EBP; mov EBP, ESP;
sub ESP, N bytes (required for locals)
call func = push EIP; jmp func address
0x08046e60
leave = mov ESP, EBP; pop EBP
ret = pop EIP; jmp EIP
0xbfffffff
0x00000000
0x08046fce
0xbfffffec
0x00
prologue
epilogue
prologue
epilogue
0xbfffffff
Registers
stack pointer (ESP): register containing the EBP
0xbfffffec
address of the top of the stack
base pointer (EBP): register containing the
address of the bottom of the stack frame
ESP
instruction pointer (EIP): register containing
0xbfffffe4
the address of the instruction to be executed
Other examples: EAX (return value), etc.
Instructions
mov dest, src: copy 4 bytes from src to dest.
For registers, move their value, and for
addresses, move the data at the address.
(Intel notation)
jmp address: execute the instruction at
address
pop reg = mov reg, ESP; add ESP, 4
0xbfffffc0
push data = sub ESP, 4; mov data, ESP
enter N bytes= push EBP; mov EBP, ESP;
sub ESP, N bytes (required for locals)
call func = push EIP; jmp func address
0x08046e60
leave = mov ESP, EBP; pop EBP
ret = pop EIP; jmp EIP
0xbfffffff
0x00000000
0x08046fce
0xbfffffec
0x00
prologue
epilogue
prologue
epilogue
0xbfffffff
Registers
stack pointer (ESP): register containing the EBP
0xbfffffec
address of the top of the stack
base pointer (EBP): register containing the
ESP
address of the bottom of the stack frame
instruction pointer (EIP): register containing 0xbfffffe8
the address of the instruction to be executed
Other examples: EAX (return value), etc.
Instructions
mov dest, src: copy 4 bytes from src to dest.
For registers, move their value, and for
addresses, move the data at the address.
(Intel notation)
jmp address: execute the instruction at
address
pop reg = mov reg, ESP; add ESP, 4
0xbfffffc0
push data = sub ESP, 4; mov data, ESP
enter N bytes= push EBP; mov EBP, ESP;
sub ESP, N bytes (required for locals)
call func = push EIP; jmp func address
0x08046e60
leave = mov ESP, EBP; pop EBP
ret = pop EIP; jmp EIP
0xbfffffff
0x00000000
prologue
epilogue
prologue
epilogue
EBP, ESP
0xbfffffff
Registers
stack pointer (ESP): register containing the
address of the top of the stack
base pointer (EBP): register containing the
address of the bottom of the stack frame
instruction pointer (EIP): register containing
the address of the instruction to be executed
Other examples: EAX (return value), etc.
Instructions
mov dest, src: copy 4 bytes from src to dest.
For registers, move their value, and for
addresses, move the data at the address.
(Intel notation)
jmp address: execute the instruction at
address
pop reg = mov reg, ESP; add ESP, 4
0xbfffffc0
push data = sub ESP, 4; mov data, ESP
enter N bytes= push EBP; mov EBP, ESP;
sub ESP, N bytes (required for locals)
call func = push EIP; jmp func address
0x08046e60
leave = mov ESP, EBP; pop EBP
ret = pop EIP; jmp EIP
0x08046abc...
0xbfffffff
0x00000000
prologue
epilogue
prologue
epilogue