/Pwnable (2) 썸네일형 리스트형 pwnable.kr(Toddler's Bottle_lotto)_by $0u1Tr33 로또 프로그램을 만들었다고 한다. lotto@prowl:~$ ls -l total 24 -r--r----- 1 lotto_pwn root 55 Feb 18 2015 flag -r-sr-x--- 1 lotto_pwn lotto 13081 Feb 18 2015 lotto -r--r--r-- 1 root root 1713 Feb 18 2015 lotto.c c파일을 보자. lotto@prowl:~$ cat lotto.c #include #include #include #include unsigned char submit[6]; void play(){ int i; printf("Submit your 6 lotto bytes : "); fflush(stdout); int r; r = read(0, submit, .. Pwnable.kr(Toddler's Bottle_shellshock)_by $0ulTr33 2019.10.7(일) 1점 짜리라서 골랐다. ssh shellshock@pwnable.kr -p2222 비번 : guest 들어와서 보니 4개의 파일이 있다. shellshock@prowl:~$ ls -l total 960 -r-xr-xr-x 1 root shellshock 959120 Oct 12 2014 bash -r--r----- 1 root shellshock_pwn 47 Oct 12 2014 flag -r-xr-sr-x 1 root shellshock_pwn 8547 Oct 12 2014 shellshock -r--r--r-- 1 root root 188 Oct 12 2014 shellshock.c 주의할 점은 shellshock 바이너리 파일에 setgid가 걸려있다. (※setgid란, 실.. 이전 1 다음