Network Protocols UNIT V NETWORK MANAGEMENT PROTOCOLS SNMPv

  • Slides: 84
Download presentation
Network Protocols UNIT V – NETWORK MANAGEMENT PROTOCOLS

Network Protocols UNIT V – NETWORK MANAGEMENT PROTOCOLS

SNMPv 3 q Background and security q q q threats SNMPv 3 Architecture SNMPv

SNMPv 3 q Background and security q q q threats SNMPv 3 Architecture SNMPv 3 Applications Message Format User-based Security Model (USM) View-based Access Control Model (VCAM)

Background q SGMP: monitor gateways q SNMP: simple but powerful SNMPv 2 q facilities

Background q SGMP: monitor gateways q SNMP: simple but powerful SNMPv 2 q facilities to monitor and control NEs o o o SMI MIB Protocol o SMI, MIB, Protocol, Conformance issues, compatibility issues q q SNMP deficiencies: q Difficulties in monitoring networks as opposed to nodes on networks, RMON q Lack of security facilities, S -SNMP SNMPv 2 Working Group: charged with all non security aspects SNMPv 2 Security WG o Based on S-SNMP, many unresolved issues q SNMPv 2 was finally issued w/out security features and security work and previous efforts resulted in creating a new standard, SNMPv 3

Design Requirements q Address the need for secure support (especially those required by set-request

Design Requirements q Address the need for secure support (especially those required by set-request operations) q Define an architecture that allows for longevity for SNMP q Allow different portions of the architecture to move at different speeds towards standard status q Allow for future extensions (Modular Implementation) q Keep SNMP simple q Allow for minimal implementations q Support also more complex features, which are required in large networks q Re-use existing specifications, whenever possible

Security Threats Modification of Information qan entity may alter in-transit SNMP messages generated on

Security Threats Modification of Information qan entity may alter in-transit SNMP messages generated on behalf of an authorized principal in such a way as to effect unauthorized management operations, including falsifying the value of an object Masquerade qmanagement operations not authorized for some entity may be attempted by assuming the identity of another entity that has the appropriate authorizations Modification of information Masquerade Message stream modification Management Entity A Management Entity B Disclosure

Security Threats Message Stream Modification q. SNMP is typically based upon a connectionless transport

Security Threats Message Stream Modification q. SNMP is typically based upon a connectionless transport service. Messages may be maliciously reordered, delayed or replayed, in order to effect unauthorized management operations. o. For example, a message to reboot a system could be copied and replayed later Disclosure q. Eavesdropping or intercepting on the exchanges between SNMP engines Modification of information Masquerade Message stream modification Management Entity A Management Entity B Disclosure

Security Threats SNMPv 3 is not intended to secure against these two threats: Denial

Security Threats SNMPv 3 is not intended to secure against these two threats: Denial of Service: q. An attacker may prevent exchanges between manager and agent are indistinguishable from network element failures q. DOS may disrupt all services (not just those pertaining to NM) Modification of information Masquerade Message stream modification q. DOS Management Entity A Management Entity B Disclosure Traffic Analysis: q. An attacker may observe the general pattern of traffic between managers and agents

SNMPv 3 q Background and security q q q threats SNMPv 3 Architecture SNMPv

SNMPv 3 q Background and security q q q threats SNMPv 3 Architecture SNMPv 3 Applications Message Format User-based Security Model (USM) View-based Access Control Model (VCAM)

SNMP Architecture q Distributed, interacting collection of SNMP entities q SNMP entity implements a

SNMP Architecture q Distributed, interacting collection of SNMP entities q SNMP entity implements a portion of the SNMP capability: q It acts either as an agent or manager or both q A collection of modules interacting with each other to provide services SNMP ENTITY SNMP APPLICATIONS COMMAND GENERATOR COMMAND RESPONDER NOTIFICATION ORIGINATOR NOTIFICATION RECEIVER PROXY FORWARDER OTHER SNMP ENGINE DISPATCHER MESSAGE PROCESSING SUBSYSTEM SECURITY SUBSYSTEM ACCESS CONTROL SUBSYSTEM

SNMP Architecture Advantages: q. The role of SNMP entity is determined by the modules

SNMP Architecture Advantages: q. The role of SNMP entity is determined by the modules implemented in that entity o. Certain set of modules are required for agent, while a different set is required for a manager q. Security subsystem provides services such as authentication and privacy of messages o. Multiple security models can coexist q. Set of authorization services an application can use for checking access rights o. Access Control

SNMP Architecture-Manager COMMAND GENERATOR PDU DISPATCHER NOTIFICATION RECEIVER MESSAGE PROCESSING SUBSYSTEM SNMPv 1 MESSAGE

SNMP Architecture-Manager COMMAND GENERATOR PDU DISPATCHER NOTIFICATION RECEIVER MESSAGE PROCESSING SUBSYSTEM SNMPv 1 MESSAGE DISPATCHER SNMPv 2 C NOTIFICATION ORIGINATOR SECURITY SUBSYSTEM COMMUNITY BASED SECURITY MODEL USER BASED SECURITY MODEL SNMPv 3 TRANSPORT MAPPINGS OTHER SECURITY MODEL

SNMPv 3 Architecture-Manager q. Command Generator Application o. Monitor and manipulate management data at

SNMPv 3 Architecture-Manager q. Command Generator Application o. Monitor and manipulate management data at remote agents o. Make use of SNMPv 1, v 2 PDUs: Get, Get. Next, Get. Bulk, etc. q. Notification Originator Application q. Initiates messages, such as Inform. Request PDU q. Notification Receiver Application o. Receive messages from other managers or agents o. Inform. Request, SNMPv 1 - and SNMPv 2 -Traps, etc… q. These applications make use of the services provided by the SNMP engine: o. Get Outgoing PDUs, process them and generates SNMP messages for transmission over the transport layer o. Accept incoming SNMP messages, process them, and extracts PDUs and passes them to appropriate SNMP application

SNMPv 3 Architecture-Manager SNMP Engine (identified by snmp. Engine. ID) Dispatcher Message Processing Subsystem

SNMPv 3 Architecture-Manager SNMP Engine (identified by snmp. Engine. ID) Dispatcher Message Processing Subsystem Security Subsystem q. One dispatcher in an SNMP engine o. Accepts PDUs from applications o. Handles multiple version messages (SNMPv 1, v 2, v 3) o. Interfaces with application modules, network, and message processing models q. Three components for three functions q. Transport mapper delivers messages over the transport protocol q. Routes messages between network and appropriate module of MPS q. PDU dispatcher handles messages between application and MPS

SNMPv 3 Architecture-Manager SNMP Engine (identified by snmp. Engine. ID) Dispatcher Message Processing Subsystem

SNMPv 3 Architecture-Manager SNMP Engine (identified by snmp. Engine. ID) Dispatcher Message Processing Subsystem Security Subsystem q. Accepts outgoing PDUs from Dispatcher, attach appropriate header, and return message to Dispatcher q. Accepts incoming messages, process each message header, and return the enclosed PDU to the Dispatcher q. Contains one or more Message Processing Models, each for each SNMP version q. SNMP version identified in the header

SNMPv 3 Architecture-Manager SNMP Engine (identified by snmp. Engine. ID) Dispatcher Message Processing Subsystem

SNMPv 3 Architecture-Manager SNMP Engine (identified by snmp. Engine. ID) Dispatcher Message Processing Subsystem Security Subsystem q. Security subsystems perform authentication and encryption functions for each outgoing/incoming message q. Outgoing PDUs may be encrypted and authentication codes generated and appended to the message header o. The message is then returned to the MPS q. Incoming messages are passed to the security subsystem o. Message decryption o. Messages authenticated

SNMPv 3 Architecture-Agent MANAGEMENT INFORMATION BASE ACCESS CONTROL SUBSYSTEM COMMAND RESPONDER PDU DISPATCHER VIEW

SNMPv 3 Architecture-Agent MANAGEMENT INFORMATION BASE ACCESS CONTROL SUBSYSTEM COMMAND RESPONDER PDU DISPATCHER VIEW BASED ACCESS CONTROL MESSAGE PROCESSING SUBSYSTEM SNMPv 1 MESSAGE DISPATCHER SNMPv 2 C NOTIFICATION ORIGINATOR Proxy Forwarder Applications SECURITY SUBSYSTEM COMMUNITY BASED SECURITY MODEL USER BASED SECURITY MODEL SNMPv 3 TRANSPORT MAPPINGS OTHER SECURITY MODEL

SNMPv 3 Architecture-Agent q. Command Responder Application o. Provides access to management data o.

SNMPv 3 Architecture-Agent q. Command Responder Application o. Provides access to management data o. Responds to incoming requests by retrieving and/or setting managed objects and issuing Response PDU q. Notification Originator Application oe. g. , SNMPv 1, v 2 Trap PDU q. Proxy Forwarder Application o. Forwards messages between entities q. Access Control Subsystem o. Provides authorization services to “control access” to the MIB for reading and setting management objects o. Who can access o. What can be accessed

Terminology SNMP Engine ID snmp. Engine. ID -- associated with each SNMP entity Principal

Terminology SNMP Engine ID snmp. Engine. ID -- associated with each SNMP entity Principal principal Security Name security. Name -- Context Engine ID context. Engine. ID -- each entity has a unique Context Name context. Name --a context associated with a -- person or group or application requesting services human readable name context ID (identical to snmp. Engine. ID) managed object (for access control) An SNMP agent can monitor more than one network element (context) Example: SNMP Engine ID Principal Security Name IP address John Smith Administrator

snmp. Engine. ID

snmp. Engine. ID

Abstract Service Interfaces q. Abstract service interface is a conceptual interface between modules, independent

Abstract Service Interfaces q. Abstract service interface is a conceptual interface between modules, independent of implementation q. Defines a set of primitives o. A primitive specifies the function to be performed (e. g. , procedural call) q. Primitives associated with receiving entities o. An interface defined using primitive and parameters is referred to as “abstract service interface” qe. g. , Dispatcher primitives: o. Handle messages to and from applications oregistering and un-registering of application modules otransmitting to and receiving messages from network q. IN and OUT parameters q. Status information / result

send. Pdu Command Generator send. Pdu. Handle/ Error Indication Abstract Service Interface Dispatcher prepare.

send. Pdu Command Generator send. Pdu. Handle/ Error Indication Abstract Service Interface Dispatcher prepare. Outgoing. Message Dispatcher Primitives Message Processing Model Abstract Service Interface q. Used by a command generator to send SNMP request or notification PDU to another SNMP entity q. When successfully preparing the message by the Dispatcher: a send. Pdu. Handle (unique identifier) is returned (to track any response, if any is expected) q. The application also provides transport domain/address for the PDU as well as message processing model, security model, principal, level of security, the context for this PDU, and the PDU itself

send. Pdu Command Generator send. Pdu. Handle/ error. Indication Dispatcher process. Response. Pdu prepare.

send. Pdu Command Generator send. Pdu. Handle/ error. Indication Dispatcher process. Response. Pdu prepare. Outgoing. Message Dispatcher Primitives Message Processing Model Abstract Service Interface process. Response. Pdu q. Used by Dispatcher to pass an incoming response PDU to an application q. The application checks whether it is matched with a preceding request or notification PDU by checking the send. Pdu. Handle: q. Success or failure

return. Response. Pdu Command Responder Dispatcher process. Pdu prepare. Response. Message Dispatcher Primitives Message

return. Response. Pdu Command Responder Dispatcher process. Pdu prepare. Response. Message Dispatcher Primitives Message Processing Model Abstract Service Interface q. Used by Dispatcher to pass an incoming request or notification PDU to an application (command responder) q. Security related information is required to generate a matching response message q. The security subsystem (access control) will check whether access is allowed and a response will be generated accordingly return. Response. Pdu q. Used by command responder to return an SNMP response in response to an incoming request or notification

send. Pdu Command Generator send. Pdu. Handle/ error. Indication Dispatcher prepare. Outgoing. Message Processing

send. Pdu Command Generator send. Pdu. Handle/ error. Indication Dispatcher prepare. Outgoing. Message Processing Subsystem Primitives Message Processing Model Abstract Service Interface prepare. Outgoing. Message q Prepare a message for an outgoing SNMP request or notification PDU q The IN parameter is a PDU and OUT parameter is the message q Success or failure is returned

return. Response. Pdu Command Responder Dispatcher process. Pdu prepare. Response. Message Processing Subsystem Primitives

return. Response. Pdu Command Responder Dispatcher process. Pdu prepare. Response. Message Processing Subsystem Primitives Message Processing Model Abstract Service Interface prepare. Response. Message q Request the preparation of a message containing an outgoing SNMP response PDU, in response to an incoming request or notification PDU

Security Subsystem Primitives generate. Request. Message q. Generate a “message” containing an outgoing SNMP

Security Subsystem Primitives generate. Request. Message q. Generate a “message” containing an outgoing SNMP request or notification PDU q. Returns to the MPS a message (with possibly authentication and encryption) and associated security parameters process. Incoming. Message q. Provide security function for incoming messages q. Return success or failure indicating the result of the security check q. If successful, a PDU is returned to the MPS generate. Response. Message q. Generate a message containing outgoing SNMP response PDU in response to incoming request or notification q. Returns to the MPS a message (with some authentication and encryption applied) and associated security parameters

SNMPv 3 q Background and security q q q threats SNMPv 3 Architecture SNMPv

SNMPv 3 q Background and security q q q threats SNMPv 3 Architecture SNMPv 3 Applications Message Format User-based Security Model (USM) View-based Access Control Model (VCAM)

Command Generator: 1)-Examine parameters from the received PDU and match/compare them with a cached

