OverTheWire Bandit: Level 0 - SSH Fundamentals
1. Context
We need an entry point to begin the OverTheWire Bandit series, a wargame focused on teaching security concepts. Our goal is to connect to a specific server address (bandit.labs.overthewire.org) using a designated username (bandit0) and a non-standard service point (port 2220). This level tests the absolute foundation of Linux system administration: remote access.
2. Technical Logic
The core challenge here is manipulating the default behavior of the SSH (Secure Shell) protocol.
- Default Port (22): Unless instructed otherwise, SSH clients initiate a handshake by sending a
SYNpacket to TCP port 22 of the target server. This is defined in the Well-Known Ports (0-1023) standard. - Why a Different Port? System administrators often change the default port for two primary reasons:
- Security through Obscurity: To reduce log noise from automated bot attacks and script scanners targeting port 22 (this does not provide hard security, just obfuscation).
- Multiple Services: To run distinct SSH daemons on the same IP address (e.g., one for actual administration, one for this game server).
In this scenario, we require a parametric structure that commands the client: “Do not knock on the default door; knock on door number 2220.”
3. Execution
To initiate the connection, we combine the -p (port) flag with the user and host information.
# Syntax: ssh <user>@<host> -p <port_number>
ssh bandit0@bandit.labs.overthewire.org -p 2220
Upon execution, the system will prompt for authentication. For this level, the password is the same as the username: bandit0
4. Result
Following successful authentication, we gain access to the remote server’s Command Line Interface (CLI). We are no longer operating on our local terminal but on the game server’s operating system.
bandit0@bandit:~$
This prompt signifies our authorization on the server and our current location (home directory). The first phase is complete; we can now begin exploring the files within the system.