Wargame Write-Up/Pwnable.tw2 [Pwnable.tw] hacknote 풀이 hacknote TL;DR manipulate function pointer heap challnege analysis 메뉴는 할당 삭제 함수포인터 호출 이렇게 있다. 전역변수 ptr 에 청크를 5개까지만 입력받을 수 있다. ptr[i] = malloc(0x8) → function address → malloc(input size) → contents 할당할 때는 malloc(0x8), malloc(input size) 순으로 할당받고, 해제할 때는 역순으로 해제한다. 함수포인터를 호출할 때는 (*ptr[i])(ptr[i]); 이런식으로 호출한다. 그 함수는 인자+4 값을 참조해 contents 를 출력해준다. vulns ptr 를 초기화하지 않아 uaf 도 발생. exploit malloc(0x8) →.. 2021. 10. 19. [pwnable.tw] calc 풀이 보호되어 있는 글 입니다. 2021. 8. 8. 이전 1 다음