You are on page 1of 14

Configuring IDS

• Components
– Sensor
Module-3 – Director
– Post Office

Device Configuration

Configuring IDS Configuring IDS


Step 1. Initialization configuration Step 1: Initialization Configuration
– Router(config)# ip audit po max-events
Step 2. Logging or PostOffice configuration #_of_events
– Router(config)# ip audit smtp spam
Step 3. Audit rule configuration and activation #_of_recipients
– Router(config)# exit

Configuring IDS Configuring IDS


Step 1: Initialization Configuration Step 2: Logging and PostOffice Configuration
– The ip audit po max-events command limits the – The Cisco IOS can use two methods when logging
number of IDS events that the Cisco IOS queues IDS events:
up to send to a remote device. • log the information using syslog
• log the information using an IDS Director.
– The ip audit smtp spam command is used to limit • Using syslog, the Cisco IOS can log information locally
e-mail spamming that uses mass mailings. (the console or the internal buffer) or remotely (a
syslog server).
• If you want to use the syslog method, you must
configure the following IDS statement:

Router(config)# ip audit notify log


Configuring IDS Configuring IDS
Step 2: Logging and PostOffice Configuration If you want to use the syslog method, you
– The Cisco IOS can use two methods when logging must configure the following IDS statement:
IDS events:
• 1) log the information using syslog Router(config)# ip audit notify log
• 2) log the information using an IDS Director.
• Using syslog, the Cisco IOS can log information locally
(the console or the internal buffer) or remotely (a • If you are using CiscoWorks VMS with Security
syslog server). Monitoring Center (MC), you can forward the
router's syslog messages to Security MC, which is
used to centralize the repository and reporting of
alarm information.

Configuring IDS Configuring IDS


• When logging informational signatures to the • Second logging option is to log information to
router's console, you also need to execute the an IDS Director,
following command:
Router(config)# logging console info

Configuring IDS Configuring IDS


• The ip audit notify nr-director command enables the • With PostOffice, each device needs a unique combination of a
logging of IDS events to an IDS Director product. host ID and an organization ID.
• The organization ID is used to group sensors. In smaller
• The ip audit po local command specifies the
companies, normally only a single organization ID is necessary.
PostOffice configuration for the router;
• For enterprise companies, you might have different
• the ip audit po remote command specifies the organization IDs for each division, allowing for easier
configuration for the remote Director device. management of your sensor products.
• Within each organization, a device needs a unique host ID.
This concept is similar to IP addressing, in which you have
network numbers and hosts within a network. Both of these
IDs range from 1 to 65,535.
Configuring IDS Configuring IDS
• For the ip audit po local command, you must specify the Step 3: Audit Rule Configuration and Activation
router's personal ID numbers for the host and organization
values. – After logging, next is creating audit rules
• Likewise, you must specify the Director's PostOffice ID – Global Policies
information in the ip audit po remote command. • Global policies are used to take the appropriate actions
• However, unlike the router's PostOffice configuration, you for matching on signatures
have to tell your router many more things about the remote • To create your global policies, use these two
Director in the ip audit po remote command. commands:
• After specifying the PostOffice ID of the Director, you need to Step 1:
specify the IP address of the Director and then the IP address – Router(config)# ip audit info {action [alarm] [drop] [reset]}
that the router will use as its source address (an address on – Router(config)# ip audit attack {action [alarm] [drop] [reset]}
one of its physical or loopback interfaces) [Note: Commands on informational and attack signatures]

Configuring IDS Specific Policies


• Step 2:
• the two commands specify actions for
Router(config)# ip audit name audit-name {info
informational and attack signatures. Each has
|attack} [list standard-acl] [action [alarm] [drop]
three possible actions that the router can
[reset]]
take:
– Alarm - Generate an alarm (log), where this is the • Step 3:
default action Router(config)# ip audit signature signature-id
– Drop - Drop the packet {disable | list acl-list}
– Reset - For TCP connections, tear down the • Step 4:
connection
Router(config-if)#interface interface-number

Configuring IDS Configuring IDS


