SlideShare ist ein Scribd-Unternehmen logo
1 von 21
Downloaden Sie, um offline zu lesen
NETWORK SECURITY
Jupriyadi, S.Kom. M.T.
jupriyadi@teknokrat.ac.id
Bandarlampung, April 2020
https://spada.teknokrat.ac.id
Chapter 9
• To be understand the basic concepts of IDS
• The student will be able build an IDS using snort
Defined as the tools, methods, and resources to help
identify, assess, and report unauthorized or
unapproved network activity
IDSes can detect and deal with insider attacks, as well
as, external attacks, and are often very useful in
detecting violations of corporate security policy and other
internal threats.
“An Intrusion Detection System is required to detect all
types of malicious network traffic and computer usage that
can't be detected by a conventional firewall. This includes
network attacks against vulnerable services, data driven
attacks on applications, host based attacks such as privilege
escalation, unauthorized logins and access to sensitive files,
and malware (viruses, trojan horses, and worms).”
Based on location :
1. Network-based (NIDS)
Monitors network traffic
Provides early warning system for attacks
2. Host-based (HIDS)
Monitors activity on host machine
Able to stop compromises while they are in progress
Based on detection method:
1. Signature Based IDS
Monitor network or server traffic and match bytes or packet
sequences against a set of predetermined attack lists or
signatures.
2. Anomaly Based IDS
Use network traffic baselines to determine a “normal” state for
the network and compare current traffic to that baseline.
Signature detections
Also know as misuse detection
IDS analyzes information it gathers and compares it to a
database of known attacks, which are identified by their
individual signatures
Anomaly detection
Baseline is defined to describe normal state of network or host
Any activity outside baseline is considered to be an attack
• The ability to know when an intruder or attacker is
engaged in reconnaissance or other malicious activity
can mean the difference between being compromised
and not being compromised.
• An IDS can alert the administrator of a successful
compromise, allowing them the opportunity to
implement mitigating actions before further damage is
caused
 Cisco Systems, Inc.
 Computer Associates International Inc.
 CyberSafe Corp.
 Cylant Technology
 Palo Alto Network
 Internet Security Systems Inc.
 Snort
 Etc..
It is an open source Intrusion Prevention System capable
of real-time traffic analysis and packet logging
(www.snort.org)
Multiplatform software
1. Sniffer mode, which simply reads the packets off of the
network and displays them for you in a continuousstream on
the console (screen)
2. Packet Logger mode, which logs the packets to disk.
3. Intrusion Detection System (IDS) mode, which
performs detection and analysis on network traffic.This is the
most complex and configurable mode.
./snort -v
This command will run Snort and just show the IP and
TCP/UDP/ICMP headers, nothing else. If you want to see the
application data in transit, try the following:
./snort -vd
This instructs Snort to display the packet data as well as the
headers. If you want an even more descriptive display, showing
the data link layer headers, do this:
./snort -vde
As an aside, notice that the command line switches can be listed
separately or in a combined form. The last command could also
be typed out as:
./snort -d -v -e
Need to specify a logging directory and Snort will automatically know
to go into packet logger mode:
./snort -dev -l ./log
This rule tells Snort that you want to print out the data link and TCP/IP
headers as well as application data into thedirectory./log, and you
want to log the packets relative to the 192.168.1.0 class C network.
All incoming packetswill be recorded into subdirectories of the log
directory, with the directory names being based on the address of
theremote (non-192.168.1) host.
./snort -dev -l ./log -h 192.168.1.0/24
To enable Intrusion Detection System (IDS) mode sothat you don’t
record every single packet sent downthe wire, try this:
./snort -dev -l ./log -h 192.168.1.0/24 -c snort.conf
When Snort generates an alert message, it will usually look like the
following:
[**] [116:56:1] (snort_decoder): T/TCP Detected [**]
The first number is the Generator ID, this tells the user what component of Snort
generated this alert. For a list of GIDs, please read etc/generators in the Snort
source. In this case, we know that this event came from the “decode”(116)
component of Snort.
The second number is the Snort ID (sometimes referred to as Signature ID). For a
list of preprocessor SIDs, please see etc/gen-msg.map. Rule-based SIDs are
written directly into the rules with the sid option. In this case,56 represents aT/TCP
event.
The third number is the revision ID. This number is primarily used when writing
signatures, as each rendition of the rule should increment this number with the rev
option.
• Most Snort rules are written in a single line
• May span multiple lines by adding a backslashto the end of the
line
• Snort rules are divided into two logical sections, the rule header
and the rule options
The rule header containsthe rule’s action, protocol, source and destination IP
addresses and netmasks, and the source and destination portsinformation.
The rule option section contains alert messages and information on which
parts of the packet should beinspected to determine if the rule action should
be taken.
alert tcp any any -> 192.168.1.0/24 111 (content:"|00 01 86 a5|";
msg:"mountd access";)
The first item in a rule is the rule action :
1. alert - generate an alert using the selected alert method,and
then log the packet
2. log - log the packet
3. pass - ignore the packet
4. drop - block and log the packet
5. reject - block the packet, log it, and then send a TCP reset if
the protocol is TCP or an ICMP port unreachable message if the
protocol is UDP
6. sdrop - block the packet but do not log it
log udp any any -> 192.168.1.0/24 1:1024
log udp traffic coming from any port and destination ports
ranging from 1 to 1024
log tcp any any -> 192.168.1.0/24 :6000
log tcp traffic from any port going to ports less than or equal to
6000
log tcp any :1024 -> 192.168.1.0/24 500:
log tcp traffic from privileged ports less than or equal to 1024 going
to ports greater than or equal to 500
What's Next ?
21

