Stack BoF / Heap BoF [root@localhost ~]# vi bof_auth.c#include #include #include int check_auth(char *password) { // 패스워드가 맞는지 확인하는 함수 int auth = 0; char temp[16]; // 16바이트만큼 temp 크기 할당 strncpy(temp, password, strlen(password)); // temp에 password의 길이만큼 저장하고 길이가 16 이상이면 버퍼오버플로우 발생 if (!strcmp(temp, "SECRET_PASSWORD")) auth = 1; // auth가 temp 뒤에 존재하므로 temp의 값을 길게 해서 조작하면 ..