반응형
https://overthewire.org/wargames/bandit/bandit7.html
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
풀이
bandit6 서버 어딘가에 flag 파일이 존재한다. 제시된 세가지 조건을 통해서 찾으면 된다.
접속 후 bandit6 디렉토리를 봤을 때 아무것도 존재하지 않는다. 그래서 제일 상위 디렉토리로 이동하여 flag파일을 찾을 것 이다.
제일 상위 디렉토리로 가서 find 커맨드 user와 group 옵션을 통해 검색을 해봤다.
근데, Permission denied 때문에 파일을 찾기 쉽지 않다. 해당 문구를 제외할 수 있는 방법을 찾아본다.
표준 에러를 출력하지 않는 방법이 있는 것을 존재한다.
커맨드 제일 뒤에 2> /dev/null 을 추가하면 된다.
그러면, 조건에 맞는 파일 하나가 나온다. 해당 파일을 읽으면 플래그를 획득할 수 있다.
더보기
z7WtoNQU2XfjmMtWA8u5rN4vzqu4v99S
반응형