ESP int f(int x) {.... } int g(int y) { …. f(2); …. } int main() { …. g(1); …. } EIP 100:...
-
Upload
ashley-lucas -
Category
Documents
-
view
223 -
download
1
Transcript of ESP int f(int x) {.... } int g(int y) { …. f(2); …. } int main() { …. g(1); …. } EIP 100:...
ESPint f(int x){....}
int g(int y){ …. f(2); ….}
int main(){ …. g(1); ….}
EIP
100:
200:
250:
300:
350:
1ESP
EIP
100:
200:
250:
300:
350:
int f(int x){....}
int g(int y){ …. f(2); ….}
int main(){ …. g(1); ….}
1return address to mainESP
EIP
100:
200:
250:
300:
350:
int f(int x){....}
int g(int y){ …. f(2); ….}
int main(){ …. g(1); ….}
1return address to mainESP
EIP
100:
200:
250:
300:
350:
int f(int x){....}
int g(int y){ …. f(2); ….}
int main(){ …. g(1); ….}
1return address to main
Old EBPESP
EIP
100:
200:
250:
300:
350:
int f(int x){....}
int g(int y){ …. f(2); ….}
int main(){ …. g(1); ….}
1return address to main
Old EBPESP
EIP
100:
200:
250:
300:
350:
EBP
int f(int x){....}
int g(int y){ …. f(2); ….}
int main(){ …. g(1); ….}
1return address to main
Old EBP
ESI
EDI
EBX
Local VariablesESP
EIP
100:
200:
250:
300:
350:
EBP
int f(int x){....}
int g(int y){ …. f(2); ….}
int main(){ …. g(1); ….}
1return address to main
Old EBP
ESI
EDI
EBX
Local VariablesESP EIP
100:
200:
250:
300:
350:
EBP
int f(int x){....}
int g(int y){ …. f(2); ….}
int main(){ …. g(1); ….}
1return address to main
Old EBP
ESI
EDI
EBX
Local Variables
2ESPEIP
100:
200:
250:
300:
350:
EBP
int f(int x){....}
int g(int y){ …. f(2); ….}
int main(){ …. g(1); ….}
1return address to main
Old EBP
ESI
EDI
EBX
Local Variables
2return address to gESP
EIP
100:
200:
250:
300:
350:
EBP
int f(int x){....}
int g(int y){ …. f(2); ….}
int main(){ …. g(1); ….}
1return address to main
Old EBP
ESI
EDI
EBX
Local Variables
2return address to gESP
100:
200:
250:
300:
350:
EBP
EIP int f(int x){....}
int g(int y){ …. f(2); ….}
int main(){ …. g(1); ….}
1return address to main
Old EBP
ESI
EDI
EBX
Local Variables
2return address to g
Old EBPESP
EIP 100:
200:
250:
300:
350:
EBP
int f(int x){....}
int g(int y){ …. f(2); ….}
int main(){ …. g(1); ….}
1return address to main
Old EBP
ESI
EDI
EBX
Local Variables
2return address to g
Old EBPESP
EIP 100:
200:
250:
300:
350:
EBP
int f(int x){....}
int g(int y){ …. f(2); ….}
int main(){ …. g(1); ….}
1return address to main
Old EBP
ESI
EDI
EBX
Local Variables
2return address to g
Old EBP
ESI
EDIEBX
Local VariablesESP
100:
200:
250:
300:
350:
EIP int f(int x){....}
int g(int y){ …. f(2); ….}
int main(){ …. g(1); ….}
EBP
1return address to main
Old EBP
ESI
EDI
EBX
Local Variables
2return address to g
Old EBP
ESI
EDIEBX
Local VariablesESP
100:
200:
250:
300:
350:
EIP
Function Frames
int f(int x){....}
int g(int y){ …. f(2); ….}
int main(){ …. g(1); ….}
EBP