Command Generator: 1)-Examine parameters from the received PDU and match/compare them with a cached copy (security model/level/name, context. Name, etc. ). If no match, message is discarded 2)-Check the received PDU (check request-id, etc. ) 3)- if all OK, then take action

Command Responder: 1)-examines content of request PDU. Check whether object has already registered with

Command Responder: 1)-examines content of request PDU. Check whether object has already registered with the responder 2)- is. Access. Allowed primitive is invoked (to determine whether object can be accessed by the principal making the request) check the security level 3)- if access permitted, prepare a response.

Scenario Diagrams

Scenario Diagrams

Scenario Diagrams

Scenario Diagrams

Scenario Diagrams

Scenario Diagrams

Scenario Diagrams

Scenario Diagrams

Scenario Diagrams

Scenario Diagrams

Scenario Diagrams

Scenario Diagrams

Scenario Diagrams

Scenario Diagrams

Scenario Diagrams

Scenario Diagrams

Scenario Diagrams

Scenario Diagrams

Scenario Diagrams

Scenario Diagrams

Scenario Diagrams

Scenario Diagrams

Scenario Diagrams

Scenario Diagrams

Scenario Diagrams

Scenario Diagrams

Scenario Diagrams

Scenario Diagrams

Scenario Diagrams

Scenario Diagrams

