Post

Overthewire-Bandit Level 18 - SSH + ls and + cat

image


Ref:


Bandit Level 18

Level Goal

The password for the next level is stored in a file readme in the homedirectory. Unfortunately, someone has modified .bashrc to log you out when you log in with SSH.

Commands you may need to solve this level ssh, ls, cat

Note

Common SSH expression allows remote execution of commands by adding the commands afterward

SSH + ls

1
2
3
ssh bandit18@bandit.labs.overthewire.org -p 2220 ls

x2gLTTjFwMOhQ8oWNbMN362QKxfRqGlO

Output

1
readme

SSH + cat

1
ssh bandit18@bandit.labs.overthewire.org -p 2220 cat readme

x2gLTTjFwMOhQ8oWNbMN362QKxfRqGlO

Output

1
2
3
4
5
6
7
8
9
10
11
12
13
14
ssh bandit18@bandit.labs.overthewire.org -p 2220 cat readme
                         _                     _ _ _
                        | |__   __ _ _ __   __| (_) |_
                        | '_ \ / _` | '_ \ / _` | | __|
                        | |_) | (_| | | | | (_| | | |_
                        |_.__/ \__,_|_| |_|\__,_|_|\__|


                      This is an OverTheWire game server.
            More information on http://www.overthewire.org/wargames

backend: gibson-1
bandit18@bandit.labs.overthewire.org's password:
cGWpMaKXVwDUNgPAVJbWYuGHVn9zl3j8
This post is licensed under CC BY 4.0 by the author.