CCNP Security PDF
CCNP Security PDF
Firewall:
In computing, a firewall is a network security system that monitors
and controls the incoming and outgoing network traffic based on
predetermined security rules
2. Stateful filtering
maintains the state of packet passing through the ASA to allow
reply traffic.
3. Application inspection
ASA can listen conversation b/w devices on one side and devices
on other side and can pay attention on the application layer
information
For example FTP
5. DHCP
Can act as DHCP server or client or both
6. Routing
Support routing protocols
also supports static routing
9. High availability:
Active-Standby Failover
Active-Active Failover
Firewall modes
1. Routed firewall mode
2. Transparent firewall mode
Transparent mode:
Introduced after software version 7.0
Can be deployed as secure bridging mode, as a layer 2
Acts like bump in the wire and is not considered as router hop
Static routes are only used for traffic originating from the appliance
Only layer 3 addressing required is management IP address and
must be of same subnet as connected network
ASA Management:
ASA can be managed remotely via Telnet, SSH, HTTPs
By default, ASA cannot be managed remotely
To check the open ports on ASA :
1. SSH:
Steps:
b. Create a user in the local database that can be used for SSH
access
e. Set the duration for how long a SSH session can be idle before
the ASA disconnects the session
2. Telnet:
Steps:
a. Identify the IP addresses from which the ASA accepts
connections for each address or subnet, and the interface on
which you can use telnet.
b. Set the duration for how long a Telnet session can be idle before
the ASA disconnects the session
1. Management interface
2. Ip address – the management IP address is 192.168.1.1/24
3. DHCP server – so that a user connecting to management
interface receives an address between 192.168.1.2 and
192.168.1.254.
4. ASDM access – management hosts allowed
Routing:
Routing involves two basic activities:
Determining optimal routing paths
Transporting packets through a network
ASA supports:
1. Static route
2. RIP
3. EIGRP
4. OSPF
5. IS-IS
6. BGP
7. Multicast Routing
RIP:
EIGRP:
OSPF:
BGP:
It is an exterior gateway protocol. It uses TCP port 179.
On ASA, you can run only 1 instance of RIP, EIGRP, BGP each and 2
instance of OSPF
Access-control List:
Access control lists (ACLs) identify traffic flows by one or more
characteristics, including source and destination IP address, IP
protocol, ports, EtherType, and other parameters, depending on
the type of ACL.
ACL supported by ASA:
1.Extended ACL
Can be used in routed and transparent mode
Main type of ACL which is used on ASA
Can be used to permit or deny traffic through the device
Can be used match traffic for many features like service policies,
AAA rules, WCCP, Botnet Traffic filter, VPN etc.
2. Ethertype ACL:
Can be used in transparent mode
Can be used permit or drop traffic based on the Ethertype value
in the layer-2 packet
3.Webtype ACLs
Webtype ACLs are used for filtering clientless SSL VPN traffic
Supported in routed mode only
4.Standard ACLs
Supported in routed and transparent mode
Cannot be applied to an interface
Can be used in route filtering and redistribution
5. Time-based ACL
Can apply time range objects to extended and Webtype ACE so
that rule are active for a specific period.
Points to remember:
1. When a new ACE is added to an existing ACL, it is appended to
the end of the ACL. If you want to add a new ACE in middle or
at top use “line” keyword when configuring ACL.
2. By default, you do not need to define an ACE to permit traffic
from higher security level to lower security level
3. An access-list can be applied to an interface or globally (on all
interfaces)
4. ACL can even be used to filter to the box traffic by using
“control-plane” at the end of “access-group” command
5. ACL can be temporarily disabled by using “inactive” keyword.
If you have an interface acl and global acl together.
ASA will match traffic with interface acl first.
if traffic is matching with interface acl, ASA will not check the
global ACL
if traffic is not matching with interface ACL, then it will be
checked as per global ACL.
Object:
Objects make configuring and maintaining your configuration
easy because you can modify an object in place and have it be
reflected in all other places that are referencing it.
1. Network object:
A network object can contain a host, a network IP address, a
range of IP addresses, or a fully qualified domain name (FQDN)
You can also enable NAT rules on the object
2. Service object:
Can contain a single protocol specification
2. Object-group Service:
A service object group includes a mix of protocols
3. Object-group icmp-type:
A icmp-type object group includes various icmp types
4. Object-group protocol:
Can be used to include IP protocols into one object
5. Object-group user:
Can be used to support the identity firewall
6. Object-group security:
Can be used to support Cisco TrustSec.
NAT: Network Address Translation
Why to use NAT:
1. To access internet from private network
2. To hide the real IP address
3. Resolve IP routing problems, such as overlapping subnets
NAT is composed of two steps:
a. the process by which a real address is translated into a mapped
address
b. the process to undo translation for returning traffic
Regular NAT can only consider the source addresses, not the
destination address
Types of NAT:
1. Dynamic NAT
2. Dynamic PAT
3. Static NAT
4. Static PAT
Dynamic NAT
Translates a group of real(private) addresses to public IP address
drawn from a pool of registered(public) addresses that are routable to
destination
network
Address are handed out on first come, first server basis
Used for unidirectional communication only
Default timeout is 3 hours can be changed
Dynamic PAT
Translates a group of real (private) addresses that are mapped to a
single mapped IP address by using a combination of mapped IP
address and source port number
Unidirectional communication only
Default timeout is 30 seconds and cannot be changed
Static NAT
Creates a fixed translation (one-to-one) of real address to mapped
address
Allows bi-directional communication
Entry will remain permanent in nat translation table
Static PAT
Static PAT is similar to static NAT, with exception that it allows for
specifying the layer 4 port information for the real and mapped
address
Entry will remain permanent in nat translation table
Policy NAT
Similar to static NAT, but it allow for defining a conditional
criterion to check for source address and destination address to
determine address translation
Policy NAT with different destination ports
Bypassing NAT:
1.Identity NAT (nat 0 command)
If you configure Identity NAT for a source address, ASA will bypass
NAT no matter what is the egress interface
Identity NAT allows unidirectional communication
2.Static identity NAT (static command)
With static NAT you translate the real IP address into its own IP
address
Allows bidirectional communication
DNS Doctoring:
DNS Doctoring is used on the Adaptive Security Appliance (ASA) to
change the embedded IP addresses in Domain Name System (DNS)
responses so that clients can connect to the correct IP address of
servers. ASA re-writes DNS A record information.
DNS doctoring requires:
1. Configuration of NAT on ASA with “dns” keyword
Why??
1. If you are a service provider and want to sell security services to
many customers.
2. If you are a large enterprise or a college campus and want to keep
departments completely separate.
3. You have any network that requires more than one ASA.
Command to boot ASA in multiple mode (Changing the ASA mode
requires rebooting the firewall)
System configuration:
System context is only used for configuring multiple security
contexts in a multiple mode
This is the place from where you add and manages contexts by
configuring
a. Configuration location
b. Allocated interface
c. Configure failover
You cannot configure any network interface or network setting for
system configuration.
If you are allocating any interface to security context, make sure
you enable that interface from system configuration
You can directly jump from one security context to other security
context
You can share an interface in more than one security context, if sharing
then each interface should have a unique MAC address.
2. Manual configuration:
How the ASA Classifies Packets to determine to which security context
to send a packet.
1.Unique interface
If only one context is associated with the ingress interface, the
ASA classifies the packet into that context.
3.NAT configuration
If you do not enable use of unique MAC addresses, then the ASA
uses the mapped addresses in your NAT
configuration to classify packets.
Recommended is you use MAC address instead of NAT
Resource Management:
By default, all security contexts have unlimited access to the
resources of the ASA, except where maximum
limits per context are enforced
Resource Class:
The ASA manages resources by assigning contexts to resource
classes
Each context uses the resource limits set by the class
All contexts belong to the default class if they are not assigned to
another class
A context can only be assigned to one resource class
Default Class:
All contexts belong to the default class if they are not assigned to
another class
If a context belongs to a class other than the default class, those
class settings always override the default class settings
If the other class has any settings that are not defined, then the
member context uses the default class for those limits
The default class provides unlimited access to resources for all
context, except for the following
Configuring a class:
Transparent Firewall:
Configuring transparent firewall on ASA 8.0 and 8.4 is different.
A transparent firewall, on the other hand, is a Layer 2 firewall that
acts like a “bump in the wire,” or a “stealth firewall,” and is not
seen as a router hop to connected devices
The ASA connects the same network on its inside and outside
interfaces, because ASA is not a router hop.
ARPs are allowed through the transparent firewall in both
directions without an access list which can be controlled by
enabling arp-inspection
Static routes are only used for traffic originating from the
appliance
Only layer 3 addressing required is management IP address and
must be of same subnet as connected network
Routing protocol to the device is not supported, but through the
device is allowed.
BPDUs are passed by default. Use Ethertype ACL to deny them
The Egress interface of a packet is determined by performing MAC
address lookup instead of route lookup.
Route lookup is used for the traffic originating through the device.
Broadcast and multicast packets are not permitted by default;
explicit ACL rules are
required
You can configure only two interfaces.
Unsupported features:
1. DHCP relay
2. Dynamic routing protocols
3. QoS
4. VPN termination for through traffic
ARP Inspection:
ARP inspection prevents malicious users from impersonating
other hosts or routers (known as ARP spoofing).
ARP spoofing can enable a “man-in-the-middle” attack.
ARP inspection ensures that an attacker cannot send an ARP
response with the attacker MAC address.
When you enable ARP inspection, the ASA compares the MAC address,
IP address, and source interface in all ARP packets to static entries in
the ARP table, and takes the following actions
If the IP address, MAC address, and source interface match an
ARP entry, the packet is passed through.
If there is a mismatch between the MAC address, the IP address,
or the interface, then the ASA drops the packet.
If the ARP packet does not match any entries in the static ARP
table, then you can set the ASA to either forward the packet out
all interfaces (flood which is default action), or to drop the packet.
Failover:
Configuring failover requires two identical ASAs connected to
each other through a dedicated failover link
Both units must have a same number and types of interface, same
model, same RAM installed.
Both units must be in same operating mode
They must have same major and minor number (can use different
version of software during an upgrade process)
Units do not need to have identical licenses
ASA supports two types of failover
1. Active/Standby Failover
Only one unit passes the traffic while other unit waits in a standby
state
Available in both single mode and multiple context mode
2. Active/Active Failover
Both unit can pass the traffic
Available only if units are running in multiple context mode
Failover link:
You can use any unused interface on the devices as the failover
link
The failover link interface is not configured as a normal
networking interface (only for failover)
Can also be used as Stateful failover link
Stateless Failover:
When a failover occurs, all active connections are dropped
Clients need to reestablish connections when the new active unit
takes over
Stateful Failover:
The active unit continually passes per-connection state
information to the standby unit
After a failover occurs, the same connection information is
available at the new active unit.
State information passed to standby unit:
NAT translation table
TCP connection states
UDP connection states
The ARP table
The Layer 2 bridge table (when running in transparent firewall
mode)
The HTTP connection states (if HTTP replication is enabled)
The ISAKMP and IPsec SA table
ICMP connection state
State information not passed to standby unit:
The HTTP connection table (unless HTTP replication is enabled).
The user authentication (uauth) table.
DHCP server address leases
Interface Monitoring:
You can monitor up to 250 interfaces divided between all contexts
3.ARP test:
A reading of the unit ARP cache for the 2 most recently acquired
entries
The unit sends ARP requests to these machines
After each request, the unit counts all received traffic for up to 5
seconds. If traffic is received, the interface is considered
operational
If no traffic has been received, the ping test begins
4.Ping test:
A ping test that consists of sending out a broadcast ping request.
The unit then counts all received packets for up to 5 seconds
If all network tests fail for an interface, but this interface on the
other unit continues to successfully pass traffic, then the interface
is considered to be failed
Failover is triggered if:
1. The unit has a hardware failure or a power failure.
2. Too many monitored interfaces fail.
3. You force a failover
ASA Troubleshooting:
1. Packet flow:
Packet flow (before ASA 8.3)
Packet capture:
Packet Tracer:
TCP Ping:
Accelerated Security Path:
The Accelerated Security Path (ASP) on the ASA appliance
comprises of 2 components
The Fast Path and The Session Management Path
Fast Path:
If the connection is already established, the security appliance
does not need to re-check packets and the packets are sent to the
Fast Path. The Fast Path is responsible for the following tasks:
a. IP checksum verification
b. Session lookup
c. TCP sequence number check
d. NAT translations based on existing sessions
e. Layer 3 and Layer 4 header adjustments
Control Path:
Some packets which require adjustments or changes to be made
to the packets headers at a Layer 7 level such as FTP are passed to
control plane path
State table:
ASA is a Stateful packet filtering device, so whenever a packet is
inspecting by firewall it maintains the state of the packet. ASA
maintains two tables
1. Connection table:
2. Local host table:
DHCP Services:
ASA can be configured as DHCP server, DHCP relay agent, and as a
DHCP client
In above configuration
DHCP server is connected on outside interface of ASA
DHCP clients are connected on inside interface of ASA
DHCP pool must be of same subnet as of ASA’s inside interface
subnet
Modular policy framework
Policy maps:
OSI Layers 3-4 policy map: Defines policy for Layer 3 and Layer 4
traffic
OSI Layers 5-7 policy map: Defines policy for Layer 5 through
Layer 7 traffic
Service Policy:
Applies a policy map to an interface, or globally to all interfaces
Policy directionality depends on the policy map application
a. Per interface: Classification and actions are applied in both
direction
b. Globally: Classification and actions are applied to all interfaces
in the inbound direction
c. Exceptions for policing, shaping, and prioritizing
Session Timers
Sessions are deleted from the connection table based on TCP
connection close events, or idle timeouts
The connection table performs periodic garbage collection for TCP
connections based on additional timeouts
These timeouts may be too aggressive for specific applications
TCP Timer Default Description
Embryonic 30 Defines the time the ASA will wait
connection timeout seconds for a SYN/ACK reply to a SYN
Half-closed 10 Defines the time a TCP connection
connection timeout minutes can be FIN-closed in one direction
Connection timeout 1 hour Defines the time a TCP connection
can be idle
IP TTL Handling
The Cisco ASA does not by default decrement the IP TTL field
As a consequence, ASA is invisible in traceroute outputs
You may enable TTL decrementing for specific or all flows
Configuration Example:
Static Database
You can manually add bad or good hostnames and IP addresses to
the static database
Bad names are added to the blacklist; good names are added to
the whitelist
The cisco ASA performs a DNS lookup for all statically added
names, and adds mappings to the DNS caches
When a new connection is initiated, its source and destination IP
addresses are compared with entries in the DNS host cache
Command Description
Show dynamic-filter data Displays dynamic database
information
Show dynamic-filter dns-snoop Displays the DNS reverse-lookup
cache
Show dynamic-filter statistics Displays how many connections
were classified with the Botnet
Traffic Filter
Show dynamic-filter reports top Generate reports on the top 10
malware-sites malware sites
Static route tracking:
One problem with the use of static routes is that no inherent
mechanism exists that can determine whether the route is up or
down. The route remains in the routing table even if the next hop
gateway becomes unavailable
Static route tracking allows the ASA to use an inexpensive
connection to a secondary ISP in the event that the primary
leased line becomes unavailable. In order to achieve this
redundancy, the ASA associates a static route with a monitoring
target that you define. The Service Level Agreement (SLA)
operation monitors the target with periodic ICMP echo requests.
If an echo reply is not received, then the object is considered
down, and the associated route is removed from the routing
table. A previously configured backup route is used in place of the
route that is removed. While the backup route is in use, the SLA
monitor operation continues its attempts to reach the monitoring
target. Once the target is available again, the first route is
replaced in the routing table, and the backup route is removed.
Configuration:
Step1: enter below command to track a static route
Step2: define the backup route to use when tracked object is not
available
Vpn definition
VPNs protect data that is transmitted over a public or shared
infrastructure such as the internet from threats such as man-in-
the-middle attacks
Virtual Logical network association, independent of
physical architecture
Eavesdropping attacks
A packet sniffer is a software application that uses a network
adapter card in promiscuous mode to capture all network packets
Packet sniffers exploit information passed in clear text. Protocols
that pass information in the clear text include the following:
Telnet, FTP, SNMP, POP, HTTP
Several solutions for man-in-the-middle attacks are
a. A firewall system randomizes TCP sequence numbers
b. Implement a VPN with encryption
Masquerading attacks:
A masquerading attack is where as individual hides their identity,
possibly even assuming someone else’s identity, example: IP
spoofing
IP spoofing occurs when a hacker inside or outside a network
impersonates the conversation of a trusted computer
A man-in-the-middle attack is implemented using the following
two general techniques are used during IP spoofing:
a. A hacker uses an IP address that is within the range of trusted
IP
b. A hacker uses an authorized external IP address that is trusted
The most common solution is to use a packet integrity check
system, which is implemented with a hashing function
Man-In-The-Middle
A man-in-the-middle attack requires that the hacker have access
to network packets that come across a network
A man-in-the-middle attack is implemented using the following:
a. Network packet sniffers
b. Routing and transport protocols
Several solutions for man-in-the-middle attacks are:
a. A firewall system randomizes TCP sequence numbers
b. VPNs provide three tools to combat man-in-the-middle attacks:
device authentication, packet integrity checking, and
encryption
VPN Types
Site-to-Site VPNs
Remote Access VPNs
VPN components:
Authentication
a. Device
b. User
Encapsulation method
Data encryption
Packet integrity
Key management
Non-repudiation
Application and protocol support
Address management
CRYPTOGRAPHIC ALGORITHMS INTEGRITY ALGORITHMS
DES MD5
Triple DES SHA
AES
Confidentiality:
Provided by encryption
Encryption is the process of converting clear text to cipher text
Decryption is the process of converting cipher text to clear text
Integrity:
Hashing is a mechanism that is used for integrity assurance
It provides a one-way, fast transformation of arbitrary-length
input data into a fixed-length digest (hash)
Examples of hash functions are MD5, SHA-1, SHA-256, SHA-384,
SHA-512
Use larger key-sized algorithm when possible
HMAC:
An enhancement of the hash function
Used for integrity assurance
Uses a secret key (that is shared between trusted parties as part
of input)
Comparison
Digital signatures:
Asymmetric digital signature algorithms also provide integrity:
a. The sender generates a digital signature over data by using a
private (signing) key and appends it to the data
b. The receiver verifies the signature by using a public
(verification) key
Digital signatures use a combination of hash algorithm (such as
SHA-1) with an asymmetric algorithm (such as RSA)
Next-Generation Encryption
Some older algorithms (and key sizes) do not provide adequate
protection from modern threats.
NGE provides security and scalability requirements for the next
two decades (AES-GCM mode, SHA-2, ECDH-384, ECDSA-384)
Older algorithms NSA Suite B
DES GCM
3DES GMAC
RSA ECDSA
MD5 SHA-256
SHA-384
SHA-512
SHA-1 ECDH
Keys in cryptography
Keys are used for all of these three critical VPN functions:
Encryption, Packet Integrity Checking, Authentication
Key management deals with the secure generation, verification,
exchange, storage, revocation, and destruction of keys
Key generation is the process of generating keys for cryptography.
A key is used to encrypt and decrypt whatever data is being
encrypted/decrypted
The security of a symmetric cryptosystem is a function of two
things; the strength of the algorithm and the length of the key
Key exchange (also known as “key establishment”) is any method
in cryptography by which cryptographic keys are exchanged
between users, allowing use of a cryptographic algorithm
However distributed, keys must be stored securely to maintain
communication security
Public Key Infrastructure
Public key cryptosystems can provide strong authentication
services
Entities need public keys of other entities before using any RSA-
based service:
Over untrusted channels, public keys must be exchanged securely
Public keys must not be intercepted and changed during a key
exchange
Authenticity of the public keys of other entities is paramount
IKEv2:
Documented in RFC 4306
Runs over UDP to destination port 500
There are two to five messages for basic exchange
IKEv2 creates the child SAs within the same negotiation, instead
of using a phased approach
Uses a cookie mechanism to prevent DoS attacks from forged
source addresses
Requires fewer round-trip exchanges compared to IKEv1
Has built-in DPD
Has built-in configuration payload and user authentication mode
(EAP)
Uses unidirectional authentication methods
Has built-in NAT traversal
Provides better rekeying and collision handling
Benefits Limitations
Simplified configuration No multiprotocol support – IP only
Flexible interface feature No Cisco IOS Software stateful IPSEC
support failover support
Multicast support
Improved scalability (fewer
security associations)
Simple routing protocol
integration for scalability and
redundancy
Deployment Choices
Configuration choice
Over of GRE:
Simple tunneling protocol with minimum overhead
IETF standard
IP protocol 47 define GRE packets
GRE header fields:
a. GRE version number
b. Payload protocol type
c. Checksum (optional), Tunnel Key (optional), Sequence Number
(optional)
Gre over IP
R2 configuration
R4 configuration
GRE over IPsec
R2 configuration
R4 configuration:
R2 configuration
R4 configuration
2. Access of only one device( nat on only one peer)
On R4
VRF aware IPsec:
Virtual Routing and Forwarding
A VRF is a Virtual Routing and forwarding instance, it's basically
a virtualization technique for IOS routers. Each VRF has its own
interfaces (you cannot put a L3 interface in 2 different VRFs), it
has its own routing table and everything.
Most commonly VRF is associated with MPLS service provider
In cisco terminologies, deployment of VRF without MPLS is VRF
lite.
Configuration
Command to configure VRF:
R4 configuration:
Overview of Cisco IOS DMVPN
DMVPN provides fully meshed connectivity with simple
configuration of hub and spoke
Supports dynamically addressed spokes
Facilitates zero-touch configuration for addition of new spokes
Features automatic IPSEC triggering for building and IPSEC tunnel
Building blocks of DMVPN
(m)GRE NHRP IKE + IPSEC
Provides a scalable Provides dynamic Provides key
multiprotocol mutual discovery of management and
tunneling framework spokes transmission
with optional protection
dynamic routing
All DMVPN members Spokes use NHRP to GRE tunnels use IPSEC
use GRE or mGRE inform the hub about encapsulation; spokes
interfaces to build their inner (tunnel) have permanent IKE
GRE tunnels between and outer (physical sessions with the hub
devices interface) IP and on-demand
addresses and query sessions between
about the mapping of themselves
other spokes
DMVPN Deployment Models
NHRP
NHRP provides a mechanism to dynamically learn the IP addresses
of the spokes
A client-server protocol: the hub acts as the server and spokes are
clients
The hub maintains a database of all external (physical) and
internal (tunnel) addresses of the spokes
Each spoke registers its addresses when it boots
(m)GRE-NHRP integration
mGRE (and IPSEC in DMVPN) uses NHRP to create dynamic
tunnels
the hub learns the spoke addresses in order to create GRE tunnels
to them
spokes query the server to resolve external addresses of other
spokes and create dynamic GRE tunnels to them
DMVPN operations
DMVPN initial state
Initially, all spokes register with the hub
Hub has a static physical IP address
Spokes can be statically or dynamically (physically) addressed
NHRP mappings are created
Spoke-to-hub GRE and IPSEC tunnels are created
All traffic from the spoke is forwarded
Dynamic Spoke-to-Spoke Tunnel Creation
1. A PC (192.168.2.10) inside the left spoke network wants to
communicate with a server (192.168.3.10) inside the right spoke
network. It sends a packet toward the server
2. The left spoke router finds the destination network
(192.168.3.0/24) reachable over the 10.1.1.3 next hop on its
mGRE interface
3. The left spoke router does not find a mapping for the 10.1.1.3
next hop in its NHRP cache and consults the NHRP server
4. The hub resolves the 10.1.1.3 tunnel next hop to the 17217.3.34
physical interface address of the right spoke (based on its NHRP
registration)
5. The response triggers the creation of dynamic GRE/IPSEC tunnel
between spoke physical addresses. The answer from the NHRP
server is cached on the spoke
6. Now that the tunnel has been built, traffic can flow directly
between left spoke network and right spoke network. Note that
traffic cannot flow directly flow in other direction yet.
7. When the web server replies to the client traffic, the same
sequence of NHRP and GRE/ISPEC processes occur. Because there
is already a GRE/IPSEC tunnel in place, a duplicate tunnel is
avoided
8. After a configurable timeout value, NHRP entries on the spoke
routers time out, causing the dynamic spoke-to-spoke tunnel to
be torn down
Types of Authentication
Pre-shared keys
PKI-based IKE authentication
Deployment Choice:
In a hub-and-spoke DMVPN, either choice is acceptable
In fully meshed DMVPNs, PKI-based authentication is highly
recommended
Verify DMVPN
Command Description
Show interface tunnel Verifies the state of GRE tunnels
Show ip nhrp Displays NHRP mapping information
on a device
Show ip nhrp nhs detail Displays NHRP next-hop server
information
Show dmvpn detail Verifies proper operation of DMVPN
control functions
Show ip route Verifies routing in the DMVPN
network
GETVPN:
Hardware client:
FlexVPN Architecture
Single configuration approach for all VPN types
IKEv2
Major protocol update
No backward compatibility with IKEv1
Provides many improvements
Per-peer features (QoS, firewall, policies, VRF reinjection)
Service aggregations (remote access, site-to-site)
Improved service management (AAA)
Multitenancy
Recommended for the future
IKEv2
IKEv2 message overview
Smart Tunnels
A lightweight connection broker applet:
Downloaded from the SSL VPN gateway
Intercepts sessions from designated applications
Forwards them across the SSL VPN session
Native applications on the client are unaware of the VPN session
No reconfiguration required on the client
For applications with native clients:
Create smart tunnel list
Assign smart tunnel list to a group policy or user profile
For web-based applications:
Add bookmark to bookmark list
Enable bookmark for smart tunnel access
Bind bookmark list to group policy or user profile
Configuration Tasks:
Install the Cisco AnyConnect client image
Enable Cisco AnyConnect SSL VPN on ASA
Enable SSL VPN access on an interface
Select identity certificate
Define an IP address pool
All assignment methods enabled by default
Authorization attribute obtained from AAA server
DHCP
IP address pools
Configure identity NAT for client access
Edit the default group policy or create a custom one:
Enable AnyConnect SSL VPN access
Optionally, configure split tunneling
Edit the default connection profile or create a custom one:
Select authentication method
Select the client address pool
DTLS Overview
Datagram Transport Layer Security
Standard protocol (RFC 4347), based on TLS
Equivalent security to TLS
UDP transport
Mitigates latency and bandwidth problems
Enabled by default
If enabled, takes precedence over SSL
SSL modes:
Clientless mode:
NAT-traversal:
he need for NAT Traversal is, due to AH and ESP Protocols running on
the end user desktop, the Firewall will not know how to PAT or NAT
These packets, NAT Traversal performs two tasks: Detects if both
ends support NAT-T Detects NAT devices along the transmission path
(NAT-Discovery) Step one occurs in ISAKMP Main Mode messages one
and two. If both devices support NAT-T, then NAT-Discovery is
performed in ISKAMP Main Mode messages (packets) three and
four. The NAT-D payload sent is a hash of the original IP address and
port. Devices exchange two NAT-D packets, one with source IP and
port, and another with destination IP and port. The receiving device
recalculates the hash and compares it with the hash it received; if they
don't match a NAT device exists. If a NAT device has been
determined to exist, NAT-T will change the ISAKMP transport with
ISAKMP Main Mode messages five and six, at which point all ISAKMP
packets change from UDP port500 to UDP port4500. NAT-T
encapsulates the Quick Mode (IPsec Phase2) exchange inside UDP4500
as well. After Quick Mode completes data that gets encrypted on the
IPsec Security Association is encapsulated inside UDP port4500 as well,
thus providing a port to be used in the PAT device for translation.
Configuration:
On R3 (configure nat)
On r2:
On r4:
Site-to-Site-vpn with ASA as ISP
ASA as ISP:
There will be no change on vpn peer configuration
Inspecting ESP traffic
Overview:
It is an enterprise class web proxy that provides a rich set of security
control features
These features includes
1. Web proxy incl. caching
(http, https, ftp, ftp over http)
2. Reputation filtering
3. Malware scanning
4. URL filtering
5. Application visibility & control
6. HTTPS inspection
7. Authentication
8. Reporting and tracking
9. Layer 4 traffic monitoring
Identities:
Used to classify the traffic and transctions into different groups,
so the different policies can be applied on the basis of identities
Identities also determine if user authentication is required for the
transaction
Identities are matched before authentication is done
SaaS policies:
Used to control access to third software service providers as
google apps and webex
Decryption policies:
Used to determine how to treat https traffic
Routing policies:
Used to determine which traffic should be sent to which upstream
proxy
Access policies:
Determine whether to allow, block, warn or redirect traffic based
on Acceptable use policy, web reputation, anti-malware and many
more
Always processed in top-down order
These are the final action except the monitor action
Use WPAD:
1. DHCP:
Higher priority than DNS
Ip DHCP provides the WPAD URL, no DNS lookup is performed
Passed as option 252 in the DHCP lease
2. DNS:
Example: client FQDN is praveen.trainers.networkbulls.local
Client browser will try the following URLs in order
http://wpad.trainers.networkbulls.local/wpad.dat
http://wpad.networkbulls.local./wpad.dat
http://wpad.local/wpad.dat
PAC Files:
It defines how web browser and other user agents can
automatically choose appropriate proxy server for fetching a
given URL
It contains a java script function
You might use it if your network is likely to change in future, you
can easily add, edit, or delete proxy servers in pac file and have
the change automatically effect all browsers
Can do failover, load balancing
PAC file can be located on a local machine which can be used for
testing the pac file before deploying it to the entire organization.
PAC file can also be hosted on a web server. You can also host the
pac file on the WSA
2. PBR
Resource-intensive for the router (performed in software)
Not available on cisco ASA
3. Layer 4 switch:
Redirects traffic based on port number and IP address
Can do simple load balancing and failover
4. Layer 7 switch
Like layer 4 switch, but can also redirect traffic based on URL
Can do load balancing and failover
URL Filtering
Cisco Ironport web usage control must be enabled
Control user access based on the URL category
Over 80 predefined URL categories (gambling, hacking, etc.)
Can create user-defined custom URL categories
Phase2:
If a category of a website can’t be determined in 1st phase, then
the WSA performs the URL keyword analysis to determine the
URL category
Phase3:
Dynamic content analysis engine can be used to dynamically
categorize a URL
It is recommended to have DCA feature enabled on cisco WSA for
best results
Streaming Media bandwidth control
The cisco AVC engine allows administrator to control the amount
of bandwidth used for particular application types
You can limit the bandwidth usage for the media application type
Two limit types:
Overall bandwidth limit
User bandwidth limit
If both are configured, the most restrictive option applies
Spoofing attacks
Spoofing of DHCP, ARP, and MAC addressing
Security violations:
1.Shutdown
Put the switchport in error-disable mode (shutdown mode)
Legitimate and unsecure MAC address’s traffic is dropped
Administrator needs to manually shut and no shut the interface in
order to recover the interface or can use “errdisable recovery
cause psecure-violation” global configuration mode command.
A log message is also generated about the event
2. Restrict
Restrict means that it will allow secure MAC addresses to use the
interface but will disallow any other mac addresses
Port doesn’t go in error-disabled state
A log message is also generated about the event
3. Protect
The only difference between the protect mode and restrict mode
is that protect does not log any cli message about the violation
Storm control
Prevent unicast, multicast, or broadcast storms
Monitors incoming traffic and block ports if thresholds are
breached
Can shut down a stormed port and send SNMP traps
IP source Guard
Tracks IP addresses to port associations, in order to protect
against spoofed IP addresses.
DHCP snooping must be configured to verify source IP addresses
It verifies source IP and MAC addresses
IP source guard should be configured on layer 2 untrusted ports
ARP Spoofing
It is another type of man-in-the-middle attack similar which we
seen in DHCP snooping, but it exploits the process of ARP
Attacker sends gratuitous ARP reply
Dynamic ARP Inspection
DAI tracks IP-to-MAC bindings from DHCP transactions to protect
against ARP poisoning
DAI associates each interface with a trusted state or an untrusted
state
Trusted interfaces bypass DAI
Untrusted interfaces undergo DAI validation
DHCP snooping is required to build a table with MAC-to-IP
bindings for DAI validation
Switch spoofing
Switch ports are configured as “dynamic auto” by default
The attacker presents itself as a switch and exploits DTP
The attacker gains access to all VLANs
VLAN Hopping
VLAN Hopping is possible when the following occurs:
An attacker is connected to an access switch port
An attacker send a double-tagged frame to a switch
The switch accepts 802.1Q tagged frames on an access port
The switch must have an 802.1Q trunk, and its native VLAN must
match the access VLAN of the attacker
2. Infrastructure-based
a. Infrastructure ACLs
Applied at the network edge and so help to protect the entire
infrastructure
Typically applied as an inbound ACL to limit network users or
external networks
Easy to configure if you have well organized ip addressing schema
The cisco devices, such as Cisco IOS software routers and switches and
Cisco ASA support the following logging destination
1. Console
2. Telnet or SSH
3. The internal in-memory buffer
4. Remote syslog server
5. Remote network management server (SNMP trap)
6. Cisco ASA GUI (ASA)
7. Email System (ASA)
Loose uRPF:
Prevents IP spoofing from “bogon” (invalid) networks
ISE
Authentication:
Determines the identity of an endpoint (device or user or both)
802.1x
MAC Authentication Bypass (MAB)
Web Authentication
VPN Authentication
Authorization:
dACL and Named ACL
For example, give employee permit access, and deny access to
contractor to sensitive subnets
No IP address change needed
Source Address replaced with the endpoint IP in ACL
VLANs
For example, VLAN 10 for Guests, VLAN 20 for Employees
No ACL required
Less recommended than ACL or Security Group Access
Modern Malware:
Malware evolves quickly and is mode difficult to detect
a. Traditional software used today for malware detection has
about a 40% detection success rate
b. Polymorphism accounts for much of this since similar classes of
malware can morph just enough to go undetected by the
original signature
Another reason is that legitimate user are easily enticed into
executing malicious code. Examples include spam, phising, spear
phishing
Attacker sophistication has increased as well and they are well
funded
a. State sponsored
b. Organized crime
Benefits:
a. The client connector is lightweight
b. Most of the detection processing done in the cloud
Historical perspective of malware activity
a. File Trajectory: shows the hosts where files were seen
Retrospective security
a. Ability to look back in time and trace processes
NGIPS:
Builds on classic IPS technology
Adds environmental awareness to IPS detection or contextual
awareness
Next-generation Firewall:
Combine the capabilities of traditional firewall like packet
filtering, NAT, VPN, QoS and features not traditionally found in
firewall products like IPS, reputation-based malware, application
aware
Cisco Firepower
Sourcefire Company was acquired by cisco in 2013.
Sourcefire was founded in 2001 and developed network security
hardware and software like firepower, AMP, Snort.
Firepower: Primarily designed to combine functionalities of different
security devices (NGIPS, NGFW, URL filtering, Malware protection).
Advanced Malware Protection: Offers malware analysis and protection
of networks and endpoints by using big data analytics to discover,
understand and block advanced malware outbreaks. Basically, it works
by doing continuous analysis and retrospective alerting.
Snort: An open source network IPS which uses signatures, protocols
and anomaly based inspection
So these were the main devices developed by cisco.
After acquiring Sourcefire, Cisco came on the top of NGIPS
Unified Threat Management (UTM):
A term introduced in 2004 that describes a category of security
devices which integrate a range of security features into a single
device
Combines firewall, gateway, antivirus and IPS capabilities
Main disadvantage is single point of failure
Cisco ASA with Firepower can provides services like cisco ASA
firewalling, AVC, URL filtering, NGIPS, and AMP.
Available on Cisco Firepower 4100 and 9300, Cisco ASA 5500-X
NGFW platforms with a Security Service Processor SSP
Software version must be 9.2.2 and later
Cisco Firepower Management Center and Cisco Security Manager
are used to manage Cisco ASA with Firepower services
On some of the appliances (5500-X, 5508-X, 5516-X), ASDM 7.3.x
can be used to manage single instance.
2. Control license:
Can implement user and application conditions to access control
rules
Default included in the purchase of an ASA Firepower module
3. URL Filtering:
Allows to configure access control rules that determine traffic that
traverses network based on URLs requested by monitored hosts
4. Malware:
With this, you can enable advanced malware protection, that is
used to detect and block malware in files transmitted over the
network
FireSIGHT components
1. FireSIGHT Management Center
Gathers and presents event data
Runs Correlation processes
Provides tools to manage the system
2. Managed Device
Provides detection and discovery services
Report events to the FMC
Used as NGFW or NGIPS
Managed Device:
Firepower managed device hardware:
Can run as NGIPS or NGFW
Device model numbers in the 7000 and 8000 range
Sometimes referred to as Series 3 devices
ASA with FirePOWER services:
Cisco ASA device configured with a FirePOWER Service
Module
All ASA models except the 5585 implement the
services module in software
The services module in the 5585 is a blade you insert in
the 5585’s chassis
The ASA retains all of it’s functionality
You can continue to manage it with the same software
you always used
The firepower service module is managed from the
FireSIGHT management center like any other firepower
device
Virtual NGIPS
Can only function as an NGIPS
Because it’s virtual, it doesn’t have the hardware
required to perform NGFW services
It does have the full functionality in detection and
blocking capability
Firesight management center
All managed devices report to the firesight
management center (FMC)
It performs the following functions:
- Gathers event data from devices
- Correlates event data
- Provides tools to manage and administer the
system
Firepower management center:
Provides unique management of NGFW, NGIPS, and NGAMP
Can be deployed using physical or logical appliance
In order to deal with their biggest challenges, customer need a simple,
scalable and threat focused solution model
System policy
Contains general system setting
You can apply these settings to both firesight
management center and managed devices
Some examples of what you would configure here
include the following:
- Device access list
- Database limits
- Time synchronization
Health policy
Lets you configure system health monitoring
The health sub-system consists of a series of modules
that monitor various aspects of system performance
Some examples of what you would configure here
include the following:
- CPU and memory utilization
- Disk utilization
- Interface status
NAT policy
Controls you network address translation configuration
This is only available to use on firepower devices
On ASA with firepower services, NAT is configured
through the ASA’s user interface
Correlation policy
Allows you to use data from events as correlation rule
criteria
When the rule conditions you configure are met, a
correlation event is generated
Some examples of event data you can draw from
include the following:
- Intrusion events
- Connection events
- User discovery events
IPS policy
Lets you manage IPS rules
You can configure IPS rule state
- Generate events
- Drop and generate events
- Disable
You can also configure automatic rule selection
Network analysis policy
You can manage IPS preprocessor configurations
You can select a network analysis policy to be the
default or use custom network analysis policies to
target specific networks
File policy
Lets you control file-type detection
Some examples of file-types you can detect include the
following:
- Executables
- Multimedia (audio / video / graphics)
- Documents (MS Office / PDF)
You can choose to block or log detected files
You can configure malware detection with a malware
license
SSL policy
You can configure rules to manage SSL sessions to
decrypt
You can also identify SSL traffic to pass undecrypted
Policy Relationships
The firesight system is configured through a series of policies
Some policies have relationships with other policies and some
stand alone
1. Stand-alone policies
System policy
Health policy
Nat policy
2. Policies related to each other
Access control policy
- IPS policy
- File policy
- Network analysis
- SSL policy
- Network discovery
- Correlation policy
Interface Configuration
Interface configuration demonstration for firepower devices
The firepower device offers the full set of configuration
options available
Other managed devices have limits on their interface
configuration options if they are not running firepower
hardware
- Virtual IPS
- ASA with Firepower Services
Aggregate Interfaces
Create a logical entity known as a Link Aggregation Group or LAG
Logical Interfaces
Logical interfaces support the following modes
Switched
Routed
Hybrid
- Switched and routed mode interfaces allow you
to create sub-interfaces that you can associate
with a VLAN
- Hybrid logical interfaces are used to bridge a
virtual switch to a virtual router
Passive mode
- Used in IDS deployments
- It is deployed out of band and has no impact on
production network traffic
- It can alert you but not block suspicious traffic
- Typically connected by way of a SPAN port or
Network Tap
Inline mode
- Used in IPS
- Inline interfaces work in pairs
- Production traffic does pass through the device
- Can issue alerts and block traffic
HA mode
- Used to configure clustered devices
- HA interfaces transmit connection and state
information to the clustered peer
Virtual Devices
Virtual entities that use your physical device interfaces to perform
network tasks
You can configure the following virtual devices
- Inline interface sets
- Virtual switches
- Virtual routers
Virtual switches
- Use switched mode interfaces
- When configured, the virtual switch performs like
a layer 2 physical switch
- Virtual switches support spanning tree protocol
Virtual routers
- Use routed interfaces
- When configured, the virtual provides the same
functionality as physical router
- Virtual router support both static and dynamic
routing protocols
Object Management:
Objects are item or value pairs of elements in your environment
They are used as rule matching criteria in the policies use
throughout the system
They are reusable and streamline the rule creating and
management process
Variable sets
Variables are components of IPS rules to identify addresses and
ports
Be as specific as possible and make sure variable configurations
are reflective of your environment
File lists
File lists work with the file policy exclusively
File policy is used for file-type detection and network-
based malware detection
File lists leverage features of network-based malware
detection
File lists required a malware license
Network-based malware detection uses cloud lookups for file
disposition information
The managed device calculated the SHA-256 hash of a
file detected in a network connection
The hash is sent to the cloud for evaluation
The cloud returns a disposition for the file: clean,
malicious or unknown
Consider these scenarios
The cloud returns a disposition of malicious for a file
you think has been wrongly convicted
The cloud returns a disposition of clean for a file you
believe is malicious or a file you don’t want to allow in
your environment
There are two file list objects you can use
Clean list: used to set a file’s disposition to clean
regardless of the disposition set by the cloud
Custom detection list: used to set a file’s disposition to
malicious regardless of the disposition set by the cloud
To add file to each of these list, you enter each files
SHA-256 hash into the list
Email:
Electronic mail, or email, is a method of exchanging digital
messages between people using digital devices such as
computers, tablets and mobile phones
Email Providers:
Email Protocols:
1. POP3: Post Office Protocol
By default POP3 works on two ports:
DNS A record:
Used to locate the IP address of the MTA specified by the MX
record
Groupware Server:
Server that accepts, forwards, delivers, and stores messages on
behalf of users
SMTP Client:
Initiates connection to an SMTP server
SMTP Server:
Receives connection requests from the SMTP client
Reputation filters:
Used to set up sender groups
Message Filters:
Custom rules that can compare any part of a message using
regular expression (only available using CLI)
Identifies message based on the message or attachment content,
information about the network, message envelope, message
headers, or message body
Antispam:
Uses preventive and reactive antispam applications to ensure
maximum spam prevention
Antivirus:
Uses multiple virus protection software applications to ensure
maximum virus protection
Outbreak Filters:
Quarantines suspicious email messages and holds the message
until an updated virus signature is available
Content Filters:
Similar to message filter but are applied after the message has
undergone message filters, anti-spam, and anti-virus scanning
Limited to scanning either incoming or outgoing messages
Encryption:
Supports using a cloud-based managed encryption service to
secure inbound and outbound email
Data Loss Prevention:
Prevents confidential data from leaving the customer networks
6. Outbreak filters:
Newly released viruses that do not have a published ID can be
blocked by stopping files with the infected file’s characterstics.
Provides zero day protection
Pre-defined Sendergroups
1. RELAYLIST
Outgoing mail will be relayed if the mail server IP address is
specified on the RELAYLIST
Uses RELAYED mail flow policy
2. WHITELIST
Add senders you trust to the WHITELIST sender group
Uses TRUSTED mail flow policy
3. BLACKLIST
Senders in the BLACKLIST sender group are rejected
Uses BLOCKED mail flow policy
4. SUSPECTLIST
This sender group uses the THROTTLED mail flow policy that
throttles, or slows, the rate of incoming mails
Uses THROTTLED mail flow policy
5. UNKNOWNLIST
This sender group is useful if you are not sure about the mail flow
policy you should use for a given sender.
ACCEPTED mail flow policy is used
6. ALL
Default sender group that applies to all other sender
Uses ACCEPTED mail flow policy
1. Accept
The connection will be accepted and SMTP conversation will start
The sender is limited to the recipients in the domains specified in
the RAT
2. Reject
The TCP connection is accepted, but the cisco ESA sends the
sender an SMTP 554 banner to indicate that they are not
welcome
3. TCP Refuse
The TCP connection is closed. Cisco ESA issues a FIN to the sender
to indicate the connection is over before it even start
4. Relay
The connection will be accepted and the SMTP conversation will
start
The sender is not limited to the recipients in the domains
specified in the RAT. RAT is not checked at all
Anti-Spam Overview
Reputation Filters: Prevent spam from being accepted
Anti-Spam: Processed the Reputation filters and Message Filters
Anti-Spam Configuration
The Context Adaptive Scanning Engine assigns the mail a score between
1 and 100 based on four main data points
Who is sending the message?
How the message was constructed?
What the message contains?
Where is the URL for a website with a low web reputation?
You need to configure how to handle mail that is scored as, for example
Positive spam (by default for messages with score >90)
Suspect spam (by default for messages with score: 50< score <89)
Mail Policies > Incoming Mail Policies (or Outgoing Incoming Mail
Policies), click on Anti-spam for the desired policy name
Enable Marketing Email Scanning: Marketing messages can be
legitimate bulk email that users may or may not want
You can change the default Positively Identified and Suspected
Spam score settings
Anti-Virus Overview
Includes integrated virus scanning engines from third party
companies: Sophos and McAfee
Sophos and McAfee Anti-Virus provide a detection engine that
scans files for viruses and malware
Checks for Sophos and McAfee virus definitions updates every 5
minutes by default
Anti-Virus Configuration
Obtain license keys for the Cisco ESA to scan messages for viruses
using one or both of these virus scanning engines
Configure the ESA to scan messages for viruses based on the
matching incoming or outgoing mail policy
If a virus if found, perform different actions on the message:
a. Repairing the message of viruses
b. Modifying the subject header
c. Adding an X-header
d. Sending the message to an alternate address or mailhost
e. Archiving the message
Mail Policies > Incoming Policies (or Outgoing incoming Mail
Policies), click on Anti-Virus for the desired policy name
IPv6
01A2:0001:100B:C001:DFEC:ABCD:100D:A002
1. Unicast
2. Multicast
Always start with FF00::/8
IPv6 does not use any concept like the classful network concept
used by IPv4
It always used prefix length, similar to IPv4 subnet masks
Configuring IPv6
IPv6 unicast routing needs to be enabled
With IPv6 routers typically use static IPv6 addresses, while user
use DHCP or Stateless Address Auto Configuration (SLAAC) to
dynamically learn the IPv6 address
IBF components:
Limitations:
Is is stateless, it cannot keep track of port numbers being used by
protocols that dynamically negotiate ports
You cannot apply FPM to the control-plane traffic, as the feature
is implemented in CEF switching layer
Inspects only unicast packets, does not apply to MPLS
encapsulated packets
1. Loading a PHDF
Packet Header Definition File uses XML syntax and define the
structure of various packet headers, such as Ethernet, IP, TCP,
UDP
With PHDF, we can filter traffic based on the header field names
and their values, instead of matching fixed offsets
ACL Examples:
1. ACLs can allow one host to access the internet and prevent
another host from accessing the internet
2. All HTTP traffic can be permitted, while FTP traffic can be
blocked.
Direction of ACL
1. OUT: Traffic that has already been processed through the router
and is exiting the router interface i.e. egress traffic.
2. In : Traffic that arrives on the router interface i.e. ingress traffic
Standard ACLs:
Standard ACLs are the oldest and one of the most basic types of
ACLs. Standard ACLs inspect traffic by comparing the source
address of the IP packets to the addresses configured in the ACL.
A standard ACL can be defined to permit or deny specific source IP
addresses only.
Extended ACL:
Extended ACLs are used to filter more-specific traffic based on the
source address, the destination address, and specific protocols,
ports.
Extended ACL range : 101 to 199 and 2000 to 2699.
IP named ACLs:
Cisco IOS software also added the capability to use a name in the
ACL. This allows standard and extended ACLs to be given names
instead of numbers, all other parameters remain same
Steps:
1. Configure a local username for authentication.
2. Under the vty lines, configure login local.
2. Configure a global timeout value for all users who telnet in , all have
same timeout.
line vty 0 4
login local
autocommand access-enable host timeout 10
Reflexive ACLs:
Reflexive ACLs allow IP packets to be filtered based on upper-layer
session information. Reflexive
ACLs are generally used to allow outbound traffic and to limit
inbound traffic in response to sessions originating inside the
router.
Established ACLs:
The “established” keyword in a TCP extended ACL validates that a
packet belongs to an existing connection from an ongoing TCP
session initiated earlier and checks whether the TCP datagram has
the acknowledgment (ACK) or reset (RST) bit set
This mechanism allows only internal networks to initiate a TCP
session outbound through the device.
Any TCP connection originated from the external network
inbound are dropped.
Time-Based ACLs
Time-based ACLs are similar to the extended ACLs in function;
they provide the additional feature of controlling access based on
the time.
The time range relies on the router’s system clock
Works best with NTP
MACSec
Downlink MACSec
It is the term used to describe the encrypted link between an
endpoint and the switch
Uplink MACSec
Describes encrypting the link between the switches with 802.1AE
Network Device Admission Control
Authenticating the switch via 802.1x
Once the device is allowed to join the network infrastructure, the
communication on the links between devices is secured with
MACSec