Anda di halaman 1dari 48

Niveles de Privilegios

2012 Cisco and/or its affiliates. All rights reserved.

34

2012 Cisco and/or its affiliates. All rights reserved.

35

Las necesidades de un operador de seguridad de la red puede

no ser la misma que la del ingeniero WAN.


Los Routers Cisco permiten la configuracin en varios niveles de

privilegios para los administradores.


Diferentes contraseas se pueden configurar para controlar quin tiene acceso a los diferentes niveles de privilegio.

Existen 16 niveles de privilegios.


Los niveles del 2 al 14 pueden ser configurados haciendo uso del comando privilege en modo de configuracion global.

2012 Cisco and/or its affiliates. All rights reserved.

36

Nivel 0:
Predefinidas para los privilegios de acceso Nivel de usuario. Rara vez usado, sino que hacen uso los siguientes comandos: disable, enable, exit, help y logout.

Nivel 1(Modo EXEC):


El nivel predeterminado de inicio de sesin Router>. Un usuario no puede realizar ningn cambio o ver el archivo de configuracin en ejecucin.

Niveles 2 14:
Puede ser personalizado por los privilegios a nivel de usuario. Los comandos de los niveles inferiores pueden ser movidos a un nivel ms alto, comandos desde niveles ms altos puede ser movidos a un nivel inferior.

Nivel 15 (Modo EXEC Privilegiado):


Reservado para los niveles privilegiados ( comando enable). Los usuarios pueden ver y cambiar todos los aspectos de la configuracin.
2012 Cisco and/or its affiliates. All rights reserved. 37

Router(config)# privilege mode {level level command | reset command}

Comando

Descripcion Este comando especifica el modo de Utilice el smbolo ? para ver una lista de los modos del router. configuracin.

mode

level

(Opcional) Este comando permite establecer un nivel de privilegio con un comando especificado. (Opcional) Este parmetro es el nivel de privilegios que est asociado con un comando. Se puede especificar hasta 16 niveles de privilegios, utilizando nmeros del 0 al 15. (Opcional) Este comando resetea el nivel de privilegio de un comando.

level command

reset

command

(Opcional) Este es el argumento de comando para utilizar cuando se quiere restablecer el nivel de privilegio.

2012 Cisco and/or its affiliates. All rights reserved.

38

R1# conf t R1(config)# R1(config)# R1(config)# R1(config)# R1(config)# R1(config)# R1(config)# R1(config)# R1(config)# R1(config)# R1(config)# R1(config)#

username USER privilege 1 secret cisco privilege exec level 5 ping enable secret level 5 cisco5 username SUPPORT privilege 5 secret cisco5 privilege exec level 10 reload enable secret level 10 cisco10 username JR-ADMIN privilege 10 secret cisco10 username ADMIN privilege 15 secret cisco123

2012 Cisco and/or its affiliates. All rights reserved.

39

User Access Verification Username: user Password: <cisco> R1> show privilege Current privilege level is 1 R1# ping 10.10.10.1 ^ % Invalid input detected at '^' marker. R1>

2012 Cisco and/or its affiliates. All rights reserved.

40

R1> enable 5 Password:<cisco5> R1# R1# show privilege Current privilege level is 5 R1# R1# ping 10.10.10.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.10.10.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms R1# R1# reload Translating "reload" Translating "reload" % Unknown command or computer name, or unable to find computer address R1#

2012 Cisco and/or its affiliates. All rights reserved.

41

R1# enable 10 Password:<cisco10> R1# show privilege Current privilege level is 10 R1# ping 10.10.10.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.10.10.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms R1# reload System configuration has been modified. Save? [yes/no]: ^C R1# show running-config ^ % Invalid input detected at '^' marker. R1#

2012 Cisco and/or its affiliates. All rights reserved.

42

R1# enable 15 Password: <cisco123> R1# show privilege Current privilege level is 15 R1# show running-config Building configuration... Current configuration : 1145 bytes ! version 12.4 <output omitted>