Scenario Diagrams

Scenario Diagrams

SNMPv 3 q Background and security q q q threats SNMPv 3 Architecture SNMPv

SNMPv 3 q Background and security q q q threats SNMPv 3 Architecture SNMPv 3 Applications Message Format User-based Security Model (USM) View-based Access Control Model (VCAM)

Message Format reportable. Flag priv. Flag auth. Flag Header Data Message ID Message Max.

Message Format reportable. Flag priv. Flag auth. Flag Header Data Message ID Message Max. Size Message Flag Version scoped. PDU Message Security Model Global/ Header Data 1 SNMPv 1 2 SNMPv 2 3 SNMPv 3 Security Parameters Context Engine ID Plaintext / Encrypted scoped. PDU Data Context Name Whole Message Security Parameters Authoritative Engine ID Authoritative Engine Boots Authoritative Engine Time synch. between entities to avoid message replay and achieve timeliness User Name Authentication Parameters Data Privacy Parameters

Message Format

Message Format

SNMPv 3 q Background and security q q q threats SNMPv 3 Architecture SNMPv

SNMPv 3 q Background and security q q q threats SNMPv 3 Architecture SNMPv 3 Applications Message Format User-based Security Model (USM) View-based Access Control Model (VCAM)

Security Model Goals q. Verification that each received SNMP message has not been modified

