Salus
Staff sign in
Practice · untimed

Practice lab

Type real Linux commands in the terminal: read an auth log, verify installer hashes and fix file permissions. Lab D scans your own machine, so it stays a download.

Step 2. Lab A: find the brute force

Work in ~/secplus-lab/log and answer:

  1. Which IP made the brute-force attempts?
  2. Which account did it log in to?
  3. How many Failed password entries came from that IP?
cd ~/secplus-lab/log
head auth.log
grep -c 'Failed password' auth.log
grep 'Failed password' auth.log | awk '{print $(NF-3)}' | sort | uniq -c | sort -nr
grep 'Accepted' auth.log
grep 'Invalid user' auth.log | awk '{print $8}' | sort | uniq -c | sort -nr

Ask yourself why grep '<attacker IP>' auth.log | wc -l gives a bigger number than your answer to question 3.

Terminal

Building the lab…
Independent practice material. Not affiliated with or endorsed by CompTIA.