2012 Cisco and/or its affiliates. All rights reserved.

43

No hay control de acceso a las interfaces, puertos, interfaces

lgicas y slots en un router.


Los comandos disponibles en niveles de privilegios inferiores

siempre son ejecutables en los niveles superiores.


Los comandos establecidos en un nivel de privilegio superior no

estn disponibles para los usuarios con privilegios bajos.


La asignacin de un comando con varias palabras clave a un

nivel de privilegio especfico tambin asigna todos los comandos asociados a las primeras palabras clave en el mismo nivel de privilegio.
Un ejemplo es el comando show ip route.

2012 Cisco and/or its affiliates. All rights reserved.

44

Los niveles de privilegio y las contraseas del modo enableno

proveen el nivel necesario de detalle cuando se trabaja en routers y switches Cisco.


El acceso a la CLI basado en roles le permite al administrador

definir vistas.
Las vistas son un conjunto de comandos operativos y capacidades de configuracin que proporcionan acceso selectivo o parcial del modo privilegiado y comandos de modos de configuracin. Las vistas restringen el acceso a la informacion de configuracion del Cisco IOS, es decir, una vista puede definir qu comandos son aceptados y qu informacin de configuracin es visible..

2012 Cisco and/or its affiliates. All rights reserved.

45

La vista Root es requerida para definir Vistas y Supervistas. Una vista contiene comandos Un comando puede aparecer en mas de una vista.

Root View

View #1
show ip route

View #2
show run

View #3
show interfaces

View #4
int fa0/0

View #5

View #6

2012 Cisco and/or its affiliates. All rights reserved.

46

La vista raz es la vista de mas alto nivel administrativo.


La creacin y modificacin de una vista o 'supervista' slo es posible desde sta. La diferencia entre la vista raz y nivel de privilegio 15 es que slo el usuario root el cual puede crear vistas o modificar puntos de vista y supervistas.

Las vistas de CLI basadas en roles requieren del AAA new-

modelo:
Esto es necesario incluso con la autenticacin de vista local.

Pueden existir adems de la vista raz, un mximo de 15 puntos

de vista de la CLI.

2012 Cisco and/or its affiliates. All rights reserved.

47

Antes de que una vista pueda ser creada, debe ser habilitado

AAA mediante el comando aaa new-model.


A continuacion, use el comando enable con el parametro view

para ingresar a la vista root.


Adicionalmente se puede usa el comando enable view root.

Use la contrasea de privilegio 15 (enable secret), si es

necesario para la autenticacion.


Router# enable [privilege-level] [view [view-name]]

R1(config)# aaa new-model R1(config)# exit R1# enable view Password: R1# %PARSER-6-VIEW_SWITCH: successfully set to view 'root'

2012 Cisco and/or its affiliates. All rights reserved.

48

Cree una vista e ingresa en el modo de configuracion.


Router(config)# parser view view-name

Fije un password para proteger el acceso a la vista. Agregue comandos o interfaces a una vista.
Router(config-view)# password encrypted-password commands parser-mode {include | include-exclusive | exclude} [all] [interface interface-name | command]

Ejemplo
R1(config)# parser view MONITOR-VIEW R1(config-view)# password cisco R1(config-view)# commands exec include show version

2012 Cisco and/or its affiliates. All rights reserved.

49

Router(config-view)# commands parser-mode {include | include-exclusive | exclude} [all] [interface interface-name | command]

Parametro parser-mode include include-exclusive exclude all

Descripcion Especifica el modo en el cual existe el comando especificado. Agrega un comando o una interface a la vista y permite que el mismo comando o interface sea agregado a una vista adicional. Agrega un comando o una interface a la vista y excluye el mismo comando o interface sea agregado a todas las vistas. Excluye un comando o una interface desde la vista. (Opcional) Especifica un comodn que permite a cada comando en un modo de configuracin especificado que comience con la misma palabra clave o cada subinterfaz para una interfaz especificada para ser parte de la vista. (Opcional) Especifica una interfaz que se aade a la vista.. (Opcional) Especifica un comando que se aade a la vista.

