[ Bandit Level 6 → Level 7 문제 리뷰 ]

Bandit Level 6 → Level 7
레벨 목표
다음 레벨을 위한 password는 서버 어딘가에 저장되어 있으며 다음의 특징들을 갖고 있습니다.
user bandit7에게 소유됨
bandit6 그룹에 소유됨
사이즈는 33byte임
이 문제를 풀기 위해 필요할 수도 있는 명령어들
ls, cd, cat, file, du, find, grep
문제 해설
(1) find를 사용해 password 찾기

입력한 명령어
find / -user bandit7 -group bandit6 -size 33c 을 살펴보자.
-user bandit7 : bandit7 유저에게 속한 파일 검색
-group bandit6 : bandit6에 속한 파일 검색
-size 33c : 사이즈가 33byte인 파일 검색
명령어를 입력하면 이런 식으로 Permission denied 라는 허가 거부 문구가 쭉 뜰 것이다.
이를 내리다보면

빨간 줄이 쳐진 곳처럼 password가 있는 곳의 경로를 알 수 있다.
(2) cat으로 password 확인하기

find 명령어를 이용해 찾은 경로를 cat 명령어를 이용해 파일의 내용을 출력했다.
따라서 레벨 7을 위한 password는
HKBPTKQnIay4Fw76bEy8PVxKEDQRKTzs
이다.
Level 7 → Level 8 의 해설 ⤵
'OS > LINUX' 카테고리의 다른 글
OverTheWire: Level Goal: Bandit Level 8 → Level 9 (0) | 2022.05.02 |
---|---|
OverTheWire: Level Goal: Bandit Level 7 → Level 8 (0) | 2022.05.02 |
OverTheWire: Level Goal: Bandit Level 5 → Level 6 (0) | 2022.04.10 |
OverTheWire: Level Goal: Bandit Level 4 → Level 5 (0) | 2022.04.10 |
OverTheWire: Level Goal: Bandit Level 3 → Level 4 (0) | 2022.04.10 |