ssh bandit16@bandit.labs.overthewire.org -p 2220
##JQttfApK4SeyHwDlI9SXGR50qclOAil1
The credentials for the next level can be retrieved by submitting the password of the current level to a port on localhost in the range 31000 to 32000. First find out which of these ports have a server listening on them. Then find out which of those speak SSL and which don’t. There is only 1 server that will give the next credentials, the others will simply send back to you whatever you send to it.
현재 수준의 암호를 31000 - 32000 범위의 localhost 포트에 제출하여 다음 수준에 대한 자격 증명을 검색할 수 있습니다. 먼저 서버에서 수신 대기 중인 포트를 확인하십시오. 그런 다음 SSL을 사용하는 사람과 사용하지 않는 사람을 찾아보십시오. 다음 자격 증명을 제공하는 서버는 하나뿐이며, 다른 서버는 사용자가 보내는 모든 것을 다시 사용자에게 보냅니다.
bandit16@bandit:~$ nmap -p 31000-32000 localhost
31046/tcp open unknown
31518/tcp open unknown
31691/tcp open unknown
31790/tcp open unknown
31960/tcp open unknown
#/tmp 폴더에서 내이름으로 된 폴더 만들고 실행
bandit16@bandit:/tmp/jiheon$ openssl s_client -connect 127.0.0.1:31790
#JQttfApK4SeyHwDlI9SXGR50qclOAil1
#복사해서 key만들어줌
bandit16@bandit:/tmp/jiheon$ssh -i sshkey.private bandit17@localhost -p 2220
0@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# 이후 에러메세지들을 보면, 너무 열려있다고 나온다. chmod로 권한변경해주면 bandit16계정으로 접속됨
bandit17@bandit:~$ cat /etc/bandit_pass/bandit17
#VwOSWtCA7lRKkTfbr2IDh6awj9RNZM5e