interface interface-name command

2012 Cisco and/or its affiliates. All rights reserved.

50

R1(config)# aaa new-model R1(config)# exit R1# enable view %PARSER-6-VIEW_SWITCH: successfully set to view root. R1# configure terminal R1(config)# parser view FIRST %PARSER-6-VIEW_CREATED:view FIRST successfully created. R1(config-view)# secret firstpass R1(config-view)# command exec include show version R1(config-view)# command exec include configure terminal R1(config-view)# command exec include all show ip R1(config-view)# exit

2012 Cisco and/or its affiliates. All rights reserved.

51

R1> enable view FIRST Password: %PARSER-6-VIEW_SWITCH:successfully set to view FIRST'. R1# ? Exec commands: configure Enter configuration mode enable Turn on privileged commands exit Exit from the EXEC show Show running system information

R1# show ? ip parser version

IP information Display parser information System hardware and software status

2012 Cisco and/or its affiliates. All rights reserved.

52

R1# show ip ? access-lists accounting aliases arp as-path-access-list bgp cache casa cef community-list dfp dhcp --More--

List IP access lists The active IP accounting database IP alias table IP ARP table List AS path access lists BGP information IP fast-switching route cache Display casa information Cisco Express Forwarding List community-list DFP information Show items in the DHCP database drp

Por ultimo se asigna la vista a un usuario


R1# config t R1(config)# username Bob view FIRST password cisco123

2012 Cisco and/or its affiliates. All rights reserved.

53

R1(config)# parser view SHOWVIEW *Mar 1 09:54:54.873: %PARSER-6-VIEW_CREATED: view SHOWVIEW' successfully created. R1(config-view)# secret cisco R1(config-view)# commands exec include show version R1(config-view)# exit R1(config)# parser view VERIFYVIEW *Mar 1 09:55:24.813: %PARSER-6-VIEW_CREATED: view VERIFYVIEW' successfully created. R1(config-view)# commands exec include ping % Password not set for the view VERIFYVIEW R1(config-view)# secret cisco5 R1(config-view)# commands exec include ping R1(config-view)# exit R1(config)# parser view REBOOTVIEW R1(config-view)# *Mar 1 09:55:52.297: %PARSER-6-VIEW_CREATED: view REBOOTVIEW' successfully created. R1(config-view)# secret cisco10 R1(config-view)# commands exec include reload R1(config-view)# exit

2012 Cisco and/or its affiliates. All rights reserved.

54

R1# show running-config <Output omitted> parser view SHOWVIEW secret 5 $1$GL2J$8njLecwTaLAc0UuWo1/Fv0 commands exec include show version commands exec include show ! parser view VERIFYVIEW secret 5 $1$d08J$1zOYSI4WainGxkn0Hu7lP1 commands exec include ping ! parser view REBOOTVIEW secret 5 $1$L7lZ$1Jtn5IhP43fVE7SVoF1pt. commands exec include reload !

2012 Cisco and/or its affiliates. All rights reserved.

55

Supervistas contienen Vistas por no comandos. Dos Supervistas pueden usar la misma Vista. Por ejemplo, tanto la Supervista 1 y Supervista 2 pueden incluir la

Vista de CLI 4
Root View

CLI Views

View #1
command exec

View #2
command exec

View #3
command exec

View #4
command exec

View #5
command exec

View #6
command exec

Superview #1
View #1 View #2
command exec command exec

Superview #2
View #3
command exec

View #5
command exec

View #4
command exec

View #4
command exec

View #6
command exec

2012 Cisco and/or its affiliates. All rights reserved.

56

Una vista puede ser compartido entre mltiples supervistas. Los comandos no se pueden configurar para un supervista.
Los comandos se aaden a las opciones de la CLI. Los usuarios que estn conectados a un supervista pueden acceder a todos los comandos que estn configurados para cualquiera de los puntos de vista de la CLI que forman parte de la supervista.

