워게임/bandit

[bandit] -> level 2 cat dashed file

hy25u 2024. 11. 13. 23:31

Level Goal

The password for the next level is stored in a file called - located in the home directory

Commands you may need to solve this level

  • ls
  • cd
  • cat

Solution

혹시라도 다음 레벨로 못 넘어가시는 분들을 위해...

일단 이전 레벨에서 exit을 통해 나간 후에 ssh bandit1@bandit.labs.overthewire.org -p 2220를 통해 level1 로그인을 해서 level2 문제 푸시고 password는 이전에 알아낸 패스워드를 입력하면 됩니다!!!


문제에서는 -라는 파일 안에 패스워드가 있다고 알려 줬으니 ls로 확인해 보면 - file이 있는 것을 볼 수 있다.

일반 문자열이 아니기 때문에 cat ./-와 같이 명령어를 입력해 주면 패스워드를 얻을 수 있다. 

▶263JGJPfgU6LtdEvgfWU1XP5yac29mFx