[OverTheWire] bandit 17 -> 19

2025. 11. 23. 17:47·bandit

There are 2 files in the homedirectory: passwords.old and passwords.new. The password for the next level is in passwords.new and is the only line that has been changed between passwords.old and passwords.new

 

NOTE: if you have solved this level and see ‘Byebye!’ when trying to log into bandit18, this is related to the next level, bandit19

 

hint : cat, grep, ls, diff

 

오늘 사용할 명령어

  • cat : 파일 내용을 읽어주는 명령어
  • diff : 비교분 파일을 주면 옵션에 따라 다른점을 보여주는 명령어
    • -c : 두 파일간의 차이점 출력
    • -d : 두 파일간의 차이점을 상세하게 출력
    • -i :  대소문자의 차이 무시
    • -w : 모든 공백 차이 무시
    • -s : 두 파일이 같을 때 알림
    • -u : 두 파일의 변경되는 부분과 변경되는 부분의 근처의 내용도 출력

 

문제에서와 같이 passwords.new 파일과 passwords.old 파일의 차이점을 출력해봅시다.

bandit17@bandit:~$ diff -c passwords.new passwords.old
*** passwords.new       2025-10-14 09:26:06.654505233 +0000
--- passwords.old       2025-10-14 09:26:06.650645470 +0000
***************
*** 39,45 ****
  gLZVUZRqJJJUWLKbeP8Lokwq6CbFCyxG
  boG62bCXn3U4gPugAPZMLQ9PtfdX9TMV
  hnGGKfEtEGm7NwcHFmxZzubaJ5LrXbbR
! x2gLTTjFwMOhQ8oWNbMN362QKxfRqGlO
  87QCHMmaVMEz51K7aJvhbOqSR3OzdNKg
  vuUCNxwqGpcAZtNaym57PCbxh3iWPmEv
  lsUfIWgGXpNmnOuu7cR0PZXo2PJ6knhU
--- 39,45 ----
  gLZVUZRqJJJUWLKbeP8Lokwq6CbFCyxG
  boG62bCXn3U4gPugAPZMLQ9PtfdX9TMV
  hnGGKfEtEGm7NwcHFmxZzubaJ5LrXbbR
! BMIOFKM7CRSLI97voLp3TD80NAq5exxk
  87QCHMmaVMEz51K7aJvhbOqSR3OzdNKg
  vuUCNxwqGpcAZtNaym57PCbxh3iWPmEv
  lsUfIWgGXpNmnOuu7cR0PZXo2PJ6knhU
bandit17@bandit:~$ diff -d passwords.new passwords.old
42c42
< x2gLTTjFwMOhQ8oWNbMN362QKxfRqGlO
---
> BMIOFKM7CRSLI97voLp3TD80NAq5exxk

위와 같이 다른 한 줄을 찾았는데 정답은 passwords.new에 있다고 했으니 윗줄이 정답이 되겠죠?

 

그래서 바로 bandit 18에 로그인 해봤는데

┌──(miso㉿Miso)-[~]
└─$ ssh -p 2220 bandit18@bandit.labs.overthewire.org
                         _                     _ _ _
                        | |__   __ _ _ __   __| (_) |_
                        | '_ \ / _` | '_ \ / _` | | __|
                        | |_) | (_| | | | | (_| | | |_
                        |_.__/ \__,_|_| |_|\__,_|_|\__|


                      This is an OverTheWire game server.
            More information on http://www.overthewire.org/wargames

backend: gibson-0
bandit18@bandit.labs.overthewire.org's password:

      ,----..            ,----,          .---.
     /   /   \         ,/   .`|         /. ./|
    /   .     :      ,`   .'  :     .--'.  ' ;
   .   /   ;.  \   ;    ;     /    /__./ \ : |
  .   ;   /  ` ; .'___,/    ,' .--'.  '   \' .
  ;   |  ; \ ; | |    :     | /___/ \ |    ' '
  |   :  | ; | ' ;    |.';  ; ;   \  \;      :
  .   |  ' ' ' : `----'  |  |  \   ;  `      |
  '   ;  \; /  |     '   :  ;   .   \    .\  ;
   \   \  ',  /      |   |  '    \   \   ' \ |
    ;   :    /       '   :  |     :   '  |--"
     \   \ .'        ;   |.'       \   \ ;
  www. `---` ver     '---' he       '---" ire.org


Welcome to OverTheWire!

.

.

.

.

  For support, questions or comments, contact us on discord or IRC.

  Enjoy your stay!

Byebye !     <--- 바이바이가 떴는데
Connection to bandit.labs.overthewire.org closed.

┌──(miso㉿Miso)-[~]
└─$

아까 byebye가 뜬거보면 제대로 찾은 것 같습니다

답을 잘 찾은거 같은데 쫒겨났네요 ..

 

그래서 다시 bandit17로 접속해서 bandit18의 파일이 뭐가 있는지 확인해봤는데 readme 파일이 있더라구요

bandit17@bandit:~$ ls
passwords.new  passwords.old
bandit17@bandit:~$ cd ../
bandit17@bandit:/home$ cd bandit18
bandit17@bandit:/home/bandit18$ ls
readme

위에 readme를 읽고싶은데 ssh로 접속을하면 접속과 동시에 서버가 닫혀버리다보니..

 

그냥 로컬로 돌아와서 읽어봤어요

┌──(miso㉿Miso)-[~]
└─$ ssh -p 2220 bandit18@bandit.labs.overthewire.org cat "readme"
                         _                     _ _ _
                        | |__   __ _ _ __   __| (_) |_
                        | '_ \ / _` | '_ \ / _` | | __|
                        | |_) | (_| | | | | (_| | | |_
                        |_.__/ \__,_|_| |_|\__,_|_|\__|


                      This is an OverTheWire game server.
            More information on http://www.overthewire.org/wargames

backend: gibson-0
bandit18@bandit.labs.overthewire.org's password:
cGWpMaKXVwDUNgPAVJbWYuGHVn9zl3j8

하다보니.. bandit19 비밀번호가 나왔네요

'bandit' 카테고리의 다른 글

[OverTheWire] bandit 22 -> 23  (0) 2025.11.27
[OverTheWire] bandit 21 -> 22  (0) 2025.11.26
[OverTheWire] bandit 16 -> 17  (0) 2025.11.23
[OverTheWire] bandit 15 -> 16  (0) 2025.11.23
[OverTheWire] bandit 14 -> 15  (0) 2025.11.23
'bandit' 카테고리의 다른 글
  • [OverTheWire] bandit 22 -> 23
  • [OverTheWire] bandit 21 -> 22
  • [OverTheWire] bandit 16 -> 17
  • [OverTheWire] bandit 15 -> 16
jokkams
jokkams
jokkams 님의 블로그 입니다.
  • jokkams
    jokkams 님의 블로그
    jokkams
  • 전체
    오늘
    어제
    • 분류 전체보기 (56)
      • 코드업 (8)
      • bandit (32)
      • 학교 (2)
      • 드림핵 (5)
  • 블로그 메뉴

    • 홈
    • 태그
    • 방명록
  • 링크

  • 공지사항

  • 인기 글

  • 태그

    100제
    코드업
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.5
jokkams
[OverTheWire] bandit 17 -> 19
상단으로

티스토리툴바