SNMPv3 Architecture Overview
SNMPv3 Architecture Overview
Most High
SNMPv3
by
Dr. Angelito F. Argete
1
Key Features of SNMPv3
Modularization of documentation and architecture
Enables the use of SNMPv1 and SNMPv2 with the newly
developed SNMPv3.
SNMP engine defined
– A model for the processing of SNMP messages.
New Security features
– Secure information to prevent tampering of data
– Access control to determine proper access to MIB.
2
Documentation
3
SNMP Architecture
SNMP ENTITY
SNMP APPLICATIONS
SNMP ENGINE
MESSAGE
DISPATCHER SNMPv2C
USER BASED
SECURITY MODEL
SNMPv3
OTHER
TRANSPORT SECURITY MODEL
MAPPINGS OTHER
SNMPv3 Architecture-Manager
SNMPv3 Architecture-Manager
SNMP Engine (identified by snmpEngineID)
Message
Security
Dispatcher Processing
Subsystem
Subsystem
Message
Security
Dispatcher Processing
Subsystem
Subsystem
Message
Security
Dispatcher Processing
Subsystem
Subsystem
MESSAGE
DISPATCHER SNMPv2C USER BASED
SECURITY MODEL
SNMPv3
OTHER
TRANSPORT SECURITY MODEL
MAPPINGS OTHER
SNMPv3 Architecture-Agent
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
Notification Originator Application
o e.g., SNMPv1, v2 Trap PDU
SNMP ENTITY
OT HE R
SNMP ENGINE
snmpEngineID=1
SNMP ENTITY
O TH ER
SNMP ENGINE
snmpEngineID=2
SNMP ENTITY
SNMP ENTITY
O TH ER
O TH ER
SNMP ENGINE
snmpEngineID=4
SNMP ENGINE
snmpEngineID=3
Abstract Service Interfaces
Abstract service interface is a conceptual interface between
modules, independent of implementation
Defines a set of primitives
o A primitive specifies the function to be performed (e.g.,
procedural call)
Primitives associated with receiving entities
o An interface defined using primitive and parameters is referred
to as “abstract service interface”
e.g., Dispatcher primitives:
o Handle messages to and from applications
o registering and un-registering of application modules
o transmitting to and receiving messages from network
prepareOutgoingMessage
sendPdu
Message
Command sendPduHandle/
Dispatcher Processing
Generator Error Indication
Model
Abstract
Abstract Service
Service Interface
sendPdu
Interface
prepareOutgoingMessage
sendPdu
Message
Command sendPduHandle/
Dispatcher Processing
Generator errorIndication
Model
processResponsePdu
Abstract
Service
Interface
processResponsePdu
Used by Dispatcher to pass an incoming response PDU to
an application
The application checks whether it is matched with a
preceding request or notification PDU by checking the
sendPduHandle:
Success or failure
Dispatcher Primitives
prepareResponseMessage
returnResponsePdu
Message
Command
Dispatcher Processing
Responder
Model
processPdu
Abstract
Service
processPdu Interface
Used by Dispatcher to pass an incoming request or
notification PDU to an application (command responder)
Security related information is required to generate a matching
response message
The security subsystem (access control) will check whether access
is allowed and a response will be generated accordingly
returnResponsePdu
Used by command responder to return an SNMP response in
response to an incoming request or notification
Message Processing Subsystem Primitives
prepareOutgoingMessage
sendPdu
Message
Command sendPduHandle/
Dispatcher Processing
Generator errorIndication
Model
Abstract
Service
Interface
prepareOutgoingMessage
Prepare a message for an outgoing SNMP request or notification
PDU
The IN parameter is a PDU and OUT parameter is the message
Success or failure is returned
Message Processing Subsystem Primitives
prepareResponseMessage
returnResponsePdu
Message
Command
Dispatcher Processing
Responder
Model
processPdu
Abstract
Service
Interface
prepareResponseMessage
Request the preparation of a message containing an
outgoing SNMP response PDU, in response to an
incoming request or notification PDU
Security Subsystem Primitives
generateRequestMessage
Generate a “message” containing an outgoing SNMP request or
notification PDU
Returns to the MPS a message (with possibly authentication and
encryption) and associated security parameters
processIncomingMessage
Provide security function for incoming messages
Return success or failure indicating the result of the security check
If successful, a PDU is returned to the MPS
generateResponseMessage
Generate a message containing outgoing SNMP response PDU in
response to incoming request or notification
Returns to the MPS a message (with some authentication and encryption
applied) and associated security parameters
Applications
Application(s)
Command Notification Proxy
Forwarder
Generator Receiver Subsystem
Command Notification
Other
Responder Originator
Application Example
• Command generator get-request
• Command responder get-response
• Notification originator trap generation
• Notification receiver trap processing
• Proxy Forwarder get-bulk to get-next
(SNMP versions only)
• Other Special application
22
Command Generator
Message
Processing Security
Command Model Model
Generator Dispatcher
discarded
2)-Check the received PDU receive get-response message
(check request-id,
etc.) prepareDataElemets
processIncomingMsg
3)- if all OK, then take action
processResponsePdu
Message
Command Security
Dispatcher Processing
Generator Model
Model
Command Responder
Message
Command Processing Security
Dispatcher
Responder Model Model
Command Responder:
processPdu
1)-examines content of request
PDU. Check whether object
processIncomingMsg
has already registered with prepareDataElements
the responder
registerContextEngineID
2)- isAccessAllowed receive get-request message
request)
check the security level
3)- if access permitted, prepare generateResponseMsg
prepareResponseMsg
a response. returnResponsePdu
Message
Security
Dispatcher Processing
Model
Model
Global/
Security Plaintext / Encrypted
Version Header Whole Message
Parameters scopedPDU Data
Data
Security Parameters
Modification of Information
an entity may alter in-transit SNMP
messages generated on behalf of
an authorized principal in such a Modification of information
Masquerade
way as to effect unauthorized Message stream modification
replayed later
Disclosure Disclosure
Eavesdropping or intercepting on
the exchanges between SNMP
engines
Security Threats
and agent
DOS are indistinguishable from
network element failures Management Management
Entity A Entity B
DOS may disrupt all services (not
just those pertaining to NM)
Disclosure
Traffic Analysis:
An attacker may observe the
general pattern of traffic between
managers and agents
Security Model Goals
o Data Integrity (Authentication)
o Authentication
o Message redirection/re-ordering/delay/replay
o Data encryption/decryption
Security Model
Security Subsystem
Data Integrity
Authentication
Module
Data Origin Authentication
Message
Privacy
Processing Data Confidentiality
Module
Model
3 different modules
o Authentication module
o Privacy module
o Timeliness module
Authentication Module
Security Subsystem
Data Integrity
Authentication
Module
Data Origin Authentication
Message
Privacy
Processing Data Confidentiality
Module
Model
Data integrity
o message authentication at sender and validation at receiver
o Ensure that a message is not modified by an unauthorized intruder
o Authentication protocols: HMAC-MD5-96 / HMAC-SHA-96
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
Authentication
Module
Data Origin Authentication
Message
Privacy
Processing Data Confidentiality
Module
Model
Data Integrity
Authentication
Module
Data Origin Authentication
Message
Privacy
Processing Data Confidentiality
Module
Model
Responsibility of Authoritative
engine Non-Authoritative Engine
(NMS)
o Unique SNMP engine ID
o Time-stamp (a clock maintained
by the authoritative engine)
Security Subsystem
Message Encrypted
Processing scopedPDU
Model
Authentication key
(Authenticated/encrypted)
whole message Whole Message Authentication
Authenticated Module
Whole message length
Whole Message
Security Parameters
Authentication key
(Authenticated/encrypted)
whole message Whole Message Authentication
Authenticated Module
Whole message length
Whole Message
Security Parameters
Decrypt key
Encrypted PDU
(Decrypted) scopedPDU Privacy Privacy
parameters Module
Decrypted
scopedPDU
msgAuthoritativeEngineBoots,
msgAthoritativeEngineTime,
msgAthoritativeEngineID
NOTE:
1- Authentication
Two authentication protocols
o HMAC-MD5-96 (Message Digest)
o HMAC-SHA1-96 (Secure Hash Algorithm)
HMAC: message authentication code generation from authKey
A 96-bit MAC code generated and inserted in msgAuthenticationParameters
field of the message
MD-5 (16-octet) and SHA1 (20-octet) are the underlying hash functions
Cryptographic Functions-Authentication
Procedure:
1. Derive extendedAuthKey:
Supplement authKey with 0s to get 64-byte string
67
Cryptographic Functions-Authentication
KEY DATA
HASH FUNCTION
MAC
MAC
MAC
=?
sender receiver
Cryptographic Functions-Encryption
CBC Mode
o Last 8-octet of privKey used as pre-
initialization vector (pre-IV)
o Generate salt value (8 octets):
<snmpEgineBoots || local value>
P1 P2 Pn
IV
Cn-1
C1 C2 Cn
Encryption
C1 C2 Cn
IV
Cn-1
P1 P2 Pn
Decryption
NO
msgPrivacyParamters
NULL
NO
msgAuthent.Paramters
NULL
Message Transmission
USM Message Processing
security level
Retrieve msg
Security model
parameters
Security name….
NO
Determine if msg is Time synch.
within time window Timeliness check
YES
Privacy Encrypt
Decrypt
scopedPDU
scopedPDU
Required? set msgPrivacyParamters
NO
Message reception
Discovery
The non-authoritative engine sends a Request message:
securityLevel = noAuthnoPriv
msgUserName = “initial”
msgAuthoritativeEngineID = null
varBindList = null
Take Hash
of user key and
Remote Engine ID Localized
Key
digest2
Take Hash
of user key and
Remote Engine ID Localized
password Take Hash
of expanded key
password string
User
Key
(digest1)
Take Hash
of user key and
Localized keys are initially Remote Engine ID Localized
configured in a secure way ( key
could be manual!)
Key Update
To enhance security, Keys are to be updated from
time to time:
keyOld keyNew
Requestor:
1)- Generate random
2)- Compute: digest = Hash ( keyOld || random )
3)- delta = digest XOR keyNew
4)- protocolKeyChange = ( random || delta)
Send a message setRequest ( protocolKeyChange )
Receiver:
1)- compute digest = Hash( keyOld || random)
2)- compute keyNew = digest XOR delta
NOTE: digest XOR delta = digest XOR (digest XOR keyNew) = keyNew
Since an attacker does not know keyOld, the update of the key is safe
Access Control
Agent can validate sending sources and their
access privilege for command requests.
Step following Authentication
Maintain a local database contains access rights
and policies
MIB VIEW Allowed Allowed managers Required Level
Operations of Security
Interface SET John Authentication
Table , Encryption
Interface GET/GETNEXT John, Paul Authentication
Table
Systems GET/GETNEXT Georges None
Group
Access Control
(read, write,
or send
notification)