본문 바로가기

how2heap fastbin_dup 원본 소스 : https://github.com/shellphish/how2heap/blob/master/fastbin_dup.c번역한 소스123456789101112131415161718192021222324252627282930313233#include #include int main(void) { printf("이 파일은 fastbin에서의 간단한 double-free 공격을 보여줍니다.\n"); printf("먼저 세 개의 버퍼를 할당합니다.\n"); int* a = malloc(8); int* b = malloc(8); int* c = malloc(8); printf("첫 번째 malloc(8): %p\n", a); printf("두 번째 malloc(8): %p\n", b); printf("세.. 더보기
mysql 한글 깨질 때 vi /etc/mysql/my.cnf[client] default-character-set = utf8[mysqld] character-set-client-handshake=FALSE init_connect="SET collation_connection = utf8_general_ci" init_connect="SET NAMES utf8" character-set-server = utf8 collation-server = utf8_general_ci[mysqldump] default-character-set = utf8[mysql] default-character-set = utf8 추가하고, service mysql restart 하면 됨이렇게 하고 원래 있던 db 재생성 더보기
how2heap first_fit 원본 소스 : https://github.com/shellphish/how2heap/blob/master/first_fit.c번역한 소스 (영어 5등급이 무슨 번역...)12345678910111213141516171819202122232425262728293031323334353637#include #include #include int main(void) { printf("이 파일은 공격에 관한 입증을 하는 것이 아닌 glibc메모리 할당의 본질을 보여줍니다.\n"); printf("glibc는 free되어 있는 청크를 선택할 때 first-fit이라는 알고리즘을 사용합니다.\n"); printf("만약에 청크가 free되어 있고 그 크기가 충분하다면, malloc은 이 청크를 선택할 것입니다.\n".. 더보기