Weitere ähnliche Inhalte

Was ist angesagt?

Module 3 Scanning
Module 3   ScanningModule 3   Scanning
Module 3 Scanning
leminhvuong
 
Intrusion Detection System using Snort
Intrusion Detection System using Snort Intrusion Detection System using Snort
Intrusion Detection System using Snort
webhostingguy
 
PACKET Sniffer IMPLEMENTATION
PACKET Sniffer IMPLEMENTATIONPACKET Sniffer IMPLEMENTATION
PACKET Sniffer IMPLEMENTATION
Goutham Royal
 

Was ist angesagt? (20)

Snort IDS
Snort IDSSnort IDS
Snort IDS
 
Ch 5: Port Scanning
Ch 5: Port ScanningCh 5: Port Scanning
Ch 5: Port Scanning
 
Module 3 Scanning
Module 3   ScanningModule 3   Scanning
Module 3 Scanning
 
Aircrack
AircrackAircrack
Aircrack
 
IPSec and VPN
IPSec and VPNIPSec and VPN
IPSec and VPN
 
IPsec Basics: AH and ESP Explained
IPsec Basics: AH and ESP ExplainedIPsec Basics: AH and ESP Explained
IPsec Basics: AH and ESP Explained
 
Security Onion Advance
Security Onion AdvanceSecurity Onion Advance
Security Onion Advance
 
Creating a firewall in UBUNTU
Creating a firewall in UBUNTUCreating a firewall in UBUNTU
Creating a firewall in UBUNTU
 
Port scanning
Port scanningPort scanning
Port scanning
 
Dynamic Port Scanning
Dynamic Port ScanningDynamic Port Scanning
Dynamic Port Scanning
 
Ipsec vpn v0.1
Ipsec vpn v0.1Ipsec vpn v0.1
Ipsec vpn v0.1
 
Introduction to Snort Rule Writing
Introduction to Snort Rule WritingIntroduction to Snort Rule Writing
Introduction to Snort Rule Writing
 
Iptables Configuration
Iptables ConfigurationIptables Configuration
Iptables Configuration
 
introduction of iptables in linux
introduction of iptables in linuxintroduction of iptables in linux
introduction of iptables in linux
 
pfSense firewall workshop guide
pfSense firewall workshop guidepfSense firewall workshop guide
pfSense firewall workshop guide
 
Intrusion Detection System using Snort
Intrusion Detection System using Snort Intrusion Detection System using Snort
Intrusion Detection System using Snort
 
Nmap Basics
Nmap BasicsNmap Basics
Nmap Basics
 
Nmap(network mapping)
Nmap(network mapping)Nmap(network mapping)
Nmap(network mapping)
 
PACKET Sniffer IMPLEMENTATION
PACKET Sniffer IMPLEMENTATIONPACKET Sniffer IMPLEMENTATION
PACKET Sniffer IMPLEMENTATION
 
Firewall Facts
Firewall FactsFirewall Facts
Firewall Facts
 

Ähnlich wie Pertemuan 9 intrusion detection system