Security Model Goals q. Verification that each received SNMP message has not been modified during its transmission through the network o. Data Integrity (Authentication) q. Verification of the identity of the user on whose behalf a received SNMP message claims to have been generated. o. Authentication q. Detection of received SNMP messages, which request or contain management information, whose time of generation was not recent o. Message redirection/re-ordering/delay/replay q. Ensure that the contents of each received SNMP message are protected from disclosure o. Data encryption/decryption

Security Model Security Subsystem Data Integrity Data Origin Authentication Message Processing Model Authentication Module

Security Model Security Subsystem Data Integrity Data Origin Authentication Message Processing Model Authentication Module Data Confidentiality Privacy Module Message Timeliness & Limited Replay Protection Timeliness Module q. The Security model authenticates and forwards incoming and outgoing messages to the MPM q 3 different modules o. Authentication o. Privacy module o. Timeliness module

Authentication Module Security Subsystem Data Integrity Data Origin Authentication Message Processing Model Authentication Module

Authentication Module Security Subsystem Data Integrity Data Origin Authentication Message Processing Model Authentication Module Data Confidentiality Privacy Module Message Timeliness & Limited Replay Protection Timeliness Module q. Data integrity omessage authentication at sender and validation at receiver o. Ensure that a message is not modified by an unauthorized intruder o. Authentication protocols: HMAC-MD 5 -96 / HMAC-SHA-96 q. Data origin authentication o. Check the identity of a user on whose behalf a message is sent o. Append to the message a unique Identifier associated with authoritative SNMP engine

