Network Topology
Status: baseline — all services reachable, no active attack.
SSHGUARD: NOT INSTALLED FIREWALL: DEFAULT
Objectives
Task Directions — Read Before You Type
Complete these in order. Each step names the terminal tab to use and explains the tool and flags you'll need — but not the finished command. Work out the exact syntax yourself; if you get stuck, the 💡 Hint button gives you a conceptual nudge on the first click and reveals the exact command to type on the second.
Every control in this lab — ncrack, sshguard, iptables, hping3, pfctl — is a real tool with its own flags, and those flags are not arbitrary: each one encodes a decision an analyst has to make (which account to target, which port to probe, whether to wait for a reply, which table to update). Reading a command someone else wrote and typing it back rarely sticks; reasoning out why a flag belongs in a command does. So as you move through the four objectives above — recon, brute force, contain with sshguard, then pivot to a DoS flood and mitigate it at the firewall — read each step's explanation fully before you touch a terminal, sketch out what you think the command should look like, and only reach for a hint once you've made a real attempt.
- KALI Scan the target. Switch to the kali@attacker tab. Before attacking any service, confirm it's actually listening and identify what's running on it — attacking blind risks the wrong technique for the wrong version.
nmapcan restrict a scan to a single port instead of sweeping all 65,535, and in the same pass it can probe that port for a service banner and version string rather than just reporting it open or closed. You'll need the flag that narrows the scan to port 22 (SSH) and the flag that turns on version detection, plus the target's DMZ address from the briefing above. - KALI Brute force SSH. Still on the kali@attacker tab, launch a credential attack against SSH with
ncrack. Ncrack needs three pieces of information: which account to target (a lowercase flag for the username), where to pull candidate passwords from (an uppercase flag pointing at a wordlist file — this lab supplies one namedwordlist.txt), and which service to attack, expressed as aprotocol://hostpair rather than a bare IP. With no defenses running yet, a correctly-formed attempt should recover a working credential pair. - UBUNTUSRV Review the evidence. Switch to the sysadmin@ubuntusrv tab.
sshdlogs every authentication attempt — success or failure — to the system auth log. You don't need to page through the entire file, only its most recent activity, so use the command that prints just the last handful of lines of a file rather than the whole thing. Look for a burst of failed logins from 203.0.113.2 immediately followed by a success — the signature of a brute-force attack. - UBUNTUSRV Deploy the defense. On the same tab, bring in
sshguard— the intrusion-prevention service that tailsauth.logand, once a source crosses a failure threshold, pushes a live block rule into the host firewall. Installing a package is one command; getting a service running is a second, separate step. Rather than issuing that second step as two commands (enable it for next boot, then start it now), onesystemctlsubcommand does both at once — think about which one. - KALI Retry the attack. Back on the kali@attacker tab, this isn't a new command to work out — repeat the exact ncrack attempt from step 2, unchanged, as a controlled retest. Compare what comes back now that sshguard is watching the log.
- UBUNTUSRV Confirm the block. sshguard doesn't just log the attempt — it inserts a live rule into
iptables. One flag lists the currently loaded rule chains; another keeps addresses shown as raw numbers instead of resolving reverse DNS for each one, which is both faster and avoids leaking lookups. Pipe that listing throughgrepfor the chain name sshguard creates so you're not scanning the whole ruleset by eye. - KALI Shift tactics to DoS. Credential attacks are now blocked, so the attacker pivots from confidentiality to availability.
hping3crafts and sends raw TCP packets at high volume. You'll need a flag that marks each packet as the start of a new handshake (a SYN flag), a flag that selects the destination port to aim at (80, since that's what UbuntuSRV is serving), and a flag that tells hping3 to fire as fast as possible without waiting for replies. - WINOS Observe the impact. Switch to the WinOS tab. No special flags are needed here — a plain reachability test against 172.16.1.10 will show you exactly what a legitimate user experiences while the flood is saturating the target.
- PFSENSE Block it at the edge. Switch to the pfSense shell tab.
pfctlcan insert an address into a named, persistent table that the ruleset already references — the block takes effect immediately, with no rule reload needed. Work out how the table name (blocklist) and the attacker's address (203.0.113.2) are supplied to the "add" action. - PFSENSE Verify the block. On the same tab, confirm the address actually landed in the table —
pfctlcan list a table's current contents. (You could alternatively inspect live connection states and filter for the attacker's address, to confirm nothing new is being permitted.) - Finish with the Knowledge Check that unlocks below once every step above is complete, then click Grade My Work.