Cryptography Project by Aelsayed & Kyasser.pdf
Cryptography Project by Aelsayed & Kyasser.pdfCryptography Project by Aelsayed & Kyasser.pdf
Cryptography Project by Aelsayed & Kyasser.pdf
ahmeddeath6
 
Chapter 12
Chapter 12Chapter 12
Chapter 12
cclay3
 
Intrusion_Detection_By_loay_elbasyouni
Intrusion_Detection_By_loay_elbasyouniIntrusion_Detection_By_loay_elbasyouni
Intrusion_Detection_By_loay_elbasyouni
Loay Elbasyouni
 

Ähnlich wie Pertemuan 9 intrusion detection system (20)

Detection of Idle Stealth Port Scan Attack in Network Intrusion Detection Sys...
Detection of Idle Stealth Port Scan Attack in Network Intrusion Detection Sys...Detection of Idle Stealth Port Scan Attack in Network Intrusion Detection Sys...
Detection of Idle Stealth Port Scan Attack in Network Intrusion Detection Sys...
 
Detection of Idle Stealth Port Scan Attack in Network Intrusion Detection Sys...
Detection of Idle Stealth Port Scan Attack in Network Intrusion Detection Sys...Detection of Idle Stealth Port Scan Attack in Network Intrusion Detection Sys...
Detection of Idle Stealth Port Scan Attack in Network Intrusion Detection Sys...
 
IDS_WK_Arsalan.pptx
IDS_WK_Arsalan.pptxIDS_WK_Arsalan.pptx
IDS_WK_Arsalan.pptx
 
Snort
SnortSnort
Snort
 
6
66
6
 
Snort IDS/IPS Basics
Snort IDS/IPS BasicsSnort IDS/IPS Basics
Snort IDS/IPS Basics
 
Snort
SnortSnort
Snort
 
Intrusion detection system IDS
Intrusion detection system IDSIntrusion detection system IDS
Intrusion detection system IDS
 
Introduction to IDS & IPS - Part 1
Introduction to IDS & IPS - Part 1Introduction to IDS & IPS - Part 1
Introduction to IDS & IPS - Part 1
 
An analysis of Network Intrusion Detection System using SNORT
An analysis of Network Intrusion Detection System using SNORTAn analysis of Network Intrusion Detection System using SNORT
An analysis of Network Intrusion Detection System using SNORT
 
Introduction to Cyber security module - III
Introduction to Cyber security module - IIIIntroduction to Cyber security module - III
Introduction to Cyber security module - III
 
Cryptography Project by Aelsayed & Kyasser.pdf
Cryptography Project by Aelsayed & Kyasser.pdfCryptography Project by Aelsayed & Kyasser.pdf
Cryptography Project by Aelsayed & Kyasser.pdf
 
hakin9_6-2006_str22-33_snort_EN
hakin9_6-2006_str22-33_snort_ENhakin9_6-2006_str22-33_snort_EN
hakin9_6-2006_str22-33_snort_EN
 
Chapter 12
Chapter 12Chapter 12
Chapter 12
 
Detect Network Threat Using SNORT Intrusion Detection System
Detect Network Threat Using SNORT Intrusion Detection SystemDetect Network Threat Using SNORT Intrusion Detection System
Detect Network Threat Using SNORT Intrusion Detection System
 
Module 7 (sniffers)
Module 7 (sniffers)Module 7 (sniffers)
Module 7 (sniffers)
 
Us 13-opi-evading-deep-inspection-for-fun-and-shell-wp
Us 13-opi-evading-deep-inspection-for-fun-and-shell-wpUs 13-opi-evading-deep-inspection-for-fun-and-shell-wp
Us 13-opi-evading-deep-inspection-for-fun-and-shell-wp
 
Snort- Presentation.pptx
Snort- Presentation.pptxSnort- Presentation.pptx
Snort- Presentation.pptx
 
Network Security_Dr Shivashankar_Module 5.pdf
Network Security_Dr Shivashankar_Module 5.pdfNetwork Security_Dr Shivashankar_Module 5.pdf
Network Security_Dr Shivashankar_Module 5.pdf
 
Intrusion_Detection_By_loay_elbasyouni
Intrusion_Detection_By_loay_elbasyouniIntrusion_Detection_By_loay_elbasyouni
Intrusion_Detection_By_loay_elbasyouni
 

Mehr von newbie2019

Digital forensic principles and procedure
Digital forensic principles and procedureDigital forensic principles and procedure
Digital forensic principles and procedure
newbie2019
 