Cada supervista tiene una contrasea que se utiliza para cambiar

entre supervistas o desde una vista de CLI a un supervista.

2012 Cisco and/or its affiliates. All rights reserved.

57

Si se agrega palabra clave superview a la sentencia parser view de se

crea una supervista y se ingresa al modo de configuracin de vista


Router(config)# parser view view-name superview

Establece una contrasea para proteger el acceso a la supervista. La contrasea debe ser creada inmediatamente despus de crear una vista de

otra manera un mensaje de error.


Router(config-view)# secret encrypted-password

Aade una vista CLI a un supervista. Las vistas mltiples pueden ser aadidas. Las vistas pueden ser compartidos entre supervistas
Router(config-view)# view view-name

2012 Cisco and/or its affiliates. All rights reserved.

58

R1(config)# parser view USER superview * Mar 1 09:56:26.465 : %PARSER-6-SUPER_VIEW_CREATED: super view 'USER' successfully created. R1(config-view)# secret cisco R1(config-view)# view SHOWVIEW *Mar 1 09:56:33.469: %PARSER-6-SUPER_VIEW_EDIT_ADD: view SHOWVIEW added to superview USER. R1(config-view)# exit R1(config)# parser view SUPPORT superview *Mar 1 09:57:33.825 : %PARSER-6-SUPER_VIEW_CREATED: super view 'SUPPORT' successfully created. R1(config-view)# secret cisco1 R1(config-view)# view SHOWVIEW *Mar 1 09:57:45.469: %PARSER-6-SUPER_VIEW_EDIT_ADD: view SHOWVIEW added to superview SUPPORT. R1(config-view)# view VERIFYVIEW *Mar 1 09:57:57.077: %PARSER-6-SUPER_VIEW_EDIT_ADD: view VERIFYVIEW added to superview SUPPORT. R1(config-view)# exit R1(config)# parser view JR-ADMIN superview *Mar 1 09:58:09.993: %PARSER-6-SUPER_VIEW_CREATED: super view 'JR-ADMIN' successfully created. R1(config-view)# secret cisco2 R1(config-view)# view SHOWVIEW *Mar 1 09:58:26.973: %PARSER-6-SUPER_VIEW_EDIT_ADD: view SHOWVIEW added to superview JRADMIN. R1(config-view)# view VERIFYVIEW *Mar 1 09:58:31.817: %PARSER-6-SUPER_VIEW_EDIT_ADD: view VERIFYVIEW added to superview JRADMIN. R1(config-view)# view REBOOTVIEW *Mar 1 09:58:39.669: %PARSER-6-SUPER_VIEW_EDIT_ADD: view REBOOTVIEW added to superview JRADMIN. R1(config-view)# exit

2012 Cisco and/or its affiliates. All rights reserved.

59

R1# show running-config <output omitted> ! parser view SUPPORT superview secret 5 $1$Vp1O$BBB1N68Z2ekr/aLHledts. view SHOWVIEW view VERIFYVIEW ! parser view USER superview secret 5 $1$E4k5$ukHyfYP7dHOC48N8pxm4s/ view SHOWVIEW ! parser view JR-ADMIN superview secret 5 $1$8kx2$rbAe/ji220OmQ1yw.568g0 view SHOWVIEW view VERIFYVIEW view REBOOTVIEW !

2012 Cisco and/or its affiliates. All rights reserved.

60

R1# enable view USER Password: *Mar 1 09:59:46.197: %PARSER-6-VIEW_SWITCH: successfully set to view 'USER'. R1# ? Exec commands: enable Turn on privileged commands exit Exit from the EXEC show Show running system information R1# R1# show ? flash: display information about flash: file system version System hardware and software status R1#

2012 Cisco and/or its affiliates. All rights reserved.

61

