목록Lab (221)
cdor1's lab
보호되어 있는 글입니다.
보호되어 있는 글입니다.
50 - Just Integer overflow at selling and get flag100 - Just buffer overflow and get flag 150 - Heap pointer overwrite from pwn import * #s = process('./item') s = remote('112.166.114.143', 317) def add(data): print s.recvuntil('> ') s.sendline('1') print s.recvuntil('input content: ') s.sendline(data) def show(): print s.recvuntil('> ') s.sendline('2') def delete(idx): print s.recvuntil('> ') s..
보호되어 있는 글입니다.
참조자 심화버전 call by reference에서 포인터 대신 참조자로 가능, 하지만 c와 달리 함수 콜하는 곳에서 함수의 리턴값을 짐작하기 힘듬.(함수 초기선언은 무조건 알아야함, 참조자의 문제점)int& RefRetFuncOne(int &ref){ref++;return ref;}함수도 이런식으로 선언 가능 malloc, free대신 new delete사용(분석요망)new delete는 내부에서 malloc과 free를 부른다고 알고 있는데 추가적으로 더 공부해 봐야겠다.처리방식이 좀 다름. 객체 사용시에는 new delete사용. c++에서 c헤더 추가시 .h를 제외하고 c를 앞에 붙임ex) stdio.h -> cstdio그냥 .h붙여줘도 되지만 함수 오버로딩때문에 c++에 특화된 헤더 사용하는 것..
보호되어 있는 글입니다.
블로그도 이제 게시글 천천히 올릴게요!개인적인 프로젝트에 좀 더 치중해서 공부할 생각입니다.중요하거나 공유할만한 정보 있으면 포스팅 하겠습니다. 제 블로그에 많은 관심 주시고 방문해 주시는 분들 감사합니다^^
보호되어 있는 글입니다.
use after free, double free bug를 이용한 문제이다. malloc(256), malloc(256), free(0), malloc(256)을 이용해 unsorted bin fd, bk에 적힌 main_arena+88 주소를 leak하고 libc주소를 알아냈다. title, content를 add메뉴에서 title과 content를 입력받는데 매우 취약한 부분이 title을 입력받는 부분과 content의 포인터를 입력받는 부분의 주소가 같다. ex) title이 0x1f200이면 pointer는 0x1f210 그런데 title을 입력받는 부분에서 1byte overflow가 생겨 pointer의 최하위 1바이트를 수정할 수 있다. 이를 이용해 free(1), free(2), free..