CCNA Security
1
© 2009 Cisco Learning Institute.
Chapter Two
Aseguramiento de dispositivos de Red
The Edge Router
2
© 2009 Cisco Learning Institute.
• What is the edge router?
- El último router entre la red interna y una red que no es de
confianza, como Internet
- Funciona como la primera y última línea de defensa.
- Implementa acciones de seguridad basadas en las políticas de
seguridad de la organización.
• How can the edge router be secured?
- Utilice varias implementaciones perimetrales de routers
- Considere la seguridad física, la seguridad del sistema operativo
y el refuerzo del router
- Asegure el acceso administrativo
- Acceso al router de manera local versus remoto
Implementaciones Perimetrales
LAN 1
192.168.2.0
Router 1 (R1)
Internet
LAN 1
192.168.2.0
R1 Firewall
Internet
LAN 1
192.168.2.0
R1 Firewall R2
Internet
DMZ
3
© 2009 Cisco Learning Institute.
• Enfoque de enrutador único
Un solo enrutador conecta la LAN
interna a Internet. Todas las políticas
de seguridad están configuradas en
este dispositivo.
• Enfoque de defensa en profundidad
Todo pasa a través del firewall. Un
conjunto de reglas determina qué
tráfico permitirá o denegará el
router.
• Enfoque DMZ
La DMZ se configura entre dos
routers. La mayor parte del filtrado
de tráfico queda en manos del
cortafuegos
Areas of Router Security
• Physical Security
- Place router in a secured, locked room
- Install an uninterruptible power supply
• Operating System Security
- Use the latest stable version that meets network requirements
- Keep a copy of the O/S and configuration file as a backup
• Router Hardening
- Secure administrative control
- Disable unused ports and interfaces
- Disable unnecessary services
4
© 2009 Cisco Learning Institute.
Banner Messages
• Los banners están deshabilitados de forma
predeterminada y deben habilitarse explícitamente.
R1(config)# banner {exec | incoming | login | motd | slip-ppp} d message d
• Hay cuatro tokens válidos para usar dentro de la
sección de mensajes del comando de banner:
- $(hostname)—Displays the hostname for the router
- $(domain)—Displays the domain name for the router
- $(line)—Displays the vty or tty (asynchronous) line number
- $(line-desc)—Displays the description that is attached to the
line
5
© 2009 Cisco Learning Institute.
SSH
6
© 2009 Cisco Learning Institute.
version 1, 2
• Configuring Router
• SSH Commands
• Connecting to Router
Pasos preliminares para configurar SSL
7
© 2009 Cisco Learning Institute.
Complete lo siguiente antes de configurar los routers
para el protocolo SSH :
1. Ensure that the target routers are running a Cisco IOS Release
12.1(1)T image or later to support SSH.
2. Ensure that each of the target routers has a unique hostname.
3. Ensure that each of the target routers is using the correct
domain name of the network.
4. Ensure that the target routers are configured for local
authentication, or for authentication, authorization, and
accounting (AAA) services for username or password
authentication, or both. This is mandatory for a router-to-router
SSH connection.
Configuring the Router for SSH
R1# conf t
R1(config)# ip domain-name span.com
R1(config)# crypto key generate rsa general-keys
modulus 1024
The name for the keys will be: R1.span.com
% The key modulus size is 1024 bits
% Generating 1024 bit RSA keys, keys will be non-
exportable...[OK]
R1(config)#
*Dec 13 16:19:12.079: %SSH-5-ENABLED:
been enabled
R1(config)# username Bob secret cisco
R1(config)# line vty 0 4
R1(config-line)# login local
SSH 1.99 has
R1(config-line)#
R1(config-line)#
transport input ssh
exit
1. Configure the IP domain
name of the network
2. Generate one way
secret key
3. Verify or create a local
database entry
4. Enable VTY inbound
8
© 2009 Cisco Learning Institute.
SSH sessions
Optional SSH Commands
R1# show ip ssh
SSH Enabled - version 1.99
Authentication timeout: 120 secs;
retries: 3
R1#
R1# conf t
Enter configuration commands, one
with CNTL/Z.
Authentication
per line. End
R1(config)#
R1(config)#
R1(config)#
R1(config)#
R1#
R1# show ip
SSH Enabled
ip ssh version 2
ip ssh time-out 60
ip ssh authentication-retries 2
^Z
ssh
- version 2.0
Authentication timeout: 60 secs; Authentication
retries: 2
R1#
9
© 2009 Cisco Learning Institute.
Connecting to the Router
There are two different ways to
connect to an SSH-enabled router:
- Connect using an SSH-enabled Cisco
router
- Connect using an SSH client running
on a host.
R1# sho ssh
Connection Version Mode Encryption Hmac
hmac-sha1
hmac-sha1
State
Session started
Session started
Username
Bob
Bob
0
0
2.0
2.0
IN aes128-cbc
OUT aes128-cbc
%No SSHv1 server connections running.
R1#
R1# sho ssh
%No SSHv2 server connections running.
%No SSHv1 server connections running.
R1#
R2# ssh -l Bob 192.168.2.101
Password:
R1>
1
2
3
10
© 2009 Cisco Learning Institute.
There are no current SSH sessions ongoing with R1.
R2 establishes an SSH connection with R1.
There is an incoming and outgoing SSHv2 session user Bob.
Implementing Secure Management
11
© 2009 Cisco Learning Institute.
• Configuration Change Management
- Know the state of critical network devices
- Know when the last modifications occurred
- Ensure the right people have access when new management
methodologies are adopted
- Know how to handle tools and devices no longer used
• Automated logging and reporting of information from
identified devices to management hosts
• Available applications and protocols like SNMP
Secure Management and Reporting
12
© 2009 Cisco Learning Institute.
• Al registrar y administrar información, el flujo de
información entre los hosts de administración y
los dispositivos administrados puede tomar dos
caminos :
- Out-of-band (OOB): La información fluye
en una red de gestión dedicada en la que no
reside tráfico de producción.
- In-band: La información fluye a través de una red de
producción empresarial, Internet o ambos utilizando
canales de datos regulares.
Factores a Considerar
13
© 2009 Cisco Learning Institute.
• OOB gestión adecuada para grandes redes
empresariales
• Se recomienda la administración en banda en
redes más pequeñas que brindan una
implementación de seguridad más rentable
• Tenga en cuenta las vulnerabilidades de
seguridad del uso de herramientas de
administración remota con administración
en banda
Using Syslog
14
© 2009 Cisco Learning Institute.
• Implementing Router Logging
• Syslog
• Configuring System Logging
Implementing Router Logging
15
© 2009 Cisco Learning Institute.
Configure el router para enviar mensajes de
registro a :
• Consola: el registro de la consola se utiliza al
modificar o probar el router mientras está conectado
a la consola. Los mensajes enviados a la consola no
son almacenados por el enrutador y, por lo tanto, no
son muy valiosos como eventos de seguridad. .
• Líneas de terminal: configure las sesiones EXEC
habilitadas para recibir mensajes de registro en
cualquier línea de terminal. Al igual que el registro de la
consola, el router no almacena este tipo de registro y,
por lo tanto, solo es valioso para el usuario en esa
línea. .
Implementing Router Logging
16
© 2009 Cisco Learning Institute.
• Buffered logging: Almacena los mensajes de registro en la
memoria del enrutador.
• Los mensajes de registro se almacenan durante un tiempo, pero los
eventos se borran cada vez que se reinicia el enrutador .
• SNMP traps: Se pueden preconfigurar determinados umbrales. El
enrutador puede procesar los eventos y reenviarlos como trampas SNMP a
un servidor SNMP externo. Requiere la configuración y mantenimiento de
un sistema SNMP.
• Syslog: Configure los enrutadores para reenviar mensajes de
registro a un servicio de registro del sistema externo. Este servicio
puede residir en cualquier número de servidores, incluidos
Microsoft Windows y sistemas basados en UNIX, o el dispositivo
Cisco Security MARS.
Syslog
• Syslog servers: Conocidos como hosts de registro, estos
sistemas aceptan y procesan mensajes de registro de
clientes de syslog.
• Syslog clients: Enrutadores u otros tipos de equipos que
generan y reenvían mensajes de registro a servidores syslog.
User 10.2.3.3
Protected LAN
10.2.3.0/24
Syslog Client
e0/0
10.2.1.1 e0/1
10.2.2.1
e0/2
10.2.3.1
Public Web
Server
10.2.2.3
Mail
Server
10.2.2.4
Administrator
Server
10.2.2.5
Syslog
Server 10.2.3.2
DMZ LAN 10.2.2.0/24
R3
17
© 2009 Cisco Learning Institute.
Configuring System Logging
R3(config)# logging 10.2.2.6
R3(config)#
R3(config)#
logging
logging
trap informational
source-interface loopback 0
R3(config)# logging on
2. Set the log severity (trap) level
3. Set the source interface
Turn logging on and off using the
logging buffered, logging
monitor, and logging commands
1. Set the destination logging host
18
© 2009 Cisco Learning Institute.
4. Enable logging
Using NTP
• Los relojes de los hosts y los dispositivos de red deben
mantenerse y sincronizarse para garantizar que los
mensajes de registro estén sincronizados entre sí.
• La configuración de fecha y hora del enrutador se
puede establecer mediante uno de dos métodos:
- Editar manualmente la fecha y la hora
- Configurar el protocolo de tiempo de red
19
© 2009 Cisco Learning Institute.
Cronometraje
20
© 2009 Cisco Learning Institute.
• Sacar la hora del reloj de Internet significa que los paquetes
no seguros están permitidos a través del firewall
• Muchos servidores NTP en Internet no requieren autenticación
• de igual a igual
• Los dispositivos reciben la dirección IP de los maestros NTP.
En una red configurada con NTP, uno o más enrutadores se
designan como el encargado del reloj maestro (conocido
como maestro NTP) mediante el comando de configuración
global ntp master.
• Los clientes NTP se ponen en contacto con el maestro o escuchan
los mensajes del maestro para sincronizar sus relojes. Para
contactar con el servidor, utilice el comando ntp server ntp-
server-address.
• En un entorno LAN, NTP se puede configurar para utilizar
mensajes de difusión IP en su lugar, utilizando el comando ntp
broadcast client.
Facilidades/Funciones
21
© 2009 Cisco Learning Institute.
• Hay dos mecanismos de seguridad disponibles:
- Un esquema de restricción basado en ACL
- Un mecanismo de autenticación cifrado como el que ofrece
NTP versión 3 o superior
• Implemente NTP versión 3 o superior. Utilice los
siguientes comandos tanto en NTP Master como en
el cliente NTP .
- ntp authenticate
- ntp authentication key md5 value
- ntp trusted-key key-value
w 'l.'t Vrl • e 1se o 1e LL r n 1 n g ,o r g 22
© 2009 Cisco Learning lnstitute.

