본문 바로가기

System Hacking/해커스쿨 FTZ

해커스쿨 FTZ ( level8 -> level9 ) by ORANG

FTZ_level8

 

 [level8@ftz level8]$ ls

hint  public_html  tmp

[level8@ftz level8]$ cat hint

 

 

level9의 shadow 파일이 서버 어딘가에 숨어있다.

그 파일에 대해 알려진 것은 용량이 "2700"이라는 것 뿐이다.

 

간단하네요ㅎㅎ

find 명령어를 이용하겠습니다.

 [level8@ftz level8]$ find / -size 2700 2>/dev/null

 

 

하지만 아무 반응도 없네요

find의 메뉴얼 중 size 옵션에 대해 찾아보니..

 [level8@ftz level8]$ man find

…생략…

                 -size n[bckw]

                        File uses n units of space.  The units are 512-byte

                        blocks by default or if `b' follows n, bytes if `c'

                        follows  n,  kilobytes  if `k' follows n, or 2-byte

                        words if `w' follows n.  The size  does  not  count

                        indirect blocks, but it does count blocks in sparse

                        files that are not actually allocated.

 

bckw 옵션이 붙어있네요ㅎㅎ

 [level8@ftz level8]$ find / -size 2700b 2>/dev/null

[level8@ftz level8]$ find / -size 2700c 2>/dev/null

/var/www/manual/ssl/ssl_intro_fig2.gif

/etc/rc.d/found.txt

/usr/share/man/man3/IO::Pipe.3pm.gz

/usr/share/man/man3/URI::data.3pm.gz

[level8@ftz level8]$ find / -size 2700k 2>/dev/null

[level8@ftz level8]$ find / -size 2700w 2>/dev/null

/usr/lib/perl5/5.8.0/I18N/Collate.pm

/usr/share/locale/es/LC_MESSAGES/memprof.mo

/usr/share/locale/uk/LC_MESSAGES/gtk+.mo

 

딱봐도 의심스러운 /etc/rc.d/found.txt를 보면

 [level8@ftz level8]$ cat /etc/rc.d/found.txt

level9:$1$vkY6sSlG$6RyUXtNMEVGsfY7Xf0wps.:11040:0:99999:7:-1:-1:134549524

…생략…

 

shadow 파일내용 중 level9 부분이 보입니다. 하지만 패스워드는 암호화되어있기 때문에

존더리퍼를 이용해 복호화 하겠습니다. 과정은 생략ㅎㅎ

 

level9의 passwod 는 ‘apple’입니다!!