CTF (39) 썸네일형 리스트형 Overthewire : Bandit Level 12 → Level 13 시작 안녕하세요!! :D 오랜만에 Overthewire 포스팅입니다. pwanble.kr 풀다가 지쳤.. ㅎㅎ… 여기 약간 도피처..ㅎㅎ.. ..시작해보죠!! root@goorm:/workspace/LCH_Server# ssh bandit12@bandit.labs.overthewire.org -p2220 문제 The password for the next level is stored in the file data.txt, which is a hexdump of a file that has been repeatedly compressed. For this level it may be useful to create a directory under /tmp in which you can work using m.. pwnable.kr : uaf 풀이 시작 안녕하세요!!! :D uaf를 이해했습니다!! 와!!! 바로 풀어볼까요? root@goorm:/workspace/LCH_Server# ssh uaf@pwnable.kr -p2222 Write UP 코드를 보기 전에 uaf가 무엇인지에 대해 알아봅시다! uaf (Use After Free) : 동적할당 된 Heap 영역을 free 후 재사용 할 때 생기는 취약점 malloc 함수에는 캐싱 기능이 있습니다. 그 중 Deferred Coalescing, 병합 지연 속성은 Heap 영역을 합치거나 쪼개는 시간을 절약하기 위해 free된 heap을 남겨두었다가 사용 요청이 오면 그대로 쓰게 해줍니다. 간단한 코드를 짜서 확인해보겠습니다. root@goorm:/workspace/LCH_Server# cat u.. pwnable.kr : lotto 풀이 시작 안녕하세요!! 원래는 uaf를 풀어보려고 했는데 3시간 째 붙잡고 있다가 멘탈이 터졌어요!! 우와!! 그래서 스트레스 풀려고 만만한 lotto를 들고왔어요!! 들어가봐요!! root@goorm:/workspace/LCH_Server# ssh lotto@pwnble.kr -p2222 Write UP lotto.c의 내용을 먼저 볼까요? lotto@ubuntu:~$ 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, 6); printf("Lot.. pwnable.kr : shellshock 풀이 시작 안녕하세요!! 1 pt짜리 문제이지만 배울 것이 엄청 많은 shellshock 문제를 풀어보겠습니다. 시작해보죠!! root@goorm:/workspace/LCH_Server# ssh shellshock@pwnable.kr -p2222 Write UP shellshock@ubuntu:~$ 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... pwnable.kr : mistake 풀이 시작 안녕하세요 :D passcode에 이어 오늘은 mistake를 들고 왔습니다. 10점짜리 풀다가 1점짜리 푸니깐 편-안하네요..ㅎㅎ.. 시작해보겠습니다! root@goorm:/workspace/LCH_Server# ssh mistake@pwnable.kr -p2222 Write UP mistake@ubuntu:~$ ls -l total 24 -r-------- 1 mistake_pwn root 51 Jul 29 2014 flag -r-sr-x--- 1 mistake_pwn mistake 8934 Aug 1 2014 mistake -rw-r--r-- 1 root root 792 Aug 1 2014 mistake.c -r-------- 1 mistake_pwn root 10 Jul 29 2014 pas.. pwnable.kr : passcode 풀이 시작 안녕하세요! :D 10 pt짜리 문제인 passcode의 풀이를 써볼까 합니다. 드디어 이 문제의 Write up을 쓰게 되네요.. 이 문제 때문에 며칠동안 끙끙 앓았습니다 ㅠㅠ 많이 고민한 만큼 얻은 것도 많았어요!! 어려울 수 있지만 끝까지!! 포기말고 진행해보시면 풀 수 있을 겁니다!! 들어가볼까요? root@goorm:/workspace/LCH_Server# ssh passcode@pwnable.kr -p2222 Write UP passcode@ubuntu:~$ ls -l total 16 -r--r----- 1 root passcode_pwn 48 Jun 26 2014 flag -r-xr-sr-x 1 root passcode_pwn 7485 Jun 26 2014 passcode -rw-r--.. Overthewire : Bandit Level 11 → Level 12 시작 안녕하세요 :D 지난번에 이어서 를 풀어보겠습니다. 문제 The password for the next level is stored in the file data.txt, where all lowercase (a-z) and uppercase (A-Z) letters have been rotated by 13 positions data.txt 파일에 비밀번호가 있는데, 대소문자가 13자리 씩 회전되어 있다고 하네요. bandit11@bandit:~$ cat data.txt Gur cnffjbeq vf 5Gr8L4qetPEsPk8htqjhRK8XSP6x2RHh rotated by 13 positions, ROT13이 무슨 말일까요?? `ROT13 : 문자를 알파벳 뒤에 13 번째 문자로 대체하는 간단.. pwnable.kr : random 풀이 시작 안녕하세요 :D 오늘은 random을 풀어볼까 합니다. 순서대로 풀려고 했는데 많이 어렵네요ㅎ.. 쉬운 것 풀고 어려운 문제를 고민해보도록 하겠습니다. 시작해보죠! root@goorm:/workspace/LCH_Server# ssh random@pwnable.kr -p2222 Write UP random@ubuntu:~$ ./random 1234 Wrong, maybe you should try 2^32 cases. random을 실행해보니 사용자의 입력을 기다립니다. 임의의 숫자를 넣어주니깐 틀렸으니깐 2^32번 시도해 보라고 하네요. 무리..겠죠? random.c를 확인해봅시다. random@ubuntu:~$ cat random.c #include int main(){ unsigned int r.. 이전 1 2 3 4 5 다음