>SECURING 0%

Network Defense Lab

Advanced
Lab Progress
1

Network Traffic Analysis

traffic-analysis

2

Intrusion Detection

intrusion-detection

3

Firewall Configuration

firewall-config

Overall Progress
0 / 3 completed
1Network Traffic Analysis
ACTIVE

Challenge Description

Learn to analyze network packets to identify suspicious activities and potential security threats.

Example Code


# Using tcpdump to capture suspicious traffic:
tcpdump -i eth0 -n "host 192.168.1.100 and port 22" -w capture.pcap

# Reading captured packets with Wireshark filter:
tcp.flags.syn == 1 and tcp.flags.ack == 0

# Python script to analyze packets with Scapy:
from scapy.all import *

def analyze_packet(packet):
    if TCP in packet and packet[TCP].flags & 2:  # SYN packets
        print(f"SYN packet: {packet[IP].src} -> {packet[IP].dst}")
        
sniff(filter="tcp", prn=analyze_packet)

Enter Flag to Complete Challenge