Privacy Module Security Subsystem Data Integrity Data Origin Authentication Message Processing Model Data Confidentiality

Privacy Module Security Subsystem Data Integrity Data Origin Authentication Message Processing Model Data Confidentiality Message Timeliness & Limited Replay Protection Authentication Module Privacy Module Timeliness Module q. Data confidentiality ensures that data is not made available to unauthorized users or entities q. Encryption is applied at the sender and decryption at receiver (CBC-DES)

Timeliness Module Security Subsystem Data Integrity Data Origin Authentication Message Processing Model Data Confidentiality

Timeliness Module Security Subsystem Data Integrity Data Origin Authentication Message Processing Model Data Confidentiality Message Timeliness & Limited Replay Protection Authentication Module Privacy Module Timeliness Module q. Prevent message redirection, delay and replay q. Configure a receiver window for accepting message (e. g. , 150 s for SNMPv 3) q. Three objects: snmp. Engine. IP, snmp. Engine. Boots, snmp. Engine. Time

Authoritative vs. non-authoritative engine q. Responsibility of Authoritative engine o Unique SNMP engine ID

Authoritative vs. non-authoritative engine q. Responsibility of Authoritative engine o Unique SNMP engine ID o Time-stamp (a clock maintained by the authoritative engine) q Non-authoritative engine should keep a table of the time-stamp and authoritative engine ID o. Synchronize its clock with regard to that of the authoritative engine Non-Authoritative Engine (NMS) Authoritative Engine (Agent)

User-based Security Model (USM) q. USM primitives across abstract service interfaces Authentication service primitives

User-based Security Model (USM) q. USM primitives across abstract service interfaces Authentication service primitives o authenticate. Outgoing. Msg o authenticate. Incoming. Msg o Privacy Services o encrypt. Data // outgoing PDU o decrypt. Data // incoming PDU o

User-based Security Model (USM) Security Subsystem MPM Information Header data Security data scoped. PDU

User-based Security Model (USM) Security Subsystem MPM Information Header data Security data scoped. PDU User-based Security Model Encryption key scoped. PDU Privacy parameters Privacy Module Encrypted scoped. PDU Message Processing Model (Authenticated/encrypted) whole message Whole message length Authentication key Whole Message Authenticated Whole Message Security Parameters Privacy and Authentication Service for Outgoing Message Authentication Module

User-based Security Model (USM) Security Subsystem MPM Information Header data Security data scoped. PDU

User-based Security Model (USM) Security Subsystem MPM Information Header data Security data scoped. PDU User-based Security Model Encryption key scoped. PDU Privacy parameters Privacy Module Encrypted scoped. PDU Message Processing Model (Authenticated/encrypted) whole message Whole message length Authentication key Whole Message Authenticated Whole Message Authentication Module Security Parameters q. USM invokes privacy module w/ encryption key and scoped. PDU q. Privacy module returns privacy parameters and encrypted scoped. PDU q. USM then invokes the authentication module w/authentication key and whole message and receives authenticated whole message

User-based Security Model (USM) Security Subsystem MPM Information Header data Security parameters whole message

User-based Security Model (USM) Security Subsystem MPM Information Header data Security parameters whole message Authentication key User-based Security Model Whole Message (as received from network) Authentication parameters Authentication Module Authenticated Whole Message Processing Model Decrypt key Encrypted PDU (Decrypted) scoped. PDU Privacy parameters Privacy Module Decrypted scoped. PDU q Processing secure incoming message reverse of secure outgoing message q Authentication validation done first by the authentication module q Decryption of the message done then by the privacy module

