Wargame/Bandit
[ Docker ] Bandit Wargame 만들기 - 3번 문제 ( 5 / 33 )
loopinger
2024. 6. 4. 18:27
1. Bandit3 목표
The password for the next level is stored in a hidden file in the inhere directory.
Commands you may need to solve this level
ls , cd , cat , file , du , find
2. Bandit3 구현
# 비밀번호 root 입력 접속
ssh -oStrictHostKeyChecking=no root@localhost -p 2220
chown -R root:root /home/bandit3/.[!.]*
mkdir /home/bandit3/inhere
echo pIwrPrtPN36QITSp3EQaw936yaFoFgAB > /home/bandit3/inhere/.hidden
useradd bandit4 && echo -e "pIwrPrtPN36QITSp3EQaw936yaFoFgAB\npIwrPrtPN36QITSp3EQaw936yaFoFgAB" | passwd bandit4
chmod 640 /home/bandit3/inhere/.hidden
chown bandit4:bandit3 /home/bandit3/inhere/.hidden
chmod 755 /home/bandit4
chown root:root /home/bandit4
exit
3. Bandit3 문제풀의
# bandit3 로 설정한 패스워드를 입력하여 접속한다.
# UmHadQclWmgdLOKQ3YNgjWxGoRMb5luK
ssh bandit3@localhost -p 2220
ls -la
ls -la ./inhere
cat ./inhere/.hidden