카테고리: Theory

[How2Heap] House_of_Force

House of Force house of force 기법은 top chunk를 overwrite하고 malloc의 인접한 값을 반환시키는 방법이다 top chunk는 메모리의 마지막에 위치하는 특별한 chunk이다.그리고 malloc이 os로부터 공간을 더 필요로 할때 resize할 수 있는 chunk이다. 끝에서, 우리는 0x602050에 있는

[How2Heap] Tcache_House_of_spirit

Tcache_House_of_spirit the house of spirit attack on tcache. 기존의 house of spirit과 비슷한 방식으로 작동하지만 free될 fake chunk 뒤에 fake chunk를 만들 필요가 없다. malloc.c의 _int_free 함수에서 tcache_put이 다음 chunk의 prev_inuse

[How2Heap] Tcache_Poisoning

Tcache_Poisoning 이것은 malloc을 속여서 pointer를 임의의 위치(이 경우, 스택)로 반환하는 간단한 tcache poisoning 공격이다. 이 공격은 fastbin corruption 공격과 매우 비슷하다. malloc()을 반환할 주소는 0x7fffb6be4b80이다. buffer를 한 개 할당한다. malloc(128):

[How2Heap] Tcache_dup

Tcache_dup simple double-free attack with tcache. buffer를 할당한다. malloc(8): 0x55fef5f8d260 free를 두 번 한다. -------free(a)------- -------free(a)------- free list : [ 0x55fef5f8d260, 0x55fef5f8d260 ] 다

[How2Heap] Overlapping_Chunks_2

Overlapping_Chunks_2 simple chunks overlapping problem 이것은 인접하지 않은 free chunk를 consolidate하는 공격으로도 참조된다. heap에 chunk를 5개 할당한다. 0x603010 ~ 0x6033f8 p1 chunk 0x603400 ~ 0x6037e8 p2 chunk 0x6037f0 ~ 0x

[How2Heap] Overlapping_Chunks

Overlapping_Chunks.c 이 기법은 glibc에서 tcache옵션이 disabled된 상태에만 작동한다. simple chunks overlapping heap에 chunk 3개를 할당해보자. 3개의 chunk가 여기에 할당됐다: p1=0x603010 p2=0x603110 p3=0x603210 이제 p2 chunk를 free시켜보자 p2 c