———————————————————————————
STEP 1: SNORT RULE STRUCTURE
———————————————————————————
<Rule Actions> <protocol> <Source IP Address> <Source Port> <Direction Operator> <Destination IP Address> <Destination Port> (Rule options)
———————————————————————————
EXAMPLE
———————————————————————————
#ALERT ON ANY FTP CONNECTION ATTEMPT
alert tcp any any -> $HOME_NET 21 (msg:” FTP connection attempt”; sid:1000001 rev:1;)
#ALERT ON SPECIFIC IP SSH CONNECTION ATTEMPT
alert tcp any any -> $192.168.1.4 22 (msg:” SSH connection attempted”; sid:1000002 rev:1;)
#ALERT ON SPECIFIC WEBSITE VISITED
alert tcp any any -> $EXTERNAL_NET $HTTP_PORTS (msg: “test ebay.com rule”; content:”ebay.com”; nocase; sid:1000003 rev:1;)