• Step 5: • Specific Policies
Router(config-if)# ip audit audit-name {in | out} – Besides globally changing the behavior or IDS, you
can create specific IDS auditing policies.
• Step 6:
Router(config-if)# exit
• Step 7:
Router(config)# ip audit po protected ip-addr [to
ip-addr]
• Step 8:
Router(config)# exit
Packet auditing process with Cisco
Cisco IOS Firewall IDS feature
IOS Firewall IDS
• supports intrusion detection technology. • Create an audit rule
• identifies 59 of the most common attacks • Apply the audit rule to an interface on the
using "signatures" to detect patterns of router, specifying a traffic direction (in or out)
misuse in network traffic.
• acts as an in-line intrusion detection sensor.

Auditing process Auditing process


• You apply the audit rule to an interface on the • Packets going through the interface that
router, specifying a traffic direction (in or out). match the audit rule are audited by a series of
– If the audit rule is applied to the in direction of the modules, starting with IP; then either ICMP,
interface, packets passing through the interface TCP, or UDP (as appropriate); and finally, the
are audited before the inbound ACL has a chance Application level.
to discard them.
– If the audit rule is applied to the out direction on
the interface, packets are audited after they enter
the router through another interface.

Auditing process When to Use Firewall IDS


• If a signature match is found in a module, then the following • Enterprises that are interested in a cost-effective method of
user-configured action(s) occur: – If the action is alarm, then extending their perimeter security across all network
the module completes its audit, sends an alarm, and passes boundaries, specifically branch-office, intranet, and extranet
the packet to the next module. perimeters.
• – If the action is drop, then the packet is dropped from the • Small and medium-sized businesses that are looking for a
module, discarded, and not sent to the next module. cost-effective router that has an integrated firewall with
• – If the action is reset, then the packets are forwarded to the intrusion-detection capabilities.
next module, and packets with the reset flag set are sent to • Service providers that want to set up managed services,
both participants of the session, if the session is TCP. providing firewalling and intrusion detection to their
customers, all housed within the necessary function of a
router.
Device Configuration
• Common issues in installing or configuring
information security devices
DEVICE CONFIGURATION • Methods to resolve these issues
• Methods of testing installed/configured
information security devices

Troubleshoot Firewall Problems Troubleshoot Firewall Problems


1) Ping a PC near the device 1) Ping a PC near the device
2) Ping the device • A simple ICMP ping to a PC near the device is a
good initial test to determine connectivity status
3) Telnet and/or browse to the device and network performance issues.
4) Confirm the port configuration of the device • ICMP ping is an IP-based signal sent from one
5) Confirm that important IP addresses are not device to another.
blocked • If the target device receives the "ping" from the
source device, it will (if configured to do so)
6) Trace the route to the device respond to confirm that is active and connected
to the network.
• It's a simple way of confirming that a device is
online.

Troubleshoot Firewall Problems Troubleshoot Firewall Problems


1) Ping a PC near the device 2) Ping the device
• So, if your pings to the PC are not returned, try – Next, send another simple ICMP ping to the device to
determine connectivity.
pinging the gateway.
– If pings to the PC in Step 1 were successful, but pings
• Continue working your way up the network with sent to the device fail, the problem is almost certainly
your pings to identify the point where they stop. with your SNMP device.
• Check for firewalls and firewall configurations, 3) Telnet and/or browse to the device
– If the SNMP device you are testing supports Telnet
especially those that block UDP, SNMP, pings, or connections or Web access, you should attempt to
ports 161 or 162. connect using one of these methods.
• Keep in mind that some networks block all ping – If pings succeed but Telnet and/or browsing is
traffic as a security measure. blocked, this is a very good indication that you have a
firewall issue.

Troubleshoot Firewall Problems Troubleshoot Firewall Problems


