LIVE DEMO · simulated alerts
Network IDS / IPS

Snort logo Snort

Intrusion Detection and Prevention System: watching every packet, so you don't have to.

The basics

What is Snort?


Snort is an open-source intrusion detection and prevention system (IDPS) created by Martin Roesch in 1998. It is designed to detect and prevent network attacks by analyzing network traffic in real-time.

Snort uses signature-based detection methods to identify known threats, anomalies, and suspicious activities. Each packet is decoded, normalised and compared against a library of rules, and anything that matches raises an alert or, in inline mode, is dropped before it reaches its target.

1998first released
GPLv2open source
Snort 3multi-threaded rewrite
Ciscomaintained by Talos
One engine, three jobs

Snort's Three Modes

Sniffer

Reads packets off the wire and prints them to the screen, like a lightweight tcpdump.

snort -v -i eth0

Packet Logger

Records traffic to disk in pcap format for later forensic analysis.

snort -l /var/log/snort -i eth0

NIDS / Inline IPS

Matches traffic against rules and alerts, or inline in IPS mode, drops malicious packets.

snort -c snort.conf -i eth0 -A console
Hover over each part

Anatomy of a Snort Rule

Every rule has a header (who and where) and options (what to look for). This one flags SSH brute-force attempts.

alert tcp $EXTERNAL_NET any -> $HOME_NET 22 (msg:"SSH brute force attempt"; flow:to_server,established; detection_filter:track by_src, count 5, seconds 60; classtype:attempted-admin; sid:1000002; rev:1;)
ActionWhat to do on a match: alert, log, pass, or drop / reject when running inline.
Protocoltcp, udp, icmp or ip.
SourceAddress and port the traffic comes from. Variables like $EXTERNAL_NET are set in snort.conf.
Direction-> one way, or <> for both directions.
DestinationProtected network and port, here SSH on 22.
OptionsThe message, flow state, a threshold of 5 attempts in 60 seconds, plus the rule ID (sid) and revision.
Inside the engine

A Packet's Journey Through Snort

Capture

Packets are read from the interface by the DAQ layer.

Decode

Ethernet, IP and TCP/UDP headers are parsed.

Preprocess

Streams reassembled, fragments rebuilt, HTTP normalised. Snort 3 calls these "inspectors".

Detect

The detection engine matches against thousands of rules.

Alert / Drop

Alerts are logged or sent to a SIEM, and inline mode drops the packet.

From the lab

Snort in Action

Snort dashboard screenshot
Snort Dashboard

Real-time monitoring and alert visualization.

Snort alerts screenshot
Alert Management

View and manage intrusion alerts.

Snort rules screenshot
Rule Configuration

Configure and customize detection rules.

Snort Architecture

How the components fit together, step by step.

Learn more
Intrusion Detection

Real-time traffic analysis and threat detection.

Threat Prevention

Proactive blocking of malicious network activity.

Network Monitoring

Comprehensive visibility into network traffic.

Disclaimer

Snort is a trademark of Cisco. This website is an independent educational resource and is not affiliated with, sponsored by, or endorsed by Cisco. Any Snort trademarks, logos, and screenshots are used solely for identification and educational purposes.

Official Website: www.snort.org