protostar 15

[프로토스타] format1

format1.c #include #include #include #include int target; void vuln(char *string) { printf(string); if(target) { printf("you have modified the target :)\n"); } } int main(int argc, char **argv) { vuln(argv[1]); } 출처: http://liveoverflow.com/binary_hacking/protostar/format1.html 1. 문제 해결 및 분석 1-0. 포맷 스트링 위치 printf에서 포맷 스트링 버그를 발생시키면 된다. 즉 %x를 통해 스택에 있는 주소를 가져와서 argument까지 접근한다. %x를 반복하면 argument까..

프로토스타 2019.01.22