User-based Security Model (USM) qmsg. User. Name: user or a principal on whose behalf

User-based Security Model (USM) qmsg. User. Name: user or a principal on whose behalf the message is being exchanged q msg. Authentication. Parameters: defined by authentication protocol qmsg. Privacy. Parameters: type of privacy protocol used

SNMPv 3 -Next! q Background and security threats q SNMPv 3 Architecture q SNMPv

SNMPv 3 -Next! q Background and security threats q SNMPv 3 Architecture q SNMPv 3 Applications q Message Format q User-based Security Model (USM) q USM Timeliness Mechanism q Cryptographic Functions q USM Message Processing q Discovery q Key Management q View-based Access Control Model (VCAM)

USM Timeliness Mechanism Management of authoritative clocks q. All authoritative engines must maintain two

USM Timeliness Mechanism Management of authoritative clocks q. All authoritative engines must maintain two objects: o snmp. Engine. Boots o snmp. Engine. Time q. Initially, both are set to 0 qsnmp. Engine. Time is incremented once per second qsnmp. Engine. Boots is incremented if the system has rebooted or if snmp. Engine. Time reaches its maximum value (231 -1) o if an authoritative engine does not know its latest snmp. Engine. Boots = 231 -1 o variable latched at its maximum needs to be manually reconfigured and new snmp. Engine. ID is assigned

USM Timeliness Mechanism Synchronization q. A non-authoritative engine must remain loosely synchronized with each

USM Timeliness Mechanism Synchronization q. A non-authoritative engine must remain loosely synchronized with each authoritative engine with which it communicates q. A non-authoritative engine keeps a local copy of 3 variables for each authoritative engine: o snmp. Engine. Boots: o Most recent value of snmp. Engine. Boots for the remote authoritative engine o snmp. Engine. Time: o Synchronized to the authoritative engine. Between synch events, it is incremented once per second to maintain loose synch o latest. Received. Engine. Time: o Highest value of msg. Authoritative. Engine. Time. o. It protects against a replay message attack o These values are stored in a cache indexed by snmp. Engine. ID

USM Timeliness Mechanism Synchronization (cont’d) authoritative non-authoritative msg. Authoritative. Engine. Boots, msg. Athoritative. Engine.

USM Timeliness Mechanism Synchronization (cont’d) authoritative non-authoritative msg. Authoritative. Engine. Boots, msg. Athoritative. Engine. Time, msg. Athoritative. Engine. ID If message is authentic non auth. updates its local variables according to this rule: (msg. Authoritative. Engine. Boots > snmp. Engine. Boots) OR [(msg. Authoritative. Engine. Boots = snmp. Engine. Boots) AND (msg. Authoritative. Engine. Time > latest. Received. Engine. Time)] If two messages arrive out of order or a replay attack is underway!

USM Timeliness Mechanism Synchronization (cont’d) q. If an update is called for, then snmp.

USM Timeliness Mechanism Synchronization (cont’d) q. If an update is called for, then snmp. Engine. Boots : = msg. Authoritative. Engine. Boots snmp. Engine. Time : = msg. Authoritative. Engine. Time latest. Received. Engine. Time : = msg. Authoritative. Engine. Time q. If (msg. Authoritative. Engine. Boots < snmp. Engine. Boots) then no update occurs [Message not authentic to be discarded] q. If [(msg. Authoritative. Engine. Boots = snmp. Engine. Boots) AND (msg. Authoritative. Engine. Time < latest. Received. Engine. Time)] then no update occurs [Message may be authentic but may be misordered Update of snmp. Engine. Time is not warranted]

USM Timeliness Mechanism Timeliness checking by authoritative receiver q. Ensure that messages are received

USM Timeliness Mechanism Timeliness checking by authoritative receiver q. Ensure that messages are received within a reasonable time window (avoid delays and replays) q. Too small time window authentic messages may be considered as unauthentic q. Too large increase vulnerability for attacks q. Incoming message is considered outside the time window if the following is true : snmp. Engine. Boots = (231 -1) OR msg. Authoritative. Engine. Boots snmp. Engine. Boots OR The value of msg. Authoritative. Engine. Time differs from that of snmp. Engine. Time by more than ± 150 seconds. message is considered not authentic (discarded and error message returned)

