12 - Types of IDS
12 - Types of IDS
12 - Types of IDS
IDS Types
Audit Records
(Logs/Traffic Capture)
Activity Data
Normal and intrusive
activities have distinct
signatures
Alarms
Action/Report
True Positive
There truly was a security incident
A real attack was detected
True Negative
There truly was NOT any incident
Most desirable! Security controls are working!
False Positive
False alarm
An incident was reported, but it didn’t actually happen
Too many false positives can become annoying
False Negative
A security incident actually happened, but was not detected
IDS falsely reports that everything is ok
This is the most serious and dangerous of all!
Only activities inside the host are monitored:
File activity
Processes
Logons
Privileged actions
User account changes
Software installation/deletion
Flag Information
-A Set alert mode: fast, full, console, test or none
-b Log packets in tcpdump format (much faster!)
-B <mask> Obfuscate IP addresses in alerts and packet dumps using CIDR mask
-c <rules> Use Rules file
-C Print out payloads with character data only (no hex)
-l Specifies the logging directory
-i <interface number> Specifies which interface Snort should listen on
-K Logging mode (pcap[default], ascii, none)
-? Lists all switches and options and then exits
Monitored protocols:
TCP
UDP
ICMP
Rule Actions
Alert
Pass
Log
A security analyst should be able to read Snort IDS rules and pick out generic
content such as:
The type of protocol covered by the signature
The port be analyzed
The direction of traffic flow
alert icmp any any -> &HOME_NET any (msg:"ICMP test"; sid:1000001;
rev:1; classtype:icmp-event;)
Messages include:
time stamps, event messages, severity, host IP addresses, diagnostics, and more
Obfuscation
Encoding the attack packets in such a way that the target is able to decode them, but the
IDS cannot
Unicode - Use Unicode characters rather than ASCII so it doesn’t match any signature
Polymorphic code - Change the attack code so it doesn’t match any IDS signature
Encryption - Encrypt the attack code so it can’t be read
Path manipulation to cause signature mismatch
False Positive Generation Events
Craft malicious packets designed to set off alarms
Attempt to distract/overwhelm the IDS and admin
Overlapping Fragments
Generate a bunch of tiny fragments overlapping TCP sequence numbers.
ASCII Shellcode
Use ASCII characters to bypass pattern matching
Application-Level Attacks
Taking advantage of the compression used to transfer large files and hide attacks in
compressed data, as it cannot be examined by the IDS.
Exploits IDSs that do not reconstruct sessions before performing pattern matching
Fragments the attack across multiple packets
No single packet triggers an alert
IDS reassembly times out if fragments sit too long it its buffer
Whisker
-I 1 IDS-evasive mode 1 (URL encoding)
-I 2 IDS-evasive mode 2 (/./ directory insertion)
-I 3 IDS-evasive mode 3 (premature URL ending)
-I 4 IDS-evasive mode 4 (long URL)
-I 5 IDS-evasive mode 5 (fake parameter)
-I 6 IDS-evasive mode 6 (TAB separation) (not NT/IIS)
-I 7 IDS-evasive mode 7 (case sensitivity)
-I 8 IDS-evasive mode 8 (Windows delimiter)
-I 9 IDS-evasive mode 9 (session splicing) (slow)
-I 0 IDS-evasive mode 0 (NULL method)
Splits an HTTP request across multiple packets
Not true IP fragmentation
The receiving webserver does not have to reassemble IP fragments
The target views the attack as a very slow incoming HTTP request
Will keep adding the incoming data to its buffer until a complete request has been made
Example:
GET / HTTP/1.0 GE T / H T TP /1 .0
https://packetstormsecurity.com/files/download/11002/whiskerids.html
https://dl.packetstormsecurity.net/papers/IDS/whiskerids.html
Stick
An “IDS stress tool”
Overwhelms a NIDS with so many alerts using valid signatures
The admin can no longer distinguish between false positives and legitimate alerts
Produces 250 alarms per second
Can cause some IDSes, including Snort, to turn themselves off
Snot
Similar to Stick
Attempts to randomize the sequence of rules or alerts generated so that a "Snot generation"
rule is not triggered by Snort
Example: snot -r snort.rules -s www.somerandomhost.org/24 -d somesnortuser.com -l 10
Fragroute
Packet fragmenter
ADMmutate
Creates scripts not recognizable by signature files
NIDSbench
Older tool for fragmenting bits
Inundator
Flooding tool
IDS-Evasion
Multiple bash, PowerShell, and Python scripts to evade Snort
https://github.com/ahm3dhany/IDS-Evasion
Whisker Your Freedom
Nmap Tomahawk
Hping2, Hping3 Atelier Web Firewall Tester
CryptCat Freenet
Traffic IQ Professional Gtunnel
tcp-over-dns Hotspot Shield
Snare Agent for Windows Proifier
AckCmd VPN One Click
Whisker Ostinato
Colasoft Packet Builder fping 3
CommView NetScanTools Pro
hping3 pktgen
Multi-Generator (MGEN) PACKETH
Net-Inspect Packet Generator
Overview
Stateless
12.6 Stateful
FIREWALLS Circuit-level
Application
UTM
Acts as a network choke point
Traffic must flow through it
Unauthorized traffic (in or out) is blocked
Can detect:
Unauthorized protocols
Unauthorized source and destination IP addresses
Unauthorized source and destination ports
Unauthorized incoming connection attempts
Malicious site URLs
Malicious payloads
If you can reach a host using one port or protocol but not another,
suspect that a firewall is blocking certain traffic types.
Hardware-based
AKA firewall appliance
Separate device
Placed at the network edge, between the “trusted” and “untrusted” networks
Blocks unauthorized traffic movement between the networks
Software-based
Installed on a host
Prevents unauthorized traffic to/from the host itself
Works at multiple OSI layers:
Layer 3 – IP addresses
Layer 4 – Protocol
Layer 5 - Ports
Typically host-based
Or a feature of a multi-layer firewall appliance
Filters packets at the Application Layer (7) of OSI or Application layer of TCP/IP
Examines payloads and Application Layer headers
Traffic is examined and filtered on application-specific commands
If configured as a proxy:
Client session put on hold at the proxy
Proxy fetches approved content for the client
Proxy caches the content against future requests • SOCKS is a Layer 5 protocol
Only protocols supported by the proxy are serviced
• Connects client to proxy
HTTP, HTTPS, SOCKS4, SOCKS5, and UDP
• Can forward TCP and UDP
All other protocols are rejected
• Optional authentication
Or routed through packet filtering
RULES
Different products have different rules syntax
Typical rules elements include:
Action
Protocol
Source IP
Source port
Destination IP
Destination port
Connection state
Interface
Traffic direction (in or out of an interface)
Packet
End End Admin Filtering/ Web SSH /
User User Station Stateless server Telnet
Firewall Linux
server
Disallow any source from 192.168.1.0/24 from querying any DNS server
Deny UDP 192.168.1.0/24 any eq 53
Only permit hosts from subnet 10.0.0.0/24 to use the client TCP source port 5555 to
connect to a gaming server 1.1.1.1 that listens on port 7777
Permit TCP 10.0.0.0 0.0.0.255 eq 5555 host 1.1.1.1 eq 7777
Multi-homed Firewall
Firewall with two or more interfaces to further subdivide the network based on security
goals
Often has a third interface that connects to a DMZ
Sometimes called a perimeter network
Simpler to configure
More expensive Bastion
Host
Internet
Untrusted
DMZ Private Network
Internet
Untrusted Private Network
Trusted
Multi-homed
firewall
Let the public-facing bastion host (typically a web server) “take one for the team”
Keep the application and database servers in the private network to protect them
Internet
Untrusted
DMZ Private Network
Internet
Untrusted
DMZ Private Network
Traffic flow follows the same principles regardless of your firewall configuration
Bastion
Host
Internet
Untrusted
DMZ Private Network
Internet
Untrusted
DMZ Private Network
Internet
Untrusted
DMZ Private Network
Internet
Untrusted
DMZ Private Network
Internet
Untrusted
DMZ Private Network
Internet
Untrusted
DMZ Private Network
Internet
Untrusted
DMZ Private Network
445
Internet
Untrusted
DMZ Private Network
80
Outside Untrusted Inside Trusted
firewall firewall
445
Internet
Untrusted
80 DMZ Private Network
While the Outside firewall will allow inbound connections to the DMZ
The Inside firewall is typically configured to allow NO inbound connections
Bastion
Host
Internet
Untrusted IPSEC
DMZ Private Network
The exception is that you might have a host in the DMZ that needs to communicate with a host in the
private network. The safest way to allow this is to have an IPSEC VPN between the two. The inside
firewall should have very strict rules that only allow the VPN, and only to a specific internal host
NOTE: IPSEC works at Layer 3 and 4. It does not care what the Layer 2 protocol is.
Nor does it care what the payload is.
Web server front end - Database server back end
You could protect the internal financial database with a web server front
end in the DMZ
Email spam filter - Email server
Webmail front end - Mailbox server back end
Public DNS
Internet
Untrusted
DMZ Private Network
Internet
Untrusted
DMZ Private Network
TYPES
Comodo VaultCore
Cisco ASA PC Protect
Check Point Bitdefender
Untangle NG Firewall McAfee
Sonicwall ZoneAlarm PRO
Online Armor Windows Defender
FortiGate Linux iptables
ManageEngine Linux UFW
Perimeter 81 Cisco packet filtering router
Outside firewall to create a “Dirty” DMZ
Total AV
Android Firewall Privacy Shield
Firewall iP aFirewall
Mobiwol: NoRoot Firewall NoRoot Firewall
DroidWall
AFWall+
Firewall Plus
Root Firewall
Android Firewall Gold
Droid Firewall
IDSaaS
Google Cloud IDS
AlienVault
Checkpoint
FWaaS
Perimeter 81
Fortinet
Zscaler