R1# enable view SUPPORT Password: *Mar 1 10:00:11.353: %PARSER-6-VIEW_SWITCH: successfully set to view 'SUPPORT'. R1# ? Exec commands: enable Turn exit Exit ping Send show Show R1#

on privileged commands from the EXEC echo messages running system information

2012 Cisco and/or its affiliates. All rights reserved.

62

R1# enable view JR-ADMIN Password: *Mar 1 10:00:28.365: %PARSER-6-VIEW_SWITCH: successfully set to view 'JR-ADMIN'. R1# ? Exec commands: enable Turn exit Exit ping Send reload Halt show Show R1#

on privileged commands from the EXEC echo messages and perform a cold restart running system information

2012 Cisco and/or its affiliates. All rights reserved.

63

Para monitorear CLI basada en roles, use el comando show

parser view para visualizar la informacin referente a la vista donde est el usuario actualmente.
Con el comando all se muestra la informacion para todas las vistas configuradas. Este comando esta disponible solo para los usuarios root.

Para visualizar mensajes debug para todas las vistas, use el

comando debug parser view en modo privilegiado.

2012 Cisco and/or its affiliates. All rights reserved.

64

R1# show parser view No view is active ! Currently in Privilege Level Context R1# R1# enable view Password: *Mar 1 10:38:56.233: %PARSER-6-VIEW_SWITCH: successfully set to view 'root'. R1# R1# show parser view Current view is 'root' R1# R1# show parser view all Views/SuperViews Present in System: SHOWVIEW VERIFYVIEW REBOOTVIEW SUPPORT * USER * JR-ADMIN * ADMIN * -------(*) represent superview------R1#

2012 Cisco and/or its affiliates. All rights reserved.

65

Si un router esta comprometido, es un riesgo que la configuracion

y el IOS puedan ser borrados.


Necesidad de garantizar la bootset primario.
Archivo de configuracion y el IOS que est corriendo

Nota de SCP:
Adems de la caracterstica de configuracin resistente, los archivos de configuracin e imagen se puede copiar de forma segura a otro dispositivo mediante Secure Copy (SCP). Proporciona un mtodo seguro y autenticado para copiar los archivos de configuracin del router entre dispositivos. Se basa en SSH.

2012 Cisco and/or its affiliates. All rights reserved.

66

La funcin de Resistencia del Cisco IOS le permite al equipo

asegurar y mantener una copia funcional de la imagen en ejecucin y los archivos de configuracin.
Acelera el proceso de recuperacin. Los archivos son almacenados localmente. Esta funcin puede ser desactivada a travs de una sesin de consola.

2012 Cisco and/or its affiliates. All rights reserved.

67

Para habilitar la funcin, se ejecuta el comando:


Router(config)# secure boot-image

Para almacenar una copia del bootset primaria en un lugar

persistente, use el comando:


Router(config)# secure boot-config

R1(config)# secure boot-image R1(config)# secure boot-config

2012 Cisco and/or its affiliates. All rights reserved.

68

R1# show secure bootset IOS resilience router id JMX0704L5GH IOS image resilience version 12.3 activated at 08:16:51 UTC Sun Jun 16 2005 Secure archive slot0:c3745-js2-mz type is image (elf) [] file size is 25469248 bytes, run size is 25634900 bytes Runnable image, entry point 0x80008000, run from ram IOS configuration resilience version 12.3 activated at 08:17:02 UTC Sun Jun 16 2002 Secure archive slot0:.runcfg-20020616-081702.ar type is config configuration archive size 1059 bytes

2012 Cisco and/or its affiliates. All rights reserved.

69

Si el router est en peligro, hay que volver a cargar para iniciar el

proceso de recuperacin.
Recarga no es siempre necesario, y puede depender de las circunstancias. Debe entrar en el modo ROMMON.

Utilice los comandos dir y boot para listar el contenido del

dispositivo con bootset seguro y arrancar el router utilizando la imagen bootset seguro.
rommon 1 > dir [filesystem:] boot [partition-number:][filename]

Luego use el comando secure boot-config restore para