Ccna security-ch2-securing-network-devices

  • 1.
    CCNA Security 1 © 2009Cisco Learning Institute. Chapter Two Aseguramiento de dispositivos de Red
  • 2.
    The Edge Router 2 ©2009 Cisco Learning Institute. • What is the edge router? - El último router entre la red interna y una red que no es de confianza, como Internet - Funciona como la primera y última línea de defensa. - Implementa acciones de seguridad basadas en las políticas de seguridad de la organización. • How can the edge router be secured? - Utilice varias implementaciones perimetrales de routers - Considere la seguridad física, la seguridad del sistema operativo y el refuerzo del router - Asegure el acceso administrativo - Acceso al router de manera local versus remoto
  • 3.
    Implementaciones Perimetrales LAN 1 192.168.2.0 Router1 (R1) Internet LAN 1 192.168.2.0 R1 Firewall Internet LAN 1 192.168.2.0 R1 Firewall R2 Internet DMZ 3 © 2009 Cisco Learning Institute. • Enfoque de enrutador único Un solo enrutador conecta la LAN interna a Internet. Todas las políticas de seguridad están configuradas en este dispositivo. • Enfoque de defensa en profundidad Todo pasa a través del firewall. Un conjunto de reglas determina qué tráfico permitirá o denegará el router. • Enfoque DMZ La DMZ se configura entre dos routers. La mayor parte del filtrado de tráfico queda en manos del cortafuegos
  • 4.
    Areas of RouterSecurity • Physical Security - Place router in a secured, locked room - Install an uninterruptible power supply • Operating System Security - Use the latest stable version that meets network requirements - Keep a copy of the O/S and configuration file as a backup • Router Hardening - Secure administrative control - Disable unused ports and interfaces - Disable unnecessary services 4 © 2009 Cisco Learning Institute.
  • 5.
    Banner Messages • Losbanners están deshabilitados de forma predeterminada y deben habilitarse explícitamente. R1(config)# banner {exec | incoming | login | motd | slip-ppp} d message d • Hay cuatro tokens válidos para usar dentro de la sección de mensajes del comando de banner: - $(hostname)—Displays the hostname for the router - $(domain)—Displays the domain name for the router - $(line)—Displays the vty or tty (asynchronous) line number - $(line-desc)—Displays the description that is attached to the line 5 © 2009 Cisco Learning Institute.
  • 6.
    SSH 6 © 2009 CiscoLearning Institute. version 1, 2 • Configuring Router • SSH Commands • Connecting to Router
  • 7.
    Pasos preliminares paraconfigurar SSL 7 © 2009 Cisco Learning Institute. Complete lo siguiente antes de configurar los routers para el protocolo SSH : 1. Ensure that the target routers are running a Cisco IOS Release 12.1(1)T image or later to support SSH. 2. Ensure that each of the target routers has a unique hostname. 3. Ensure that each of the target routers is using the correct domain name of the network. 4. Ensure that the target routers are configured for local authentication, or for authentication, authorization, and accounting (AAA) services for username or password authentication, or both. This is mandatory for a router-to-router SSH connection.
  • 8.
    Configuring the Routerfor SSH R1# conf t R1(config)# ip domain-name span.com R1(config)# crypto key generate rsa general-keys modulus 1024 The name for the keys will be: R1.span.com % The key modulus size is 1024 bits % Generating 1024 bit RSA keys, keys will be non- exportable...[OK] R1(config)# *Dec 13 16:19:12.079: %SSH-5-ENABLED: been enabled R1(config)# username Bob secret cisco R1(config)# line vty 0 4 R1(config-line)# login local SSH 1.99 has R1(config-line)# R1(config-line)# transport input ssh exit 1. Configure the IP domain name of the network 2. Generate one way secret key 3. Verify or create a local database entry 4. Enable VTY inbound 8 © 2009 Cisco Learning Institute. SSH sessions
  • 9.
    Optional SSH Commands R1#show ip ssh SSH Enabled - version 1.99 Authentication timeout: 120 secs; retries: 3 R1# R1# conf t Enter configuration commands, one with CNTL/Z. Authentication per line. End R1(config)# R1(config)# R1(config)# R1(config)# R1# R1# show ip SSH Enabled ip ssh version 2 ip ssh time-out 60 ip ssh authentication-retries 2 ^Z ssh - version 2.0 Authentication timeout: 60 secs; Authentication retries: 2 R1# 9 © 2009 Cisco Learning Institute.
  • 10.
    Connecting to theRouter There are two different ways to connect to an SSH-enabled router: - Connect using an SSH-enabled Cisco router - Connect using an SSH client running on a host. R1# sho ssh Connection Version Mode Encryption Hmac hmac-sha1 hmac-sha1 State Session started Session started Username Bob Bob 0 0 2.0 2.0 IN aes128-cbc OUT aes128-cbc %No SSHv1 server connections running. R1# R1# sho ssh %No SSHv2 server connections running. %No SSHv1 server connections running. R1# R2# ssh -l Bob 192.168.2.101 Password: R1> 1 2 3 10 © 2009 Cisco Learning Institute. There are no current SSH sessions ongoing with R1. R2 establishes an SSH connection with R1. There is an incoming and outgoing SSHv2 session user Bob.
  • 11.
    Implementing Secure Management 11 ©2009 Cisco Learning Institute. • Configuration Change Management - Know the state of critical network devices - Know when the last modifications occurred - Ensure the right people have access when new management methodologies are adopted - Know how to handle tools and devices no longer used • Automated logging and reporting of information from identified devices to management hosts • Available applications and protocols like SNMP
  • 12.
    Secure Management andReporting 12 © 2009 Cisco Learning Institute. • Al registrar y administrar información, el flujo de información entre los hosts de administración y los dispositivos administrados puede tomar dos caminos : - Out-of-band (OOB): La información fluye en una red de gestión dedicada en la que no reside tráfico de producción. - In-band: La información fluye a través de una red de producción empresarial, Internet o ambos utilizando canales de datos regulares.
  • 13.
    Factores a Considerar 13 ©2009 Cisco Learning Institute. • OOB gestión adecuada para grandes redes empresariales • Se recomienda la administración en banda en redes más pequeñas que brindan una implementación de seguridad más rentable • Tenga en cuenta las vulnerabilidades de seguridad del uso de herramientas de administración remota con administración en banda
  • 14.
    Using Syslog 14 © 2009Cisco Learning Institute. • Implementing Router Logging • Syslog • Configuring System Logging
  • 15.
    Implementing Router Logging 15 ©2009 Cisco Learning Institute. Configure el router para enviar mensajes de registro a : • Consola: el registro de la consola se utiliza al modificar o probar el router mientras está conectado a la consola. Los mensajes enviados a la consola no son almacenados por el enrutador y, por lo tanto, no son muy valiosos como eventos de seguridad. . • Líneas de terminal: configure las sesiones EXEC habilitadas para recibir mensajes de registro en cualquier línea de terminal. Al igual que el registro de la consola, el router no almacena este tipo de registro y, por lo tanto, solo es valioso para el usuario en esa línea. .
  • 16.
    Implementing Router Logging 16 ©2009 Cisco Learning Institute. • Buffered logging: Almacena los mensajes de registro en la memoria del enrutador. • Los mensajes de registro se almacenan durante un tiempo, pero los eventos se borran cada vez que se reinicia el enrutador . • SNMP traps: Se pueden preconfigurar determinados umbrales. El enrutador puede procesar los eventos y reenviarlos como trampas SNMP a un servidor SNMP externo. Requiere la configuración y mantenimiento de un sistema SNMP. • Syslog: Configure los enrutadores para reenviar mensajes de registro a un servicio de registro del sistema externo. Este servicio puede residir en cualquier número de servidores, incluidos Microsoft Windows y sistemas basados en UNIX, o el dispositivo Cisco Security MARS.
  • 17.
    Syslog • Syslog servers:Conocidos como hosts de registro, estos sistemas aceptan y procesan mensajes de registro de clientes de syslog. • Syslog clients: Enrutadores u otros tipos de equipos que generan y reenvían mensajes de registro a servidores syslog. User 10.2.3.3 Protected LAN 10.2.3.0/24 Syslog Client e0/0 10.2.1.1 e0/1 10.2.2.1 e0/2 10.2.3.1 Public Web Server 10.2.2.3 Mail Server 10.2.2.4 Administrator Server 10.2.2.5 Syslog Server 10.2.3.2 DMZ LAN 10.2.2.0/24 R3 17 © 2009 Cisco Learning Institute.
  • 18.
    Configuring System Logging R3(config)#logging 10.2.2.6 R3(config)# R3(config)# logging logging trap informational source-interface loopback 0 R3(config)# logging on 2. Set the log severity (trap) level 3. Set the source interface Turn logging on and off using the logging buffered, logging monitor, and logging commands 1. Set the destination logging host 18 © 2009 Cisco Learning Institute. 4. Enable logging
  • 19.
    Using NTP • Losrelojes de los hosts y los dispositivos de red deben mantenerse y sincronizarse para garantizar que los mensajes de registro estén sincronizados entre sí. • La configuración de fecha y hora del enrutador se puede establecer mediante uno de dos métodos: - Editar manualmente la fecha y la hora - Configurar el protocolo de tiempo de red 19 © 2009 Cisco Learning Institute.
  • 20.
    Cronometraje 20 © 2009 CiscoLearning Institute. • Sacar la hora del reloj de Internet significa que los paquetes no seguros están permitidos a través del firewall • Muchos servidores NTP en Internet no requieren autenticación • de igual a igual • Los dispositivos reciben la dirección IP de los maestros NTP. En una red configurada con NTP, uno o más enrutadores se designan como el encargado del reloj maestro (conocido como maestro NTP) mediante el comando de configuración global ntp master. • Los clientes NTP se ponen en contacto con el maestro o escuchan los mensajes del maestro para sincronizar sus relojes. Para contactar con el servidor, utilice el comando ntp server ntp- server-address. • En un entorno LAN, NTP se puede configurar para utilizar mensajes de difusión IP en su lugar, utilizando el comando ntp broadcast client.
  • 21.
    Facilidades/Funciones 21 © 2009 CiscoLearning Institute. • Hay dos mecanismos de seguridad disponibles: - Un esquema de restricción basado en ACL - Un mecanismo de autenticación cifrado como el que ofrece NTP versión 3 o superior • Implemente NTP versión 3 o superior. Utilice los siguientes comandos tanto en NTP Master como en el cliente NTP . - ntp authenticate - ntp authentication key md5 value - ntp trusted-key key-value
  • 22.
    w 'l.'t Vrl• e 1se o 1e LL r n 1 n g ,o r g 22 © 2009 Cisco Learning lnstitute.