Snort
Snort is a widely used open-source intrusion detection and prevention system that inspects traffic with rule-based signatures.
Legal & ethical use. Use this tool only on systems, networks and data that you own or have explicit written permission to test. Unauthorised access or scanning can break computer-misuse laws (for example Pakistan's Prevention of Electronic Crimes Act, 2016, and equivalents elsewhere). Practise in your own lab or in authorised environments such as CTFs.
What it is used for
- Learn how signature-based detection rules are written
- Monitor a lab network segment for known attack patterns
Key features
- Rule-based detection
- Packet logging and inline mode
- Community and registered rule sets
Installation
See the Snort 3 documentation for install instructions for your platform.
Beginner usage guide
Start in IDS mode against a pcap, read the alerts and then study how each rule matched.
Example commands
Run these only against your own lab or authorised targets. Placeholder addresses such as 192.0.2.x are documentation ranges.
Read a pcap with a configuration file
snort -c /etc/snort/snort.lua -r capture.pcap-c selects the configuration (Snort 3 uses Lua) and -r reads a capture file; paths vary by installation.
References
Source verification
Last reviewed: 2026-10-27
Links checked over HTTP: 2026-10-27 07:51 UTC — official: 200, docs: 200, repo: 200
Commands were written from the official documentation and have not been executed on this site; test them in your lab.
