Advanced Network Forensics (Snort)This page gives an outline of how network forensics is used to trace network intrusions, and includes:
PresentationThe following provides an overview presentation with live demo. If you want to repeat these, use the scripts and traces below [Slides] Tests
ScriptsThe following are the scripts used [Download]: # Some additional pre-processor things preprocessor stream5_global: track_tcp yes, \ track_udp yes, \ track_icmp no, \ max_tcp 262144, \ max_udp 131072, \ max_active_responses 2, \ min_response_seconds 5 preprocessor stream5_tcp: policy windows, detect_anomalies, require_3whs 180, \ overlap_limit 10, small_segments 3 bytes 150, timeout 180, \ ports client 21 22 23 25 42 53 70 79 109 110 111 113 119 135 136 137 139 143 \ 161 445 513 514 587 593 691 1433 1521 1741 2100 3306 6070 6665 6666 6667 6668 6669 \ 7000 8181 32770 32771 32772 32773 32774 32775 32776 32777 32778 32779, \ ports both 80 81 82 83 84 85 86 87 88 89 90 110 311 383 443 465 563 591 593 631 636 901 989 992 993 994 995 1220 1414 1830 2301 2381 2809 3037 3057 3128 3443 3702 4343 4848 5250 6080 6988 7907 7000 7001 7144 7145 7510 7802 7777 7779 \ 7801 7900 7901 7902 7903 7904 7905 7906 7908 7909 7910 7911 7912 7913 7914 7915 7916 \ 7917 7918 7919 7920 8000 8008 8014 8028 8080 8085 8088 8090 8118 8123 8180 8222 8243 8280 8300 8500 8800 8888 8899 9000 9060 9080 9090 9091 9443 9999 10000 11371 34443 34444 41080 50000 50002 55555 preprocessor stream5_udp: timeout 180 # ARP Spoofing preprocessor arpspoof preprocessor arpspoof_detect_host: 192.168.47.200 00:0C:29:0F:71:A3 # Signature Detection alert tcp any any -> any any (content:"GIF89a"; msg:"GIF";sid:10000) alert tcp any any -> any any (content:"%PDF"; msg:"PDF";sid:10001) alert tcp any any -> any any (content:"|89 50 4E 47|"; msg:"PNG";sid:10002) alert tcp any any -> any any (content:"|50 4B 03 04|"; msg:"ZIP";sid:10003) # Signature Detection preprocessor sfportscan:\ proto { all } \ scan_type { all } \ sense_level { high } \ logfile { portscan.log } # Converted Format Detection alert tcp any any -> any 25 (content:"/9j/4AAQSkZJRgABAQEA"; msg:"Ehealth graphic";sid:10005) alert tcp any any -> any 25 (content:"image/gif"; msg:"GIF in email";sid:10006) # DoS Flood Detection alert tcp any any -> any 80 (msg:"DOS flood denial of service attempt";flow:to_server; \ detection_filter:track by_dst, count 60, seconds 60; \ sid:25101; rev:1;) # Bad FTP Login Detection alert tcp any 21 -> any any (msg:"FTP Bad login"; content:"530 User "; nocase; flow:from_server,established; sid:491; rev:5;) # Detecting email addresses in an email alert tcp any any <> any 25 (pcre:"/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9._%+-]/"; \ msg:"Email in message";sid:9000000;rev:1;) # Detecting credit card details alert tcp any any <> any any (pcre:"/5\d{3}(\s|-)?\d{4}(\s|-)?\d{4}(\s|-)?\d{4}/"; \ msg:"MasterCard number detected in clear text";content:"number";nocase;sid:9000003;rev:1;) alert tcp any any <> any any (pcre:"/3\d{3}(\s|-)?\d{6}(\s|-)?\d{5}/"; \ msg:"American Express number detected in clear text";content:"number";nocase;sid:9000004;rev:1;) alert tcp any any <> any any (pcre:"/4\d{3}(\s|-)?\d{4}(\s|-)?\d{4}(\s|-)?\d{4}/"; \ msg:"Visa number detected in clear text";content:"number";nocase;sid:9000005;rev:1;) Network TracesYou can use Snort as a stand-alone analyser using the "-r" option. The following are the traces that can be used in Snort:
Advanced Network TracesThe following trace has lots of malicious activity and relates to an investigation related to:
Reading Pcap into SnortThe following shows an example of reading a PCAP file into Snort: |