HackBlue

Labs / SSH brute force

Count the failures, then find the success

The bastion host logged a burst of failed SSH passwords. Count them by source, find the noisiest address, and check whether any of its guesses worked.

  • Terminal mission
  • Beginner
  • 3 objectives
  • 0 of 3 solved

What you’re looking at

The bastion host logged a burst of failed SSH passwords. Count them by source, find the noisiest address, and check whether any of its guesses worked.

Your goal: Prove which address guessed passwords on the bastion host and whether it got in.

Briefing
the story: what happened and what evidence you were handed.
Terminal
the dark box. It is a pretend Linux shell that runs in your browser. Type a command and press Enter. Nothing you type touches a real system.
Walkthrough
the numbered path. Each step says what to type and what you should see. Hints open one at a time.
Answer boxes
under each question step. Type what you found and press Check.

Words you will meet

SSH
Secure Shell, the encrypted remote login used on Linux servers
IP
Internet Protocol address, the number that identifies a machine on a network

Start with step 1 in the walkthrough. Every step says what to do and what you should see. The whole thing takes about 2 min to talk through.

Briefing

The bastion is reachable from the internet on port 22. Overnight its auth.log filled with failed passwords from a handful of addresses.

A failed-password line ends with "from <ip> port <port> ssh2", so the address is always the fourth field from the end. That makes it easy to pull out with awk and count.

analyst@bastion

bastion · SSH brute force

Type help for the command list and objectives for your tasks. Everything runs in this browser.

Up and down arrows walk your history. Ctrl+L clears the screen. Try help, ls, and objectives.

The whole walkthrough

Every step in order, written to be read aloud: 281 words, about 2 min. It gives away every answer, so try the steps first.