Fundamentals of information systems security ( pdf drive ) chapter 1
Fundamentals of information systems security ( pdf drive ) chapter 1Fundamentals of information systems security ( pdf drive ) chapter 1
Fundamentals of information systems security ( pdf drive ) chapter 1
newbie2019
 

Mehr von newbie2019 (20)

Digital forensic principles and procedure
Digital forensic principles and procedureDigital forensic principles and procedure
Digital forensic principles and procedure
 
Fundamental digital forensik
Fundamental digital forensikFundamental digital forensik
Fundamental digital forensik
 
Pendahuluan it forensik
Pendahuluan it forensikPendahuluan it forensik
Pendahuluan it forensik
 
Chapter 15 incident handling
Chapter 15 incident handlingChapter 15 incident handling
Chapter 15 incident handling
 
Chapter 14 sql injection
Chapter 14 sql injectionChapter 14 sql injection
Chapter 14 sql injection
 
Chapter 13 web security
Chapter 13 web securityChapter 13 web security
Chapter 13 web security
 
NIST Framework for Information System
NIST Framework for Information SystemNIST Framework for Information System
NIST Framework for Information System
 
Nist.sp.800 37r2
Nist.sp.800 37r2Nist.sp.800 37r2
Nist.sp.800 37r2
 
Iso iec 27000_2018
Iso iec 27000_2018Iso iec 27000_2018
Iso iec 27000_2018
 
Chapter 12 iso 27001 awareness
Chapter 12 iso 27001 awarenessChapter 12 iso 27001 awareness
Chapter 12 iso 27001 awareness
 
Chapter 10 security standart
Chapter 10 security standartChapter 10 security standart
Chapter 10 security standart
 
Chapter 8 cryptography lanjutan
Chapter 8 cryptography lanjutanChapter 8 cryptography lanjutan
Chapter 8 cryptography lanjutan
 
Pertemuan 7 cryptography
Pertemuan 7  cryptographyPertemuan 7  cryptography
Pertemuan 7 cryptography
 
Chapter 6 information hiding (steganography)
Chapter 6 information hiding (steganography)Chapter 6 information hiding (steganography)
Chapter 6 information hiding (steganography)
 
Vulnerability threat and attack
Vulnerability threat and attackVulnerability threat and attack
Vulnerability threat and attack
 
Chapter 4 vulnerability threat and attack
Chapter 4 vulnerability threat and attack Chapter 4 vulnerability threat and attack
Chapter 4 vulnerability threat and attack
 
C02
C02C02
C02
 
Chapter 3 security principals
Chapter 3 security principalsChapter 3 security principals
Chapter 3 security principals
 
Chapter 2 konsep dasar keamanan
Chapter 2 konsep dasar keamananChapter 2 konsep dasar keamanan
Chapter 2 konsep dasar keamanan
 
Fundamentals of information systems security ( pdf drive ) chapter 1
Fundamentals of information systems security ( pdf drive ) chapter 1Fundamentals of information systems security ( pdf drive ) chapter 1
Fundamentals of information systems security ( pdf drive ) chapter 1
 

Kürzlich hochgeladen

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 

Kürzlich hochgeladen (20)

How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 