recuperar la startup-config asegurada


Router(config)# secure boot-config [restore filename]

2012 Cisco and/or its affiliates. All rights reserved.

70

R1# erase startup-config Erasing the nvram filesystem will remove all configuration files! Continue? [confirm] [OK] Erase of nvram: complete R1# show startup-config startup-config is not present R1# reload System configuration has been modified. Save? [yes/no]: n Proceed with reload? [confirm] ... Router> enable Router# show secure bootset %IOS image and configuration resilience is not active

2012 Cisco and/or its affiliates. All rights reserved.

71

Router# config t Router(config)# secure boot-config restore flash:archived-config ios resilience:configuration successfully restored as flash:archived-config Router(config)# ^C Router# configure replace flash:archived-config This will apply all necessary additions and deletions to replace the current running configuration with the contents of the specified configuration file, which is assumed to be a complete configuration, not a partial configuration. Enter Y if you are sure you want to proceed. ? [no]: y Total number of passes: 1 Rollback Done R1# copy run start

2012 Cisco and/or its affiliates. All rights reserved.

72

R1# format flash: Format operation may take a while. Continue? [confirm] Format operation will destroy all data in "flash:". Continue? [confirm] Writing Monlib sectors... Monlib write complete Format: All system sectors written. OK... Format: Total sectors in formatted partition: 250848 Format: Total bytes in formatted partition: 128434176 Format: Operation completed successfully. Format of flash: complete R1#

2012 Cisco and/or its affiliates. All rights reserved.

73

Verify that flash is erased and reload the router.


R1# dir Directory of flash:/ No files in directory 128237568 bytes total (104640512 bytes free) Router# reload Proceed with reload? [confirm] *Oct 17 02:37:37.127: %SYS-5-RELOAD: Reload requested : Reload Command. by console. Reload Reason

2012 Cisco and/or its affiliates. All rights reserved.

74

The router boots up using the secured IOS image.


... cisco Systems, Inc. 170 West Tasman Drive San Jose, California 95134-1706 Cisco IOS Software, C181X Software (C181X-ADVIPSERVICESK9-M), Version 12.4(24)T, RELEASE SOFTWARE (fc1) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2009 by Cisco Systems, Inc. Compiled Thu 26-Feb-09 03:22 by prod_rel_team ... R1> enable Password:

2012 Cisco and/or its affiliates. All rights reserved.

75

En el caso de que el router est en peligro o necesita ser

recuperado de un mala contrasea, el administrador debe comprender los procedimientos de recuperacin de contrasea.
Por razones de seguridad, la recuperacin de contraseas

requiere que el administrador tiene acceso fsico al router mediante un cable de consola

2012 Cisco and/or its affiliates. All rights reserved.

76

2012 Cisco and/or its affiliates. All rights reserved.

77

2012 Cisco and/or its affiliates. All rights reserved.

78

2012 Cisco and/or its affiliates. All rights reserved.

79

2012 Cisco and/or its affiliates. All rights reserved.

80

R1(config)# no service password-recovery WARNING: Executing this command will disable password recovery mechanism. Do not execute this command without another plan for password recovery. Are you sure you want to continue? [yes/no]: yes R1(config) R1# sho run Building configuration... Current configuration : 836 bytes ! version 12.4 service timestamps debug datetime msec service timestamps log datetime msec service password-encryption no service password-recovery System Bootstrap, Version 12.4(13r)T, RELEASE SOFTWARE (fc1) Technical Support: http://www.cisco.com/techsupport Copyright (c) 2006 by cisco Systems, Inc. PLD version 0x10 GIO ASIC version 0x127 c1841 platform with 131072 Kbytes of main memory Main memory is configured to 64 bit mode with parity disabled PASSWORD RECOVERY FUNCTIONALITY IS DISABLED program load complete, entry point: 0x8000f000, size: 0xcb80

2012 Cisco and/or its affiliates. All rights reserved.

81

Anda mungkin juga menyukai