Lecture - 5 31 Jan 2018 IDS IPS Honeypot PDF
Lecture - 5 31 Jan 2018 IDS IPS Honeypot PDF
SECURITY
UE15CS331
Lecture 05
31 Jan 2018
HONNAVALLI B Prasad
General rules of engagement
5 Jan 2018
31 HB Prasad @ PESU
Ingress filtering (RFC 2827, 3704)
ISP Internet
6 Jan 2018
31 HB Prasad @ PESU
Implementation problems
ALL ISPs must do this. Requires global trust.
– If 10% of ISPs do not implement ⇒ no defense
– No incentive for deployment
2017:
– 33% of Auto. Systems are fully spoofable
(spoofer.caida.org)
– 23% of announced IP address space is spoofable
■ Goal:
– Given set of attack packets
– Determine path to source
■ Assumptions:
– Most routers remain uncompromised
– Attacker sends many packets
– Route from attacker to victim remains relatively stable
8 Jan 2018
31 HB Prasad @ PESU
DoS Attack
■ Single Master
■ Many bots to
generate flood
■ Sad truth:
– Internet is ill-equipped to handle DDoS attacks
– Many commercial solutions: CloudFlare, Akamai, …
10Jan 2018
31 HB Prasad @ PESU
BEHAVIOR OF CYBER
CRIMINALS / INTRUDERS
■ Hackers with minimal technical skill who primarily use existing attack toolkits
■ They likely comprise the largest number of attackers, including many criminal and
activist attackers
■ Given their use of existing known tools, these attackers are the easiest to defend
against
■ Also known as “script-kiddies” due to their use of existing scripts (tools)
■ Hackers with sufficient technical skills to modify and extend attack toolkits to use
newly discovered, or purchased, vulnerabilities
■ They may be able to locate new vulnerabilities to exploit that are similar to some
already known
■ Hackers with such skills are likely found in all intruder classes
■ Adapt tools for use by others
■ Hackers with high-level technical skills capable of discovering brand new categories of
vulnerabilities
■ Write new powerful attack toolkits
■ Some of the better known classical hackers are of this level
■ Some are employed by state-sponsored organizations
■ Defending against these attacks is of the highest difficulty
Target
acquisition and Privilege
Initial access
information escalation
gathering
Information
Maintaining
gathering or Covering tracks
access
system exploit
Probability
density function
profile of
profile of authorized user
intruder behavior behavior
overlap in observed
or expected behavior
§ Host-based
§ HIDS
§ Network-based
§ NIDS
§ Shallow
§ Fast, but provides little fidelity
§ Examines header information, limited payload data
§ Deep
§ Slow, requires stateful tracking of data
§ Inspects all fields including variable length fields
NIDS Placement
NIDS Pros and COns
§ PROS
§ Fairly easy to setup
§ Does not affect the speed of the network or add load to the systems it monitors
§ CONS
§ Sensors have limited speed
§ Almost impossible to detect attacks not in rule set
§ Very susceptible to “low” and “slow” attacks
■ Although NIDS and HIDS and their hybrids are the most
widely used tools in network intrusion detection, there are
others that are less used but more focused and, therefore,
more specialized.
■ Because many of these tools are so specialized, many are
still not considered as being intrusion detection systems
but rather intrusion detection add-ons or tools.
Resist
Run continually Be fault tolerant subversion
Impose a Configured
minimal according to Adapt to changes
overhead on system security in systems and
system policies users
HB Prasad @ PESU
31 Jan 2018 57
Anomaly Detection
Match a large collection of known patterns of Involves the use of rules for identifying known
malicious data against data stored on a penetrations or penetrations that would exploit
system or in transit over a network known weaknesses
The signatures need to be large enough to Rules can also be defined that identify
minimize the false alarm rate, while still suspicious behavior, even when the behavior is
detecting a sufficiently large fraction of within the bounds of established patterns of
malicious data usage
Common data
sources include:
A fundamental •System call traces
•Audit (log file) records
component of •File integrity
intrusion detection checksums
is the sensor that •Registry access
collects data
Comprised of a number of
sensors, one or more Analysis of traffic patterns
servers for NIDS
may be done at the sensor,
management functions, and the management server or a
one or more management combination of the two
consoles for the human
interface
Network traffic
Monitoring interface
(no IP, promiscuous mode)
NIDS
sensor
Management interface
(with IP)
internal server
and data resource Internet
networks
LAN switch
or router external
firewall
1
workstation
networks
service network
(Web, Mail, DNS, etc.)
4 LAN switch internal
or router firewall
■ Host trap
– Run real services on a sacrificial computer or simulated
instrumented services
■ Network trap
– The intruder thinks they found a vulnerable organization
■ A decoy - if a machine becomes hot for attackers
– Change the IP address and name
– Put in a honeypot
■ DNS, Mail, Web servers make great honeypots on their unused ports
■ A honeypot is a system designed to look like something that an intruder can hack.
■ They are built for many purposes but the overriding purpose is to deceive attackers
and learn about their tools and methods.
■ Honeypots are also add-on/tools that are not strictly sniffer-based intrusion
detection systems like HIDS and NIDS.
■ However, they are good deception systems that protect the network in much the
same way as HIDS and NIDS.
■ Since the goal for a honeypot is to deceive intruders and learn from them without
compromising the security of the network, then it is important to find a strategic
place for the honeypot.
– In the DMZ for those networks with DMZs or
– behind the network firewall if the private network does not have a DMZ.
■ Name servers, mail servers, and web servers attract the most fire
on the Internet
■ What if they had their non-service ports instrumented (monitored)?
■ The end result could be to slow down the pace of attacks and
increase arrests
■ Honeypot is an advanced technique
■ Do everything else first before it
■ Best way to capture new worms for analysis
■ Risk of having attacker use a Honeypot if they break the controls
■ Honeynet
■ Honeyd
Honeypot
3 External
LAN switch firewall
or router
Honeypot
LAN switch
or router
Internal
network Honeypot
Service network
(Web, Mail, DNS, etc.)
■ Because NIDSs are passively detecting intrusions into the network without
preventing them from entering the networks, many organizations in recent times
have been bundling up IDS and firewalls to create a model that can detect and
then prevent.
■ The bundle works as follows:
– The IDS fronts the network with a firewall behind it.
– On the detection of an attack, the IDS then goes into the prevention mode by altering the
firewall access control rules on the firewall.
– The action may result in the attack being blocked based on all the access control regimes
administered by the firewall.
– The IDS can also affect prevention through the TCP resets;
Ø TCP utilizes the RST (reset) bit in the TCP header for resetting a TCP connection, usually sent as a
response request to a non-existent connection.
Ø But this kind of bundling is both expensive and complex, especially to an untrained security team.
– It suffers from latency
Ø the time it takes for the IDS to either modify the firewall rules or issue a TCP reset command. This
period of time is critical in the success of an attack.
§ False positives
§ May supports a limited suite of network applications
§ Requires more system resources
§ Can you afford false positives?
§ Keeping up with traffic demands
§ Tend to have less expensive rule-base
NIPS Recommendations
§ Learning Mode
§ IPS should support the network learning mode to learn more about “normal”
§ Traffic
§ Topology
§ Architecture
§ Trained analysts
§ Not a replacement for firewalls
IPS Products
§ Low cost
§ Light weight
§ Suitable for monitoring multiple
§ Sites
§ Sensors
§ Low false alarm rate
§ Low effort for reporting
Snort Capture
Snort Architecture
Log
Detection
Packet Decoder Engine
Alert
Option Option
• • •
Keyword Arguments
(b) Options
§ Rule :
§ alert tcp any any -> 192.168.1.0/24 80 (msg: "Inbound HTTP Traffic"; )
§ Output:
§ [**] [1:0:0] Inbound HTTP Traffic [**] 09/02-13:03:22.734392 192.168.1.104:1460 ->
192.168.1.103:80 TCP TTL:128 TOS:0x0 ID:28581 IpLen:20 DgmLen:48 DF ******S*
Seq: 0x2550D716 Ack: 0x0 Win: 0x4000 TcpLen: 28 TCP Options (4) => MSS: 1460 NOP
NOP SackOK
Advanced Snort Rule
§ Rule:
§ alert tcp any any -> 192.168.1.0/24 80 (content: "/cgibin/ test.cgi"; msg: "Attempted CGI-
BIN Access!!";)
§ Output :
§ [**] [1:0:0] Attempted CGI-BIN Access!! [**] 09/02-13:18:30.550445
192.168.1.104:1472 -> 192.168.1.103:80 TCP TTL:128 TOS:0x0 ID:29951 IpLen:20
DgmLen:466 DF ***AP*** Seq: 0x32D8E9C1 Ack: 0xB427699E Win: 0x4470
TcpLen:20
Snort Rule Actions
Action Description
alert Generate an alert using the selected alert method, and then log the packet.
log Log the packet.
pass Ignore the packet.
activate Alert and then turn on another dynamic rule.
dynamic Remain idle until activated by an activate rule , then act as a log rule.
drop Make iptables drop the packet and log the packet.
Make iptables drop the packet, log it, and then send a TCP reset if the
reject protocol is TCP or an ICMP port unreachable message if the protocol is
UDP.
sdrop Make iptables drop the packet but does not log it.