SSP

System Hacking Advanced

[dreamhack] Master Canary

Master Canary└─# checksec mc_thread[*] '/root/dream/Master Canary/mc_thread' Arch: amd64-64-little RELRO: Partial RELRO Stack: Canary found NX: NX enabled PIE: No PIE (0x400000)SSP가 적용됐다. 카나리를 bypass하는 문제라고 예상할 수 있다. 코드를 분석해보자.#include #include #include #include void giveshell() { execve("/bin/sh", 0, 0); }int main() { pthread_t thread_t; if (pthread_create(..

System Hacking Advanced

[dreamhack] rop

ROP(Return Oriented Programming) ROP(Return Oriented Programming)ROP(Return Oriented Programming)ROP는 ASLR과 같은 메모리 보호기법을 우회하기 위한 공격기법으로 return이 포함된 코드 조각들인 가젯들을 이용해 system(“/bin/bash”)를 실행하는 프로그램을 해커가 임의keyme2003.tistory.com └─# checksec rop[*] '/root/dream/rop/rop' Arch: amd64-64-little RELRO: Partial RELRO Stack: Canary found NX: NX enabled PIE: No PIE (0x40..

System Hacking Advanced

[dreamhack] ssp_001

SSP(Stack Smashing Protector) SSP(Stack Smashing Protector)SSP는 BOF를 방어하기 위한 보호기법 중 하나로 함수를 실행할 때, canary라는 랜덤 값을 스택에 추가하여 BOF로 스택 데이터가 변조됐는지 확인하는 방법이다. canary가 변조된 경우는 스택 데이터가keyme2003.tistory.com #include #include #include #include void get_shell() { system("/bin/sh");}void print_box(unsigned char *box, int idx) { printf("Element of index %d is : %02x\n", idx, box[idx]);}void menu() { ..

keyme
'SSP' 태그의 글 목록