Bandit Level 0 → Level 1

Minchae Kim·2023년 4월 29일
0

📌 Level 0 → Level 1


https://overthewire.org/wargames/bandit/bandit1.html

🚩 Level Goal

The password for the next level is stored in a file called readme located in the home directory. Use this password to log into bandit1 using SSH. Whenever you find a password for a level, use SSH (on port 2220) to log into that level and continue the game.

🚩 Level 0 → Level 1 문제 풀이

🔹 Password

Bandit1 Password : NH2SXQwcBdpmTEzi3bvBHMM9H66vVXjL

📌 Linux Commands


  • Commands you may need to solve this level : ls , cd , cat , file , du , find

🚩 ls

현재 디렉터리에 어떤 파일이나 디렉터리가 있는지 확인할 때 사용하는 명렁어이다. ls 명령어만 입력하면 디렉터리와 파일 이름이 나타난다.

🔹 ls 명령 옵션

ls 명령을 사용할 때 옵션을 추가하면 파일과 디렉터리를 다양한 형식으로 표시할 수 있다. ls 명령어 다음에 '-'를 붙이고 옵션을 나타내는 문자를 작성하면 된다. 이때 -al처럼 옵션을 2개 이상 사용할 수도 있다. ls는 list를 의미한다.

  • -a : 숨긴 파일이나 디렉터리도 함께 표시한다. (all)
  • -l : 파일이나 디렉터리의 상세 정보를 함께 표시한다. 파일 권한(drwxr/xr/x/r 등), 생성 날짜 등 파일에 대한 자세한 정보를 출력한다. (long)
  • -r : 파일의 정렬 순서를 거꾸로 표시한다. (reverse)
  • -t : 파일 작성 시간순으로 (내림차순) 표시한다.

🚩 cat

파일의 내용을 간단하게 출력하거나, 두 개 이상의 파일을 생성하거나 병합할 때 사용한다. cat 명령어 다음에 파일 이름을 함께 사용하면 해당 파일 내용을 보여준다.

cat 파일명

🔹 cat 명령 모음

  • cat file(s) > Newfile : file(s)를 차례로 연결해서 새로운 파일인 Newfile을 만든다.
  • cat file1 >> file2 : file1의 내용을 file2 내용 끝에 연결한다.
profile
It's time to fire on up !

0개의 댓글