USM Timeliness Mechanism Timeliness checking by non-authoritative receiver q. Incoming message is considered outside

USM Timeliness Mechanism Timeliness checking by non-authoritative receiver q. Incoming message is considered outside the time window if the following is true: snmp. Engine. Boots = (231 -1) OR msg. Authoritative. Engine. Boots < snmp. Engine. Boots OR [(msg. Authoritative. Engine. Boots = snmp. Engine. Boots) AND msg. Authoritative. Engine. Time < snmp. Engine. Time – 150] NOTE: msg. Authoritative. Engine. Boots > snmp. Engine. Boots is allowed

Cryptographic Functions-Authentication 2 functions defined by USM authentication: auth. Key q encryption: priv. Key

Cryptographic Functions-Authentication 2 functions defined by USM authentication: auth. Key q encryption: priv. Key q auth. Key and priv. Key are derived from the password and are not accessible via SNMP q 1 - Authentication q Two authentication protocols o HMAC-MD 5 -96 (Message Digest) o HMAC-SHA 1 -96 (Secure Hash Algorithm) q. HMAC: message authentication code generation from auth. Key q. A 96 -bit MAC code generated and inserted in msg. Authentication. Parameters field of the message q. MD-5 (16 -octet) and SHA 1 (20 -octet) are the underlying hash functions

Cryptographic Functions-Authentication Procedure: 1. Derive extended. Auth. Key: Supplement auth. Key with 0 s

Cryptographic Functions-Authentication Procedure: 1. Derive extended. Auth. Key: Supplement auth. Key with 0 s to get 64 -byte string 2. Define ipad, opad, K 1, and K 2: ipad = 0 x 36 (00110110) repeated 64 times opad = 0 x 5 c (01011100) repeated 64 times K 1 = extended. Auth. Key XOR ipad K 2 = extended. Auth. Key XOR opad 3. Derive HMAC by hashing algorithm used HMAC = H (K 2, H (K 1, whole. Msg)) Depending on whether MD-5 or SHA-1 is used, the algorithm produces a 16 (MD-5) or 20 (SHA-1)-octet length output which is truncated to produce a 12 -octet MAC

Cryptographic Functions-Authentication

Cryptographic Functions-Authentication

To authenticate KEY DATA KEY HASH FUNCTION DATA HASH FUNCTION MAC =? USER MAC

To authenticate KEY DATA KEY HASH FUNCTION DATA HASH FUNCTION MAC =? USER MAC sender DATA USER MAC receiver DATA

