IncidentResponsev2

4.09.1 Configure Snort Rules

Task

Configure Snort IDS Rules on Security Onion to detect and alert on network-based malicious activity.


Conditions

Given access to a deployed Security Onion instance running Snort as its detection engine.


Standards


End State

Snort rules are correctly configured, loaded, and active. Security Onion is generating alerts based on rule matches.


Notes


Manual Steps

Step 1: Access Security Onion

ssh analyst@securityonion.local

Step 2: Locate Local Rules File

cd /opt/so/rules/nids/
ls -al

Operator Note: Always document changes to local.rules. Use comments (#) to record date and purpose.


Step 3: Add Custom Rule

sudo nano local.rules
alert tcp any any -> any 80 (msg:"Suspicious HTTP domain access detected"; content:"badactor.com"; http_host; sid:1000001; rev:1;)

Operator Note: sid (Snort ID) for local rules should start at 1000000+ to avoid overlap with community rules.


Step 4: Validate Snort Configuration

sudo so-rulecheck

Step 5: Reload Snort Rules

sudo so-rule-update

Operator Note: Monitor /opt/so/logs/snort to verify Snort reload occurred successfully.


Step 6: Test the New Rule

msg:"Suspicious HTTP domain access detected"

Step 7: Tune and Refine Rule as Needed


Dependencies


Other Available Tools

Tool Platform Installation Usage
Snort Security Onion / Linux Built-in IDS engine
PulledPork (optional) Linux Manual install Automatically update community rules
Suricata (if deployed) Security Onion / Linux Built-in alt. to Snort May use similar rule syntax

Operator Recommendations and Additional Tools

Operator Checklist

Best Practices


References


Revision History

Date Version Description Author
2025-05-02 1.0 Created from scratch with detailed operator-level guidance and examples Leo