Level Goal
The password for the next level is stored somewhere on the server and has all of the following properties:
owned by user bandit7
owned by group bandit6
33 bytes in size
Commands you may need to solve this level
ls, cd, cat, file, du, find, grep
다음 레벨로 가는 패스워드는 서버 어딘가에 다음과 같은 속성을 가진 파일 내에 존재한다고 한다.
find / -user bandit7 -group bandit6 -size 33c 2>/dev/null
find 명령어를 통해 루트(/
) 디렉토리에서부터 위 속성을 가지고 있는 파일을 찾는다. 명령어 끝에 2>/dev/null
은 표준 에러 출력을 하지 않는다는 것을 의미한다. 파일을 찾고 cat
명령어를 사용하여 파일 내용을 출력하면 다음 레벨로 가는 패스워드를 얻을 수 있다.
- find
find 명령어는 말 그대로 파일 및 디렉토리를 검색할 때 사용하는 명령어다.