Cryptographic Functions-Encryption 2 - Encryption and decryption of scoped PDU (context engine ID, context

Cryptographic Functions-Encryption 2 - Encryption and decryption of scoped PDU (context engine ID, context name, and PDU) q CBC - DES (Cipher Block Chaining - Data Encryption Standard) symmetric protocol 16 octet priv. Key (derived from password, similar to auth. Key ) is used as input to encryption protocol o First 8 octets of priv. Key are used as DES key (only 56 bits LSB of each octet is ignored) o

Cryptographic Functions-Encryption q CBC Mode o. Last 8 -octet of priv. Key used as

Cryptographic Functions-Encryption q CBC Mode o. Last 8 -octet of priv. Key used as preinitialization vector (pre-IV) o. Generate salt value (8 octets): <snmp. Egine. Boots || local value> Initialization vector: IV = salt XOR pre-IV o. Transmit Local value: 4 -octet integer, implementation dependent, modified after each use. salt in msg. Privacy. Parameters so that receiver can recover the IV

Cryptographic Functions-Encryption P 1 P 2 Pn IV Cn-1 k DES Encrypt C 2

Cryptographic Functions-Encryption P 1 P 2 Pn IV Cn-1 k DES Encrypt C 2 Encryption Data is divided into blocks of 64 bits each. K is shared between sender and receiver k DES Encrypt Cn

Cryptographic Functions-Encryption C 1 k DES Decrypt C 2 k DES Decrypt Cn k

Cryptographic Functions-Encryption C 1 k DES Decrypt C 2 k DES Decrypt Cn k DES Decrypt IV Cn-1 P 2 Decryption IV at the receiver is generated from the salt that is transmitted in the message Pn

USM Message Processing Retrieve user information Privacy Required? Security name of principal Auth. snmp.

USM Message Processing Retrieve user information Privacy Required? Security name of principal Auth. snmp. Engine. ID Determine security level … YES Encrypt scoped. PDU set msg. Privacy. Paramters NO msg. Privacy. Paramters NULL Authent. Required? YES NO msg. Authent. Paramters NULL Message Transmission Compute MAC set msg. Authent. Paramters

USM Message Processing security level Security model Security name…. Retrieve msg parameters Authent. Required?

USM Message Processing security level Security model Security name…. Retrieve msg parameters Authent. Required? YES NO Privacy Required? Compute MAC msg. Authent. Paramters Determine if msg is within time window YES NO Message reception Encrypt Decrypt scoped. PDU set msg. Privacy. Paramters Time synch. Timeliness check

Discovery q. The non-authoritative engine sends a Request message: security. Level = no. Authno.

Discovery q. The non-authoritative engine sends a Request message: security. Level = no. Authno. Priv msg. User. Name = “initial” msg. Authoritative. Engine. ID = null var. Bind. List = null q. The authoritative engine responds with: msg. Authoritative. Engine. ID = snmp. Engine. ID (its own) q. If authenticated communication is required o The non-authoritative engine establishes time synchronization with the authoritative engine o Authoritative engine sends an Report message with its current values: msg. Authoritative. Engine. Boots = snmp. Engine. Boots msg. Authoritative. Engine. Time = snmp. Engine. Time

Key Management q. Authentication and privacy keys are required q. A principal (i. e.

Key Management q. Authentication and privacy keys are required q. A principal (i. e. , NMS) should deploy or use only one auth. key and one priv. key. q. Keys are stored for the user’s password q. Password: human readable, not easy guessed q. Keys are not accessible via SNMP and are not stored in the MIB Password to key generation 1)- Repeat the psswd to generate 220 bytes digest 0 2)digest 1 = Hash (digest 0) digest 1 is 16 -octet (MD-5) or 20 -octet (SHA-1) auth. Key is digest 1 NOTE : : A single password can be used (auth. Key and priv. Key are the same) or 2 passwords for 2 different keys

Key Localization q. A localized key is a secret key shared between a user

Key Localization q. A localized key is a secret key shared between a user and one authoritative SNMP Engine q. Hence, a user can communicate with many agents but maintains only one key (i. e. , only one password) Agent 1 Agent 2 User 1 (auth. Key 1_1, priv. Key 1_1) User 1 (auth. Key 2_1, priv. Key 2_1) User 2 (auth. Key 1_2, priv. Key 1_2) User 4 (auth. Key 2_4, priv. Key 2_4) If compromised, other keys are not! If this agent compromised, only its keys are compromised. Other agents are safe.

Generating localized Keys Take Hash of user key and Remote Engine ID password Take

Generating localized Keys Take Hash of user key and Remote Engine ID password Take Hash of expanded password string Take Hash of user key and Remote Engine ID Localized Key digest 2 Localized key User Key (digest 1) Localized keys are initially configured in a secure way ( could be manual!) Take Hash of user key and Remote Engine ID Localized key

Key Update To enhance security, Keys are to be updated from time to time:

Key Update To enhance security, Keys are to be updated from time to time: key. Old key. New Requestor: 1)- Generate random 2)- Compute: digest = Hash ( key. Old || random ) 3)- delta = digest XOR key. New 4)- protocol. Key. Change = ( random || delta) Send a message set. Request ( protocol. Key. Change ) Receiver: 1)- compute digest = Hash( key. Old || random) 2)- compute key. New = digest XOR delta NOTE: digest XOR delta = digest XOR (digest XOR key. New) = key. New Since an attacker does not know key. Old, the update of the key is safe

Access Control q Agent can validate sending sources and their access privilege for command

Access Control q Agent can validate sending sources and their access privilege for command requests. q. Step following Authentication q. Maintain a local database contains access rights and policies MIB VIEW Allowed Operations Allowed managers Required Level of Security Interface Table SET John Authentication, Encryption Interface Table GET/GETNEXT John, Paul Authentication Systems Group GET/GETNEXT Georges None

Access Control (read, write, or send notification)

Access Control (read, write, or send notification)