Secure Access Control Flashcards
Types of password protection
1) Enable secret password
2) Line password
3) Username password
Password Hash Types
1) MD5 (default, weak, Type-5)
2) SHA-256 (Type-8)
3) Scrypt (strongest available, Type-9)
4) Vigenère cipher (line passworrd default, very weak, Type-7)
Command to configure enable secret password
Router(config)# enable algorithm-type scrypt secret BLAHBLAH
- default algorithm-type is md5
- global config mode
- verify with show run | i enable
Line Password Only Configuration
Router(config)# line con 0
Router(config-line)# password BLAHBLAH
Router(config-line)# login
Router(config-line)# exec-timeout 5 0
Router(config)# service password-encryption
Line Username/Password Configuration
Router(config)# username BLAHUSER password BLAHPASS
Router(config)# line con 0
Router(config-line)# login local
ip http authentication local
- command to use the local creds for HTTP/S access
security password min-length BLAHLENGTH
- (Global configuration) Ensure that all configured passwords are at least a specified length
transport input ssh
- (vty lines) Allows only inbound SSH connections instead of Telnet
login block-for BLAHSECONDS attempts BLAHTRIES within BLAHSECONDS
- (Global configuration) Disables logins after a specific number of failed login attempts within a specific time
login quiet-mode access-class BLAHACL
- (Global configuration) Named or numbered ACL identifies permitted hosts to ensure that authorized devices can always connect
login delay BLAHSECONDS
- (Global configuration) Specifies a number of seconds the user must wait between unsuccessful login attempts
service password-encryption
- enables Type-7 encryption of cleartext passwords
AAA Framework
1) Authentication - Who are you?
2) Authorization - What are you allowed to do?
3) Accounting - What did you do?
Authetication Methods
1) Something you know - credentials
2) Something you have - certificates
3) Something you are - biometrics
Command to configure authentication
Router(config)# aaa authentication BLAHSERVICE { default | BLAHLIST } BLAHMETHOD1 [ BLAHMETHOD2 …]
- service is either login, ppp, or dot1x
- method can be local, enable, none or group for tacacs/radius servers
- method2 is the fallback for method1, etc
- none method means access is allowed without creds
Network Access Server (NAS)
- a client that users contact to gain access to a protected resource
- typically a router, switch, firewall, or access-point
RADIUS Traits
1) RFC 2865, RFC 2866
2) UDP 1812 & 1813
3) combines authentication and authorization, and separates accounting
4) one-way, unidirectional, with a single challenge response
5) only encrypts password
6) network access
TACACS+ Traits
1) Cisco proprietary
2) TCP 49
3) uses AAA model and separates three services
4) two-way, bidirectional, with simple challenge responses
5) encrypts entire packet body
6) device administration
Network Access AAA Flow
- usually RADIUS
1) Access-Request - NAS to RADIUS, contains Username, Password, NAS Info
2) Access-Challenge (Optional) - RADIUS to NAS, contains reauthentication parameters
3) Access-Request (if Access-Challenge), NAS to RADIUS, contains Username, Password
4) Access-Accept / Access-Reject - RADIUS to NAS, contains Reply Attributes (User Service)
5) Accounting Request - NAS to Radius, contains Accounting Information
6) Accounting Response - RADIUS to NAS, contains Acknowledgement (Accounting Info Received)
Device Access AAA Flow
- Communication between the NAS and TACACS+ server starts with an established TCP connection
1) START - NAS to TACACS+, initiate authentication request
2) GET USER - TACACS+ to NAS, Username:
3) CONTINUE - NAS to TACACS+, Username = BLAHUSER
4) GET PASS - TACACS+ to NAS, Password:
5) CONTINUE - NAS to TACACS+, Password = BLAHPASS
6) ACCEPT/REJECT - TACACS+ to NAS, final status
Command to enable AAA
aaa new-model
- immediately applies to all lines and interfaces except line con 0
- to avoid being locked out, define a local username first
RADIUS Config Steps
1) Configure RADIUS Server
2) Add RADIUS server to a group
3) Configure authentication to use the server group
4) Apply the authentication to lines
Commands to configure RADIUS server
Router(config)# radius server BLAHRADSRV
Router(config-radius-server)# address ipv4 10.255.255.101 auth-port 1812 acct-port 1813
Router(config-radius-server)# key BLAHSECRET
Command to associate RADIUS server with a group
Router(config)# aaa group server radius BLAHRADGRP
Router(config-sg-radius)# server name BLAHRADSRV