Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 

Repository files navigation

Snort-Rules

A collection of custom Snort 3.12 rules designed for proactive network threat detection. Features custom rules for alerting on specific traffic patterns and demonstrating IPS/IDS capabilities in virtualized environments.

Rule 1: Alert ICMP Traffic

image
This rule alerts on ICMP traffic to 8.8.8.8 from any source address. I used the --daq-batch-size parameter to print every packet to the console one by one. This is a way to use Snort as an IDS, alerting you but not taking any action to prevent malicious activity.

image

Rule 2: Alert HTTPS Traffic

image
This rule alerts on incoming HTTPS traffic (port 443) to any port on the host address. When I used curl to make a GET request to google.com, Snort did not alert on the traffic because it was over HTTP, not HTTPS.

image
When I made the request to https://google.com, Snort correctly alerted the traffic in the console.

image

Rule 3: Log DNS Traffic

image
Instead of writing alerts to the console, this rule logs incoming DNS traffic which can then be viewed inside Wireshark.

image
Using Snort to log traffic, you can then open those files inside Wireshark for further analysis

image

Rule 4: Drop ICMP Traffic

image
Sometimes logging isn't enough and you want to drop certain traffic. This rule drops incoming ICMP traffic originating from any address. By actively dropping the packets, this turns Snort from an IDS into an IPS, allowing it to take action on your network.

image

Rule 5: Reject ICMP Traffic From Malicious IP

image
For the purposes of this lab, 8.8.8.8 was used as the 'malicious' IP address. This rule is rejecting ICMP traffic from this IP which we are then alerting in the console. As you can see below, 4 packets were transmitted and we had 100% packet loss due to the reject rule. Because we are rejecting, only one packet is output to the console because the session gets terminated.

image

About

I set up custom rules to alert on specific network traffic and learn the syntax using Snort version 3.12

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors