Bandit Level 26 → Level 27
문제
https://overthewire.org/wargames/bandit/bandit27.html
목표
다음 레벨의 패스워드를 찾는다.
풀이
저번 레벨처럼 화면의 크기를 줄여 bandit26
으로 로그인한다.
1
2
3
4
5
6
7
_ _ _ _ ___
__
| | | (_) | |__ \
/ /
| |__ __ _ _ __ __| |_| |_ )
/ /_
--More--(50%)
V키를 눌러 vi 에디터를 실행하고 :set shell=/bin/bash
명령으로 쉘을 변경해주고 :shell
명령으로 쉘을 실행해준다.
1
2
3
4
5
6
7
8
9
10
11
_ _ _ _ ___ __
| | | (_) | |__ \ / /
| |__ __ _ _ __ __| |_| |_ ) / /_
| '_ \ / _` | '_ \ / _` | | __| / / '_ \
| |_) | (_| | | | | (_| | | |_ / /| (_) |
|_.__/ \__,_|_| |_|\__,_|_|\__|____\___/
~
~
~
~
:set shell=/bin/bash
1
2
3
4
5
6
7
8
9
10
11
12
_ _ _ _ ___ __
| | | (_) | |__ \ / /
| |__ __ _ _ __ __| |_| |_ ) / /_
| '_ \ / _` | '_ \ / _` | | __| / / '_ \
| |_) | (_| | | | | (_| | | |_ / /| (_) |
|_.__/ \__,_|_| |_|\__,_|_|\__|____\___/
~
~
~
~
:shell
bandit26@bandit:~$
홈 디렉토리를 확인해보면 bandit27-do
이 있다.
1
2
bandit26@bandit:~$ ls
bandit27-do text.txt
bandit27
의 권한으로 패스워드 파일을 확인한다.
1
2
bandit26@bandit:~$ ./bandit27-do cat /etc/bandit_pass/bandit27
YnQpBuifNMas1hcUFk70ZmqkhUU2EuaS
Password : YnQpBuifNMas1hcUFk70ZmqkhUU2EuaS
배운 것
- vi 에디터에서 쉘을 변경할 수 있다.
This post is licensed under CC BY 4.0 by the author.