Understanding & Analyzing Firewall Data for Security Monitoring
While the Firewall Builder teaches you to create defensive rules, as a SOC analyst you'll spend more time reading and interpreting firewall logs to detect threats.
Network Admin Task
SOC Analyst Task
This module builds on firewall fundamentals. If you haven't learned to create rules yet, start with the Shield House module.
Firewalls log in different formats depending on the product. SOC analysts must be comfortable with all of them.
Jan 4 14:32:15 firewall kernel: DROP IN=eth0 OUT= MAC=00:0c:29:1a:2b:3c:00:50:56:c0:00:08:08:00 SRC=203.0.113.50 DST=192.168.1.10 LEN=60 TOS=0x00 PREC=0x00 TTL=45 ID=54321 DF PROTO=TCP SPT=45678 DPT=22 WINDOW=65535 RES=0x00 SYN URGP=0
Jan 4 14:32:15 server kernel: [UFW BLOCK] IN=eth0 OUT= MAC=00:0c:29:1a:2b:3c SRC=203.0.113.50 DST=192.168.1.10 LEN=60 TOS=0x00 PREC=0x00 TTL=45 ID=54321 DF PROTO=TCP SPT=45678 DPT=22 WINDOW=65535 RES=0x00 SYN URGP=0
{
"timestamp": "2024-01-04T14:32:15.000Z",
"action": "DROP",
"src_ip": "203.0.113.50",
"dst_ip": "192.168.1.10",
"protocol": "TCP",
"src_port": 45678,
"dst_port": 22,
"interface": "eth0",
"flags": ["SYN"],
"rule_id": "INPUT_DROP_SSH"
}
CEF:0|Linux|iptables|1.0|DROP|SSH Connection Attempt|7| src=203.0.113.50 spt=45678 dst=192.168.1.10 dpt=22 proto=TCP deviceInboundInterface=eth0 act=DROP
| Field | What to Look For | Example |
|---|---|---|
SRC |
Source IP - Who's attacking? External or internal? | 203.0.113.50 (external) |
DST |
Destination - What asset are they targeting? | 192.168.1.10 (web server) |
DPT |
Destination port - What service are they probing? | 22 (SSH), 3389 (RDP), 445 (SMB) |
PROTO |
Protocol - TCP scans vs UDP floods vs ICMP recon | TCP, UDP, ICMP |
Action |
DROP = silently blocked, REJECT = blocked with response | DROP, ACCEPT, REJECT |
Flags |
TCP flags reveal scan types (SYN scan, NULL scan, etc.) | SYN, FIN, RST, ACK |
Practice analyzing firewall logs like a SOC analyst. Filter by action type to focus on specific events.
Collect logs from all firewalls into SIEM
Convert different formats to common schema
Match events across multiple sources
Identify patterns and anomalies
Create rules for automated detection
Block IPs, tune rules, document findings
# Count dropped packets by source IP grep "DROP" /var/log/ufw.log | awk '{print $12}' | sort | uniq -c | sort -rn | head -20 # Find all SSH attempts (port 22) grep "DPT=22" /var/log/kern.log | wc -l # Find potential port scans (many ports from same IP) grep "DROP" /var/log/ufw.log | awk '{print $12}' | sort | uniq -c | awk '$1 > 100' # View real-time firewall logs tail -f /var/log/ufw.log | grep --color "DROP\|BLOCK" # Extract unique destination ports being probed grep "DROP" /var/log/ufw.log | grep -oP 'DPT=\K\d+' | sort -n | uniq -c | sort -rn
Learn to recognize these patterns when reviewing firewall data.
Single source IP hitting many different ports in short time frame.
Detection: 10+ ports from same IP in 60 seconds
MediumRepeated connection attempts to port 22 from same source.
Detection: 20+ SSH attempts in 5 minutes
HighMassive SYN packets without completing handshake (DoS).
Detection: High SYN rate with few ESTABLISHED
HighMultiple IPs all hitting the same sensitive port.
Detection: Many sources, one destination port
MediumOutbound connection to unusual ports (4444, 5555).
Detection: Internal → External on non-standard ports
HighPing sweep across subnet to discover live hosts.
Detection: Sequential ICMP to IP range
Low| Pattern Detected | Immediate Response | Long-term Action |
|---|---|---|
| Port Scan | Log for intelligence, monitor for follow-up | Add to threat intel, consider geo-blocking |
| Brute Force | Temporary IP block (fail2ban) | Implement rate limiting, require MFA |
| SYN Flood | Enable SYN cookies, contact upstream | DDoS mitigation service, capacity planning |
| Targeted Probe | Verify service not exposed, alert admin | Review firewall rules, minimize exposure |
| Reverse Shell | ISOLATE host immediately, preserve evidence | Full IR process, endpoint remediation |
Test your ability to interpret firewall data like a SOC analyst.