Your Network Intrusion Detection System (NIDS) flagged suspicious port scanning activity targeting web server (web-prod-03) at 18:45 UTC on November 28, 2025. Firewall logs show thousands of connection attempts from an external IP scanning multiple ports. Shortly after, fail2ban triggered multiple bans. Your mission is to analyze firewall logs, fail2ban actions, and network patterns to identify the attack type and scope.
Network attacks begin with reconnaissance - attackers scan targets to identify open ports, services, and potential vulnerabilities. Firewalls and intrusion detection systems are the first line of defense against these attacks.
TCP SYN Scan: Sends SYN packets without completing handshake (stealthy, most common)
TCP Connect Scan: Completes full 3-way handshake (noisier, easier to detect)
UDP Scan: Probes UDP ports (slower, used for DNS, SNMP discovery)
FIN/NULL/Xmas Scans: Stealth scans using unusual flag combinations
Purpose: Frontend for iptables, default firewall on Ubuntu/Debian
Log Format: [UFW BLOCK] IN=eth0 SRC=attacker_ip DST=server_ip PROTO=TCP DPT=port
What to Look For: Repeated blocks from same IP, sequential port scanning, unusual protocols
Purpose: Monitors logs and automatically bans IPs showing malicious behavior
How It Works: Scans auth logs, detects failed login patterns, creates iptables rules to block
Common Jails: sshd, nginx-http-auth, apache-auth, recidive (repeat offenders)
💡 Defense Tip: Implement rate limiting, use fail2ban for automated blocking, enable SYN cookies for DDoS protection, and configure geographic IP blocking for non-essential regions.
Run bash commands to analyze the logs. Available: cat, grep, wc, awk, sort, uniq, clear, help
This section auto-fills once all tasks are completed correctly.
Complete all tasks to reveal the attack chain.
The attack was detected and blocked because:
✅ UFW firewall blocked non-whitelisted ports
✅ Fail2ban automatically banned IP after SSH brute-force attempts
✅ Port scan pattern was logged for forensic analysis
✅ No services exposed on non-standard ports
✅ SSH configured with strong authentication (likely key-based)
Phase 1: Reconnaissance - Port scan to identify services (18:45)
Phase 2: Targeting - Focus on SSH service (port 22)
Phase 3: Exploitation Attempt - SSH brute-force (failed, banned)
Result: Attack stopped by automated defenses before compromise