4) Confirm the port configuration of the device 6) Trace the route to the device
– For additional security, some SNMP devices may use – Tracing the "hops" that network traffic is following to
non-standard ports to obstruct unauthorized SNMP
traffic. If so, make sure that these ports are not reach the device can allow you to pinpoint a tricky
blocked by a firewall and are accepted by the firewall issue. A simple trace can be performed from
manager. the Command Prompt of Windows XP:
– Another potential solution is to reconfigure the device • Open a Command Prompt in Windows XP.
to use standard ports.
• Type "tracert", a single space, and the IP address of the
5) Confirm that important IP addresses are not device you are trying to reach (i.e. "tracert
blocked 192.168.230.143")
– A firewall may simply be blocking the IP address of • Press return to start the trace.
your device and/or manager. • Show the output to your IT department to identify potential
– Confirm that these or any other needed IP addresses firewall-problems.
are not being blocked.
Troubleshooting CISCO IOS Firewall
Contd.
configurations
• Reverse (Remove) - an access list • If too much traffic is denied, study the logic of
your list or try to define an additional broader
- put a "no" in front of the access-group list, and then apply it instead.
command in interface configuration mode • Eg:
access-list # permit tcp any any
Eg: int <interface> access-list # permit udp any any
no ip access-group # in|out access-list # permit icmp any any
https://www.cisco.com/c/en/us/support/docs/security/ios- int <interface>
firewall/13897-trouble-cbac.html ip access-group # in|out

Contd. Contd.
• Command - show ip access-lists
- which access lists are applied and what traffic is denied by them.
• Command - no ip route-cache • Extended Access list
- If the router is not heavily loaded, debugging can be done at a access−list 101 deny ip host 171.68.118.100 host 10.31.1.161
packet level on the extended or ip inspect access list. log
access−list 101 permit ip any any
Then in enable (but not config) mode:
term mon // terminal monitor command - can be used with log options also
debug ip packet # det // Exec command to display IP debug and IP sec Output:
option *Mar 1 04:44:19.446: %SEC−6−IPACCESSLOGDP: list 111
permitted icmp 171.68.118.100 −> 10.31.1.161 (0/0), 15
Output:
packets
*Mar 1 04:38:28.078: IP: s=10.31.1.161 (Serial0), d=171.68.118.100
(Ethernet0), g=10.31.1.21, len 100, forward
*Mar 1 03:27:13.295: %SEC−6−IPACCESSLOGP: list 118 denied
*Mar 1 04:38:28.086: IP: s=171.68.118.100 (Ethernet0), d=9.9.9.9 (Serial0), tcp 171.68.118.100(0) −> 10.31.1.161(0), 1 packet
g=9.9.9.9, len 100, forward

Common Router problems and


Troubleshooting Routers
solutions
• Basic Faults • Physical Layer Stuff:
- Physical Layer Stuff
- Check the Interfaces – Check power issues. Look for power lights, check
- Ping plugs, and circuit breakers.
- Check the Routing Table • Check the Interfaces:
- Is there a Firewall on the Computer?
- Any Access Lists? – show ip interface brief or show ipv6 interface brief
- Is the VPN Up?
- Do the Protocols Match?
- Check for Human Error
- Verify Settings

Common Router problems and Common Router problems and


solutions solutions
• Ping: • Is there a Firewall on the Computer?
– Use the ping and trace commands to check for – If the problem involves a computer, check to
connectivity. ensure that its firewall is not blocking packets.
• Check the Routing Table: • Any Access Lists?
– show ip route or show ipv6 route – check for access-control lists that block traffic.
Common Router problems and Common Router problems and
solutions solutions
• Is the VPN Up? • Check for Human Error:
– If a VPN is part of the connection, check to ensure – Check to ensure that correct usernames and
that it is up. passwords are being used,
• Do the Protocols Match? – same network addresses and matching subnet
– If you are trying to gain remote access to a server, masks.
ensure that it supports the protocol you’re • Verify Settings:
attempting to use. – Do not make assumptions. Verify everything!

Common Router problems and Common Router problems and


solutions solutions
1. Correct your Wi-Fi Security Settings 1. Correct your Wi-Fi Security Settings
2. Update your Hardware or Firmware – Network Mode: The router must be allowed to
accommodate all Wi-Fi models used by network
3. Fix Overheating or Overloading clients. For example, routers designed to run in
4. Remove MAC Address Restrictions 802.11g mode only will not support 802.11n or old
802.11b devices. Adjust the router to run in mixed
5. Check Wireless Signal Limitations mode to remedy this kind of network failure.
– Security mode: Most Wi-Fi devices support
several network security protocols (typically different
variations of WPA and WEP). All Wi-Fi devices,
including routers belonging to the same local network,
shall use the same protection mode.

Common Router problems and Common Router problems and


solutions solutions
1. Correct your Wi-Fi Security Settings 2. Update your Hardware or Firmware
– Security key: Wi-Fi security keys are phrases or – The reason for this step is twofold. You can take
sequences of letters and digits. All devices that benefit of any additional features and
enter the network must be configured to use the improvements of the new version of the firmware.
Also, your router will normally receive any critical
Wi-Fi key recognized by the router (or wireless security updates.
access point).
– Typically, you will have the choice of checking,
evaluating, downloading, and installing the latest
firmware on your router's administration tab. The
exact steps depend on the make and model of
your router, so check the specifics of the router
manufacturer's support site.

Common Router problems and Common Router problems and


solutions solutions
3. Fix Overheating or Overloading 4. Remove MAC Address Restrictions
– You can set up a different Wi-Fi router or allow the – A number of network routers support a function
"Guest Network" option for your router.
called MAC address filtering.
– You can also set up a separate SSID and password for
your host network to avoid issues with your main – While disabled by default, router administrators
network. can turn this function on and limit connections to
– This segregation would also work with your smart only those devices by their MAC address number.
appliances and secure your key devices from attacks – Check the router to ensure that either the MAC
on the Internet of Things.
address filtering is off or the MAC address of the
– You can also use QoS (Quality of Service). QoS is a
feature on some routers that lets you prioritize traffic computer is included in the list of allowed
according to the type of data being transmitted. connections.
Common Router problems and
Router Troubleshooting Tools
solutions
5. Check Wireless Signal Limitations • Using Router Diagnostic Commands
– If you have a newer router, check if it supports the – Cisco routers provide numerous integrated
5GHz band. Newer routers typically have dual- commands to assist you in monitoring and
band capabilities. troubleshooting your internetwork.
– By allowing dual bands, you could hold older
devices that only support slower G specification
on the 2.4GHz band and newer devices on the
beefier and faster 5GHz band.
– Essentially, this is like having two routers in one.

Using show Commands


Commonly used show commands
• show interfaces

– The show commands are powerful monitoring –
show interfaces ethernet
show interfaces tokenring
and troubleshooting tools. – show interfaces fddi
• Monitor router behaviour during initial installation – show interfaces atm
– show interfaces serial
• Monitor normal network operation
• show controllers
• Isolate problem interfaces, nodes, media, or – show controllers mci
applications – show controllers token
• Determine when a network is congested – show controllers FDDI
• Determine the status of servers, clients, or other – show controllers LEX
neighbours – show controllers ethernet
– show controllers E1
– show controllers cxbus

Using debug Commands


Commonly used show commands
• show running-config – The debug privileged exec commands can provide
• show startup-config a wealth of information about

• show flash the traffic being seen (or not seen) on an interface,
• error messages generated by nodes on the network,
• show buffers • protocol-specific diagnostic packets, and
• show memory • other useful troubleshooting data.
• show processes
• Show stacks
• show version

Router Diagnostic Commands Router Troubleshooting Tools


• Using the ping Command
– To check host reachability and network connectivity, use
the ping exec (user) or privileged exec command. • Using the trace Command
– After you log in to the router or access server, you are
automatically in user exec command mode. The exec – The trace user exec command discovers the
commands available at the user level are a subset of those routes that a router’s packets follow when
available at the privileged level.
– In general, the user exec commands allow you to traveling to their destinations.
• connect to remote devices, – The trace privileged exec command permits the
• change terminal settings on a temporary basis,
• perform basic tests, and list system information.
supported IP header options to be specified,
– The ping command can be used to confirm basic network allowing the router to perform a more extensive
connectivity on AppleTalk, ISO Connectionless Network range of test options.
Service (CLNS), IP, Novell, Apollo, VINES, DECnet, or XNS
networks.
IPS DEPLOYMENT
IPS CONFIGURATION
IPS Network Sensing
• Network sensing - accomplished using Cisco
IPS sensors and Cisco IOS IPS devices.
• Cisco IPS sensors and Cisco IOS IPS devices -
IPS devices or sensors.
Capturing Network Traffic
.-> sensor can operate in either promiscuous or
inline mode.

Capturing Network Traffic Capturing Network Traffic


• When responding to attacks, the sensor can • IP session logs are used to gather information about
do the following: unauthorized use.
– Insert TCP resets via the sensing interface. • Implement multiple packet drop actions to stop
worms and viruses.
– Make ACL changes on switches, routers, and
firewalls that the sensor manages.
– Generate IP session logs, session replay, and
trigger packets display.

Correctly Deploying the Sensor Tuning the IPS


• Ensures that the alerts you see, reflect true
• Before deploy and configure the sensors, actionable information.
check: • Tips:
– The size and complexity of your network. – Place your sensor on your network behind a
– Connections between your network and other perimeter-filtering device.
networks, including the Internet. – Deploy the sensor with the default signatures in
– The amount and type of traffic on your network. place.
• Always position the IPS sensor behind a perimeter- – Make sure that the event action override is set to
filtering device. drop packets with a risk rating greater than 90.
• Correct placement significantly reduces the number of
alerts, which increases the amount of actionable data you can
use to investigate security violations.
IPS Configuration
Tuning the IPS
Procedure
– Filter out known false positives caused by Step 1: Install and connect the device to your network. Install the
specialized software, such as vulnerability scanner device software and perform basic device configuration. Install
the licenses required for all of the services running on the
and load balancers
device.
– Filter the Informational alerts. Step 2: Add the device to the Security Manager device inventory.
– Analyse the remaining actionable alerts: Step 3: Configure the interfaces as described in Configuring
• Research the alert. Interfaces.
• Fix the attack source. Step 4: Use the Virtual Sensors policy to assign interfaces to the
• Fix the destination host. virtual sensors.
• Modify the IPS policy to provide more information Step 5: Configure basic device access platform policies.
Step 6: Configure basic server access platform policies.
Step 7: Configure the Logging policy if you want non-default
logging.

Procedure Identifying Allowed Hosts


Step8 : Configure IPS signatures and event Step 1: Do one of the following to open the
actions. Allowed Hosts policy:
Step 9: Configure blocking or rate limiting hosts. - (Device view) Select Platform > Device
Step 10: Configure other desired advanced IPS Admin > Device Access > Allowed Hosts from the
services. Policy selector.
Step 11: Maintain the device - (Policy view) Select IPS > Platform >
Step 12: Monitor the device Device Admin > Allowed Hosts, then select an
existing policy or create a new one.

Identifying Allowed Hosts Identifying Allowed Hosts


Step 3: When adding or editing an entry, specify
Step 2: Do one of the following: the host or network address in the Add or
- To add an entry, click the Add Row button Modify Access List dialog box, then click OK. You
and fill in the Access List dialog box. can enter addresses using the following formats:
- You can add up to 512 entries. - Host address—A simple IP address, such
- To edit an entry, select it and click the as 10.100.10.10.
Edit Row button. - Network address—A network address
- To delete an entry, select it and click the and mask, such as 10.100.10.0/24 or
Delete Row button. 10.100.10.0/255.255.255.0.
Identifying Allowed Hosts Configuring SNMP
- A network/host policy object—Click Select to Step 1: Do one of the following to open the
select an existing object or to create a new one. SNMP policy:
To use the object in this policy, it must have a - (Device view) Select Platform > Device
single value, either a single network or a single Admin > Device Access > SNMP from the Policy
host. selector.
- (Policy view) Select IPS > Platform >
Device Admin > Device Access > SNMP, then
select an existing policy or create a new one.

Configuring SNMP Configuring SNMP


Step 2: On the General Configuration tab, Step 4: If you configure trap destinations, you
configure at least the following options. must also ensure that the desired alerts include
– Enable SNMP Gets/Sets the Request SNMP Trap action. You have the
– Read-Only Community String following options for adding this action:
– Read-Write Community String - Easy way
Step 3: If you want to configure SNMP traps, click the - Precise way
SNMP Trap Configuration tab and configure at least the
following options.
Step 5: Add the SNMP management stations to
the Allowed Hosts policy. The management
- Enable Notifications
stations must be allowed hosts to access the
- Trap Destinations
sensor.

IPS user accounts, and Security • Understanding IPS User Roles


Manager discovery and • Understanding Managed and Unmanaged IPS
Passwords
deployment considerations
• Understanding How IPS Passwords are
Discovered and Deployed
• Configuring IPS User Accounts
• Configuring User Password Requirements
• Configuring AAA Access Control for IPS
Devices
Understanding Managed and
Understanding IPS User Roles Unmanaged IPS Passwords
• Four User Roles: • The status of a password is indicated in the Is
– Viewer Password Managed? column of the Platform >
– Operator Device Admin > Device Access > User
– Administrator Accounts policy:
– Service - No - the password for this account is not
configured in Security Manager.
- Yes - the password for this account was
configured or updated in Security Manager.

Understanding How IPS Passwords


Configuring IPS User Accounts
are Discovered and Deployed
• Discovery • The user accounts policy should have at least
– Active these accounts:
– Expired – Cisco
– Locked – An administrator account
• Deployment – Cisco IOS IPS devices use the same user accounts
that are defined for the router

Configuring User Password Configuring AAA Access Control for


Requirements IPS Devices
• To configure IPS password requirements, • When you configure the AAA server object,
select one of the following policies: you must adhere to the following restrictions:
– Device view – Host
Select Platform > Device Admin > Device Access > – Timeout
Password Requirements from the Policy selector. – Protocol
– Policy view – Key
Select IPS > Platform > Device Admin > Password – Port
Requirements from the Policy Type selector,
then select an existing policy or create a new
one.
Suricata
• Open Source Next Generation Intrusion
Detection and Prevention Engine.
Configuring Suricata • Rule-based ID/PS engine
• Multi-threading

Installing Suricata Add the Suricata PPA


1. Add the Suricata PPA
2. Install Suricata # apt-get install software-properties-
common
3. Add a 'suricata' user
# add-apt-repository ppa:oisf/suricata-
4. Edit Suricata default mode and configure
stable
Suricata run as service user
# apt-get update
5. Ensure that Suricata log directory is owned
by 'suricata' user
6. Start Suricata
7. Verify that Suricata is running as the
'suricata' user

Install Suricata Edit Suricata default mode and


configure Suricata run as service
# apt-get install Suricata user
# editor /etc/default/suricata
Add a 'suricata' user
# useradd -r -s /usr/sbin/nologin suricata

Ensure that Suricata log directory Verify that Suricata is running as


is owned by 'suricata' user the 'suricata' user
# chown -R suricata:suricata /var/log/Suricata • # ps aux | grep suricata suricata

Start Suricata 28296 107 59.9 366140 304160 ? Ssl 22:47 0:05
# service suricata start /usr/bin/suricata -c /etc/suricata/suricata.yaml --
pidfile /var/run/suricata.pid -i eth0 -D -v --
user=suricata
Snort Configuring Snort
• Open Source NIDS • Setting up Snort on Ubuntu from the source
• Packet sniffer code consists of a couple of steps:
• Works through traffic analysis and packet downloading the code, configuring it,
logging on IP networks. compiling the code, installing it to an
appropriate directory, and lastly configuring
• Runs in 4 modes: the detection rules.
– Sniffer mode
– Packet logger mode
– IDS mode
– IPS mode

Configuring Snort to run in NIDS Setting up username and folder


mode structure
• Editing some configuration files - Create a new unprivileged user and a new user
• Downloading the rules that Snort will follow group
• Taking Snort for a test run sudo groupadd snort
sudo useradd snort -r -s /sbin/nologin -c
SNORT_IDS -g snort
sudo ldconfig - Create the folder structure
sudo ln -s /usr/local/bin/snort /usr/sbin/snort sudo mkdir -p /etc/snort/rules
sudo mkdir /var/log/snort
sudo mkdir /usr/local/lib/snort_dynamicrules
Setting up username and folder
Setting up username and folder
structure
structure
• Set the permissions • Create new files for the white and blacklists
sudo chmod -R 5775 /etc/snort sudo touch /etc/snort/rules/white_list.rules
sudo chmod -R 5775 /var/log/snort sudo touch /etc/snort/rules/black_list.rules
sudo chmod -R 5775 sudo touch /etc/snort/rules/local.rules
/usr/local/lib/snort_dynamicrules
sudo chown -R snort:snort /etc/snort copy the configuration files
sudo chown -R snort:snort /var/log/snort sudo cp ~/snort_src/snort-2.9.16/etc/*.conf*
sudo chown -R snort:snort /etc/snort
/usr/local/lib/snort_dynamicrules sudo cp ~/snort_src/snort-2.9.16/etc/*.map
/etc/snort
Configuring – network and rule
Download – detection rules
sets
• Provides three tiers of rule sets - Open the configuration file in test editor
– Community - Setup the network addresses to protect
– Registered - Setup the external network addresses
– Subscriber rules
- Set path to rule files

- Validating Settings

You might also like