본문 바로가기

Wargame/Bandit

[ Docker ] Bandit Wargame 만들기 - 10번 문제 ( 12 / 33 )

1. Bandit10 목표

The password for the next level is stored in the file data.txt, which contains base64 encoded data

Commands you may need to solve this level
grep, sort, uniq, strings, base64, tr, tar, gzip, bzip2, xxd

 

2. Bandit10 구현

# 비밀번호 root 입력 접속
ssh -oStrictHostKeyChecking=no root@localhost -p 2220

chown -R root:root /home/bandit10/.[!.]*

echo VGhlIHBhc3N3b3JkIGlzIElGdWt3S0dzRlc4TU9xM0lSRnFyeEUxaHhUTkViVVBSCg== > /home/bandit10/data.txt

chmod 640 /home/bandit10/data.txt

useradd bandit11 && echo -e "FGUW5ilLVJrxX9kMYMmlN4MgbpfMiqey\nFGUW5ilLVJrxX9kMYMmlN4MgbpfMiqey" | passwd bandit11

chown bandit11:bandit10 /home/bandit10/data.txt

chmod 755 /home/bandit11

chown root:root /home/bandit11

 

 

3. Bandit10 문제풀의

# bandit10 로 설정한 패스워드를 입력하여 접속한다.
# FGUW5ilLVJrxX9kMYMmlN4MgbpfMiqey
ssh bandit10@localhost -p 2220

ls -la

base64 -d data.txt | awk '{ print $4 }'