79/91
Sign inSign up free

722. Who Is Hammering SSH?

medium 20 XP ~8 minHands-on lab

The security team exported yesterday's authentication log to /srv/lab/auth.log. It mixes successful logins, sudo use and lots of failed SSH attempts, some for real users and some for users that don't exist.

Task

  • Write the 5 source addresses with the most failed SSH password attempts to /home/student/offenders.txt, one per line, as COUNT ADDRESS (for example 42 203.0.113.9), highest count first. Count both "Failed password" lines and attempts for invalid users.
  • Block each of those addresses from SSH in /etc/hosts.deny with one sshd: <address> line each. Keep the file's existing lines.

About this machine

Ubuntu 24.04 with no internet access. You are student with passwordless sudo. The grader checks the final state of the machine, not the commands you typed. Values like names and ports are generated for you.

Teaching or writing about this? Embed this lab on your page

TerminalNot started

Your machine is ready to start

A fresh, isolated Ubuntu machine boots in a few seconds with the task already set up.

No account needed: 3 of 3 free tries left. Guest machines last 30 minutes.

722. Who Is Hammering SSH?: Linux hands-on lab · BrokenCluster