드림핵(8)
-
basic_heap_overflow 풀이
#include #include #include #include #include struct over { void (*table)(); }; void alarm_handler() { puts("TIME OUT"); exit(-1); } void initialize() { setvbuf(stdin, NULL, _IONBF, 0); setvbuf(stdout, NULL, _IONBF, 0); signal(SIGALRM, alarm_handler); alarm(30); } void get_shell() { system("/bin/sh"); } void table_func() { printf("overwrite_me!"); } int main() { char *ptr = malloc(0x20); struct o..
2021.08.03 -
basic_exploitation_002 풀이
#include #include #include #include void alarm_handler() { puts("TIME OUT"); exit(-1); } void initialize() { setvbuf(stdin, NULL, _IONBF, 0); setvbuf(stdout, NULL, _IONBF, 0); signal(SIGALRM, alarm_handler); alarm(30); } void get_shell() { system("/bin/sh"); } int main(int argc, char *argv[]) { char buf[0x80]; initialize(); read(0, buf, 0x80); printf(buf); exit(0); } https://dreamhack.io/learn/2..
2021.08.02