r/HowToHack • u/inoobie_am • 8h ago
I'm confused with this overthewire bandit level.
In overthewire level 16-17, I used nmap to list all the open ports and check which on was running a service by connect to it. When I connected to the only possible port, its gave an ouput and the the end it said "Read Block R" and was waiting for my input so I gave it the current password, but noting was returned and instead a KEYUPDATE message came through and I was allowed to give my input again. And each time I entered the password it returned the same KEYUPDATE message.
Then when I entered something deliberately wrong, it said "Wrong!" and ended the connection.
But the main confusion began when I saw write up about this challenge and all of them were pasting the password and it returned a ssh key.
So, I went over to chatgpt and it also initially told me to perform the steps that I did, and I again did it so I could paste the actual outputs.
Then chatgpt told me to pipe the password using cat, like this:
cat /etc/bandit_pass/bandit16 | openssl s_client -quiet -connect localhost:31790
and it worked.
It also worked when I executed this: openssl s_client -quiet -connect localhost:31790, and paste the password.
But doesnt work when I remove the -quite flag.
I dont understand.
Can you guys help out? Also, is there an easy to read version of the nmap and nc commands, I find their man pages a bit too dense and their tldr pages feel inadequate,