Pwnable

[HackerSchool] FTZ Level7 풀이

e_yejun 2019. 12. 2. 19:16

 

ID : level7

PW : come together

 

 

Level7 접속!

 

[level7@ftz level7]$ ls -al
total 80
drwxr-xr-x    4 root     level7       4096 Mar 19  2003 .
drwxr-xr-x   34 root     root         4096 Sep 10  2011 ..
-rw-------    1 root     root            1 Jan 15  2010 .bash_history
-rw-r--r--    1 root     root           24 Feb 24  2002 .bash_logout
-rw-r--r--    1 root     root          224 Feb 24  2002 .bash_profile
-rw-r--r--    1 root     root          151 Feb 24  2002 .bashrc
-rw-r--r--    1 root     root          400 Sep 24  2000 .cshrc
-rw-r--r--    1 root     root         4742 Sep 24  2000 .emacs
-r--r--r--    1 root     root          319 Sep 24  2000 .gtkrc
-rw-r--r--    1 root     root          100 Sep 24  2000 .gvimrc
-rw-r--r--    1 root     root          185 Nov 23  2000 hint
-rw-r--r--    1 root     root          226 Sep 24  2000 .muttrc
-rw-r--r--    1 root     root          367 Sep 24  2000 .profile
drwxr-xr-x    2 root     level7       4096 Feb 24  2002 public_html
drwxrwxr-x    2 root     level7       4096 Jan  9  2009 tmp
-rw-r--r--    1 root     root            1 May  7  2002 .viminfo
-rw-r--r--    1 root     root         4145 Sep 24  2000 .vimrc
-rw-r--r--    1 root     root          245 Sep 24  2000 .Xdefaults

 

 

힌트를 읽어봅시다.

 

 

/bin/level7 명령을 실행하면, 패스워드 입력을 요청한다.

1. 패스워드는 가까운곳에..
2. 상상력을 총동원하라.
3. 2진수를 10진수를 바꿀 수 있는가?
4. 계산기 설정을 공학용으로 바꾸어라.

 

 

먼저, /bin/level7을 실행해봅시다!

 

 

[level7@ftz level7]$ /bin/level7 
Insert The Password : 

 

 

아무것도 안주고 패스워드를 입력하라고 뜹니다.

아무 값이나 입력해봅시다.

 

 

[level7@ftz level7]$ /bin/level7 
Insert The Password : aa
cat: /bin/wrong.txt: No such file or directory

 

 

/bin/wrong.txt 파일이 없다고 뜹니다.

찾아보니까 문제가 잘못 됐다고 하더라구요,, 허허

 

/bin/wrong.txt 파일은  

 

--_--_- --____- ---_-__ --__-_-

 

이거라고 합니다.

 

파일을 추가해줘도 되고, 바로 풀어봐도 되겠죠?

 

힌트를 보면 2진수를 10진수로 바꿀수 있냐고 물어봅니다.

계산기를 켜봅시다.

 

 

왼쪽에 옵션을 눌러서 프로그래머용으로 바꿔줍니다.

 

 

- : 1

_ : 0 

 

띄어쓰기를 기준으로 변환해봅시다.

1101101 1100001 1110100 1100101

 

1101101 : 6D

1100001 : 61

1110100 : 74

1100101 : 65

 

6D 61 74 65 

 

각각의 값들을 ASCII CODE로 치환합니다.

 

 

ASCII CODE TABLE

https://she11.tistory.com/14

 

[ASCII] 아스키 코드 표

ASCII CODE TABLE 이미지 출처 : http://shaeod.tistory.com/228

she11.tistory.com

 

6D : m

61 : a

74 : t

65 : e

 

 

바로 /bin/level7을 실행해서 입력해봅시다.

 

 

[level7@ftz level7]$ /bin/level7
Insert The Password : mate

Congratulation! next password is

 

 

 

클리어 ★_