Pertemuan 9 intrusion detection system

  • 1. NETWORK SECURITY Jupriyadi, S.Kom. M.T. jupriyadi@teknokrat.ac.id Bandarlampung, April 2020 https://spada.teknokrat.ac.id Chapter 9
  • 2. • To be understand the basic concepts of IDS • The student will be able build an IDS using snort
  • 3. Defined as the tools, methods, and resources to help identify, assess, and report unauthorized or unapproved network activity IDSes can detect and deal with insider attacks, as well as, external attacks, and are often very useful in detecting violations of corporate security policy and other internal threats.
  • 4. “An Intrusion Detection System is required to detect all types of malicious network traffic and computer usage that can't be detected by a conventional firewall. This includes network attacks against vulnerable services, data driven attacks on applications, host based attacks such as privilege escalation, unauthorized logins and access to sensitive files, and malware (viruses, trojan horses, and worms).”
  • 5. Based on location : 1. Network-based (NIDS) Monitors network traffic Provides early warning system for attacks 2. Host-based (HIDS) Monitors activity on host machine Able to stop compromises while they are in progress
  • 6. Based on detection method: 1. Signature Based IDS Monitor network or server traffic and match bytes or packet sequences against a set of predetermined attack lists or signatures. 2. Anomaly Based IDS Use network traffic baselines to determine a “normal” state for the network and compare current traffic to that baseline.
  • 7. Signature detections Also know as misuse detection IDS analyzes information it gathers and compares it to a database of known attacks, which are identified by their individual signatures Anomaly detection Baseline is defined to describe normal state of network or host Any activity outside baseline is considered to be an attack
  • 8. • The ability to know when an intruder or attacker is engaged in reconnaissance or other malicious activity can mean the difference between being compromised and not being compromised. • An IDS can alert the administrator of a successful compromise, allowing them the opportunity to implement mitigating actions before further damage is caused
  • 9.  Cisco Systems, Inc.  Computer Associates International Inc.  CyberSafe Corp.  Cylant Technology  Palo Alto Network  Internet Security Systems Inc.  Snort  Etc..
  • 10. It is an open source Intrusion Prevention System capable of real-time traffic analysis and packet logging (www.snort.org) Multiplatform software
  • 11.
  • 12. 1. Sniffer mode, which simply reads the packets off of the network and displays them for you in a continuousstream on the console (screen) 2. Packet Logger mode, which logs the packets to disk. 3. Intrusion Detection System (IDS) mode, which performs detection and analysis on network traffic.This is the most complex and configurable mode.
  • 13. ./snort -v This command will run Snort and just show the IP and TCP/UDP/ICMP headers, nothing else. If you want to see the application data in transit, try the following: ./snort -vd This instructs Snort to display the packet data as well as the headers. If you want an even more descriptive display, showing the data link layer headers, do this: ./snort -vde As an aside, notice that the command line switches can be listed separately or in a combined form. The last command could also be typed out as: ./snort -d -v -e
  • 14. Need to specify a logging directory and Snort will automatically know to go into packet logger mode: ./snort -dev -l ./log This rule tells Snort that you want to print out the data link and TCP/IP headers as well as application data into thedirectory./log, and you want to log the packets relative to the 192.168.1.0 class C network. All incoming packetswill be recorded into subdirectories of the log directory, with the directory names being based on the address of theremote (non-192.168.1) host. ./snort -dev -l ./log -h 192.168.1.0/24
  • 15. To enable Intrusion Detection System (IDS) mode sothat you don’t record every single packet sent downthe wire, try this: ./snort -dev -l ./log -h 192.168.1.0/24 -c snort.conf
  • 16. When Snort generates an alert message, it will usually look like the following: [**] [116:56:1] (snort_decoder): T/TCP Detected [**] The first number is the Generator ID, this tells the user what component of Snort generated this alert. For a list of GIDs, please read etc/generators in the Snort source. In this case, we know that this event came from the “decode”(116) component of Snort. The second number is the Snort ID (sometimes referred to as Signature ID). For a list of preprocessor SIDs, please see etc/gen-msg.map. Rule-based SIDs are written directly into the rules with the sid option. In this case,56 represents aT/TCP event. The third number is the revision ID. This number is primarily used when writing signatures, as each rendition of the rule should increment this number with the rev option.
  • 17. • Most Snort rules are written in a single line • May span multiple lines by adding a backslashto the end of the line • Snort rules are divided into two logical sections, the rule header and the rule options The rule header containsthe rule’s action, protocol, source and destination IP addresses and netmasks, and the source and destination portsinformation. The rule option section contains alert messages and information on which parts of the packet should beinspected to determine if the rule action should be taken.
  • 18. alert tcp any any -> 192.168.1.0/24 111 (content:"|00 01 86 a5|"; msg:"mountd access";) The first item in a rule is the rule action : 1. alert - generate an alert using the selected alert method,and then log the packet 2. log - log the packet 3. pass - ignore the packet 4. drop - block and log the packet 5. reject - block the packet, log it, and then send a TCP reset if the protocol is TCP or an ICMP port unreachable message if the protocol is UDP 6. sdrop - block the packet but do not log it
  • 19. log udp any any -> 192.168.1.0/24 1:1024 log udp traffic coming from any port and destination ports ranging from 1 to 1024 log tcp any any -> 192.168.1.0/24 :6000 log tcp traffic from any port going to ports less than or equal to 6000 log tcp any :1024 -> 192.168.1.0/24 500: log tcp traffic from privileged ports less than or equal to 1024 going to ports greater than or equal to 500
  • 21. 21