Bandit Level 14-15@overthewire.org
Description
The password for the next level can be retrieved by submitting the password of the current level to port 30000 on localhost.
Current level credentials
Key | Value |
---|---|
Server-name: | bandit.labs.overthewire.org |
Port: | 2220 |
User: | 14 |
Password: | fGrHPx402xGC7U7rXKDaxiWFTOiF0ENq |
Current level login
Log in
1 |
|
sshpass
before using it. The ssh
command can also be used on its own. If so, copy-paste the password when requested.
Hints And Solution
Hint(s)
Learn how to connect to a service from the command line.
Try nc
.
If you don't want to copy and paste, brush up on your knowledge of piping.
Solution
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
|
- Checking out the service
- Using
telnet
and copy/paste the password - The output of
cat
is sent tonc
, which is connecting to the service. We don't need to copy/paste anything.
The description states that a service should be available on port 30000. We can access the service via telnet
or nc
. We get the password for the new level by entering the current level password after we establish a connection. If you copy/paste the password, telnet
is fine but I prefer nc
because I can pipe the output of cat
to nc
using pipes. I was unable to pipe using telnet
. nc
can also function as a service/listener, but more on that in later lessons.
One-liner
Bash one-liners can reduce workload, automate something quickly and put the power of ultimate system control in your hands.
https://linuxconfig.org/linux-complex-bash-one-liner-examples
1 2 3 4 5 6 7 |
|
Here are some one-liner examples, with cat
and echo
and sed
, head
and tail
. Try out and replace echo
with cat
, sed
with head
and tail
. There are numerous possible combinations.
Resources
Resources
Bandit-level15@overthewire
How to remove empty/blank lines from a file in Unix (including spaces) @serverfault.com?
How do I use Head and Tail to print specific lines of a file @stackoverflow.com
Localhost on Wikipedia
Ports @howstuffworks.com
Port (computer networking) on Wikipedia
How the Internet works in 5 minutes (YouTube) (Not completely accurate, but good enough for beginners)
IP Addresses @howstuffworks.com
IP Address on Wikipedia
Comments
Any feedback and suggestions are welcome. This website was created using mkdocs and the material plugin. If you want, you can make a pull request. The repository is https://github.com/dabonzo/itsec_hp