Memory Protection Mechanism of Linux TEAM WANG YIS
















![Buffer Overflow (5) int main(int argc, char *argv[]) { char buffer[256]; if(argc < 2){ Buffer Overflow (5) int main(int argc, char *argv[]) { char buffer[256]; if(argc < 2){](https://slidetodoc.com/presentation_image_h/fff5a5a52e87393fa76c68dbf105a1cb/image-17.jpg)
![Buffer Overflow (5) // here is changed! if(strlen(argv[0]) != 77){ printf("argv[0] errorn"); exit(0); } Buffer Overflow (5) // here is changed! if(strlen(argv[0]) != 77){ printf("argv[0] errorn"); exit(0); }](https://slidetodoc.com/presentation_image_h/fff5a5a52e87393fa76c68dbf105a1cb/image-18.jpg)
![Buffer Overflow (5) int main() { char buffer[16]; gets(buffer); printf("%sn", buffer); } Buffer Overflow (5) int main() { char buffer[16]; gets(buffer); printf("%sn", buffer); }](https://slidetodoc.com/presentation_image_h/fff5a5a52e87393fa76c68dbf105a1cb/image-19.jpg)















































- Slides: 66
Memory Protection Mechanism of Linux TEAM WANG YIS of KSIA – 김태욱 01032309051 xodnr 631 fb. com/xodnr 631
TEAM WANG
YIS
Buffer Overflow (3) BUFFER – SFP – RET – Argc/Argv – 환경변수 - 파일명 BUFFER SFP RET
Buffer Overflow (3) BUFFER – SFP – RET – Argc/Argv – 환경변수 - 파일명 BUFFER SFP RET AAAAAAAAAA
Stack 커널 HIGH 유저 LOW
Stack 커널 유저 LOW HIGH STACK | HEAP | DATA | CODE
Buffer Overflow (4) < 버퍼 오버플로우 문제풀이 > 해커스쿨 FTZ 해커스쿨 LOB IO Smash. The. Stack
Buffer Overflow (5) <LOB 문제풀이 유형>
Buffer Overflow (5) int main(int argc, char *argv[]) { char buffer[256]; if(argc < 2){ printf("argv errorn”); exit(0); } strcpy(buffer, argv[1]); printf("%sn", buffer); }
Buffer Overflow (5) // here is changed! if(strlen(argv[0]) != 77){ printf("argv[0] errorn"); exit(0); }
Buffer Overflow (5) int main() { char buffer[16]; gets(buffer); printf("%sn", buffer); }
BUT
Memory Protection (1) ASLR(Address Space Layout Randomization)
Memory Protection (1) ASLR(Address Space Layout Randomization) STACK
Memory Protection (1) ASLR(Address Space Layout Randomization) STACK BUFFER LOW SFP RET 인자 환경변수 파일명 HIGH
Memory Protection (1) ASLR(Address Space Layout Randomization) STACK BUFFER LOW 난짱해커 SFP RET 인자 환경변수 파일명 HIGH
Memory Protection (1) ASLR(Address Space Layout Randomization) STACK BUFFER SFP LOW RET 인자 환경변수 파일명 HIGH 난짱해커
Memory Protection (1) ASLR(Address Space Layout Randomization) STACK BUFFER SFP RET 인자 환경변수 파일명 LOW HIGH 난짱해커
Memory Protection (1) ASLR(Address Space Layout Randomization) STACK BUFFER SFP LOW RET 인자 환경변수 파일명 HIGH 난짱해커
Memory Protection (1) ASLR(Address Space Layout Randomization) STACK BUFFER SFP RET 인자 환경변수 파일명 LOW HIGH 난짱해커
Memory Protection (1) ASLR(Address Space Layout Randomization) STACK BUFFER SFP RET 인자 LOW 환경변수 파일명 HIGH 난짱해커
Memory Protection (1) ASLR(Address Space Layout Randomization) STACK BUFFER SFP LOW RET 인자 환경변수 파일명 HIGH 난짱해커
Memory Protection (1) ASLR(Address Space Layout Randomization) STACK BUFFER SFP RET 인자 LOW 환경변수 파일명 HIGH 난짱해커
Memory Protection (1) ASLR(Address Space Layout Randomization) STACK BUFFER SFP RET 인자 환경변수 파일명 LOW HIGH 난짱해커
Memory Protection (1) ASLR(Address Space Layout Randomization) STACK BUFFER SFP LOW RET 인자 환경변수 파일명 HIGH 난짱해커
Memory Protection (1) ASLR(Address Space Layout Randomization) STACK BUFFER SFP LOW RET 인자 환경변수 파일명 HIGH 난짱해커
Memory Protection (1) ASLR(Address Space Layout Randomization) STACK BUFFER SFP RET 인자 LOW 환경변수 파일명 HIGH 난짱해커
Memory Protection (2) DEP(Data Execution Prevention)
Memory Protection (2) DEP(Data Execution Prevention) STACK BUFFER SFP RET 인자 환경변수 파일명
Memory Protection (2) DEP(Data Execution Prevention) STACK BUFFER LOW SFP RET 인자 환경변수 파일명 HIGH
Memory Protection (2) DEP(Data Execution Prevention) STACK BUFFER LOW SFP RET 인자 환경변수 파일명 HIGH
Memory Protection (2) DEP(Data Execution Prevention) - RTL STACK BUFFER LOW SFP RET 인자 환경변수 파일명 HIGH
Memory Protection (2) RTL BUFFER SFP RET AAAAAAAAAA
Memory Protection (2) RTL BUFFER SFP RET AAAAAAAAAA &system() &execl() &/bin/sh
Memory Protection (2) RTL STACK BUFFER LOW SFP RET 인자 환경변수 파일명 HIGH
Memory Protection (2) RTL STACK BUFFER LOW SFP RET 인자 환경변수 파일명 HIGH
Memory Protection (3) ASCII Armor
Memory Protection (3) ASCII Armor STACK BUFFER LOW SFP RET 인자 환경변수 파일명 HIGH
Memory Protection (3) ASCII Armor STACK BUFFER LOW SFP RET 인자 환경변수 파일명 HIGH
Memory Protection (4) Canary BUFFER SFP RET
Memory Protection (4) Canary BUFFER SFP CANARY RET
Memory Protection (4) Canary BUFFER SFP CANARY RET AAAAA? !#$AAAAA
Memory Protection (4) Canary CANARY RANDOM
Memory Protection (4) Canary CANARY RANDOM TERMINATO R
Memory Protection (4) Canary CANARY RANDOM TERMINATO R NULL