Heap

SecurityFactorial/SF System Loadmap

[ 14 ] SUper Stack Pivot

보호되어 있는 글입니다.

SecurityFactorial/SF System Loadmap

[ 13 ] Using Calloc Exploit

보호되어 있는 글입니다.

System Hacking/Study Notes

Tcache_Duplicate

*** tcache 를 통해 heap이 관리되는 버전인 glibc-2.27 ↑(Ubuntu 18.04↑) 을 기준으로 작성되었습니다 *** Tcache는 heap을 처리하는데 들어가는 시간을 줄이기 위해 만들어졌다. 이전 버전 glibc의 fastbin 동작원리와 비슷하다. #include #include int main() { fprintf(stderr, "This file demonstrates a simple double-free attack with tcache.\n"); fprintf(stderr, "Allocating buffer.\n"); int *a = malloc(8); fprintf(stderr, "malloc(8): %p\n", a); fprintf(stderr, "Freeing tw..

System Hacking/Study Notes

Unsafe_Unlink

https://github.com/shellphish/how2heap/blob/master/glibc_2.26/unsafe_unlink.c # 시작하기 전에 unsafe_unlink는 unlink의 취약점을 통해서 사용자가 원하는 장소에 원하는 값을 적을 수 있다. 이부분에 대해서 공부할 때 heap의 unlink 에 대해서 알고가면 이해하는데 도움이 된다. unlink : heap과 heap의 연결리스트를 끊다. (논리적 연결고리를 해제한다.) ex) A B C => A C unlink 는 free를 할 때 인접한 chunk들이 함께 병합될때 호출되는 매크로이다. /* Take a chunk off a bin list */ #define unlink(AV, P, BK, FD) { if (__builti..

SFjam
'Heap' 태그의 글 목록