Pwnable/CTF-LEARN(2)
-
CTFlearn -rip my bof- (RTL 공격기법)
문제의 소스코드는 다음과 같다. #include #include #include #include // Defined in a separate source file for simplicity. void init_visualize(char* buff); void visualize(char* buff); void win() { system("/bin/cat /flag.txt"); } void vuln() { char padding[16]; char buff[32]; memset(buff, 0, sizeof(buff)); // Zero-out the buffer. memset(padding, 0xFF, sizeof(padding)); // Mark the padding with 0xff. // Initializ..
2023.02.24 -
CTF-LEARN - Simple bof -
#include #include #include #include // Defined in a separate source file for simplicity. void init_visualize(char* buff); void visualize(char* buff); void safeguard(); void print_flag(); void vuln() { char padding[16]; char buff[32]; int notsecret = 0xffffff00; int secret = 0xdeadbeef; memset(buff, 0, sizeof(buff)); // Zero-out the buffer. memset(padding, 0xFF, sizeof(padding)); // Zero-out the ..
2023.02.23