본문 바로가기

linux kernel userfaultfd + sendmsg heapspray linux kernel universal heap spray글에서 userfaultfd를 사용해서 페이지 폴트가 났을때 커널스레드가 sleep상태로 바뀌는걸 이용해서 힙스프레이를 뿌린다. (틀린부분 지적해주시면 감사하겠습니다!!) sendmsg 시스콜 소스코드 일부 static int ___sys_sendmsg(struct socket *sock, struct user_msghdr __user *msg, struct msghdr *msg_sys, unsigned int flags, struct used_address *used_address, unsigned int allowed_msghdr_flags) { struct compat_msghdr __user *msg_compat = (struct comp.. 더보기
Codegate 2018 writeup https://github.com/yeonnic/CTF/tree/master/Codegate_2018_Final/pwnable Betting:BOF가 일어난다.canary를 릭 하고, ret를 helper함수로 덮어서 플래그를 읽으면 된다. Catshop:Sell cat을 하면 UAF가 일어난다.your name change를 선택해서 플래그를 읽는 함수주소로 함수 포인터를 덮은다음 3번메뉴로 플래그를 읽었다. DaysNote:윤년일때를 선택하면 1바이트 오버플로가 발생하는대 ebp 첫바이트를 덮어쓸수있다.입력 받는 버퍼가 크므로 ret 슬라이딩을 해주고 rop체인을짜서 system함수를 릭하고 플래그를 읽었다. Heapbabe:이거도 UAF가 발생하는대 PIE가 걸려있어서 먼저 PIE_base를 구해야.. 더보기
CodeGate 2018 final 후기 코드게이트 국제해킹방어대회 2018 주니어부 본선에 참가해서 4등을 했습니다.수상을 못해서 아쉽지만 아직 많이 부족하다고 다시한번 깨닫게 되어서 더 열심히 공부하겠습니다! 대회장이 작년보다 훨씬 넓어진 느낌이 나서 내년에도 꼭 본선에 참가할 수 있길...ㅠㅠㅠ(본선 라업은 자고일어나서 써야징..) 더보기