Formal Security Analysis of Authentication
Formal Security Analysis of Authentication
Abstract— Recently, the verification of network management To our knowledge, there has been no formal proof of
protocols has been the subject of many research works. SNMP network management protocols. As claimed in informal
(Simple Network Management Protocol) is a widely used descriptions of SNMPv3, it provides secrecy of management
protocol for monitoring and managing devices on IP networks. information and authentication and view-based access
Three significant security features (authentication, encryption, control to MIB (Management Information Base) data and
access control) are added to SNMPv3 under the User-based integrity check of protocol data. Authentication is a security
Security Model (USM). Until now, no formal and automated property that provides assurance that if a message is from a
verification methods have been proposed for network valid source or if the management information was not
management protocols and they have been analyzed only with
altered in transit or whether it was not delayed or replayed.
informal techniques or with symbolic methods which is a hard,
time-consuming and error-prone task when done by hand. Our goal in this paper is providing a fully automatic
Hence, in this paper, we first describe the SNMPv3 protocol technique to verify authenticity in SNMPv3 protocol,
and propose an abstract model of it to formalize our without bounding the number of runs of the protocol to
understanding of SNMP, and provide a specification of analyze it. To achieve this goal, we present an abstract and
SNMPv3 in the applied π-calculus. We verify authenticity in simplified model of SNMPv3 and specify it with applied π-
SNMPv3 protocol without bounding the number of sessions of calculus and then verify one of the main security properties,
the protocol, using an automated protocol verifier, ProVerif namely authenticity of the protocol using a popular
and we show a proof of authenticity for the SNMPv3 protocol.
cryptographic verification tool, ProVerif. Thanks to its use of
Keywords- Formal Verification, SNMPv3, ProVerif, Applied unification, it avoids the problem of the state space explosion
π-Calculus, Authentication, Correspondence Assertions. whereas most existing protocol verifiers based on model
checking suffer from this problem and need very large
resources to verify protocols.
I. INTRODUCTION
This paper is organized as follows: Section II provides
Recently, many research topics have mainly focused on some background on SNMPv3. Furthermore, we describe the
applying formal methods to broad class of network protocols security enhancements to the SNMP protocol and discuss
and there have been vast progress in the development of a how its security capability supplies authentication. Also, we
formal framework for specifying and reasoning about model a simplified SNMPv3 and propose an abstract model
security properties. It is very important to verify protocols of SNMPv3 and introduce a handshake model of it to
with an unbounded number of sessions, while relying as little formalize our understanding of SNMP. Section III, presents
as possible on human involvement. a brief introduction of the syntax of applied π-calculus and
During the last few years, SNMP protocol as a network we discuss how to model authentication using
management protocol has been widely used by various correspondence assertions. In Section IV we specify
network equipment vendors as the main network SNMPv3 in the applied π-calculus and verify this protocol
management interface. Security has been a strong concern using ProVerif tool. Finally, Section V offers conclusions.
with SNMPv1 and SNMPv2. Neither of them supplies
adequate security features such as management message II. THE SNMP PROTOCOL
authentication and encryption and there is no facility to SNMP is a protocol defined by the Internet Engineering
authenticate the source of the management information that Task Force (IETF) used for managing devices such as
is being exchanged. With these breaches in security, an routers, switches, servers, workstations and more. It
unauthorized client could perform network management facilitates the exchange of management information between
functions and hence, it was open to mount simple attacks. network devices in the form of variables. These variables
SNMPv3, a general framework for all three versions of describe the system configuration parameter and can be read
SNMP, provides security enhancements more than its and queried (or sometimes set or write) by managing
previous versions. applications.
Uses a community
Community
V1 noAuthNoPriv String
No string match for
authentication.
Uses a community
Community
V2c noAuthNoPriv String
No string match for
authentication
Uses a username
V3 noAuthNoPriv Username No match for
authentication.
Provides
MD5 or authentication based
V3 authNoPriv No
SHA on the HMAC-MD5 or
HMAC-SHA.
Provides
authentication same
as authNoPriv.Also,
MD5 or provides DES 56-bit;
V3 authPriv DES
SHA 168-bit 3DES; or AES
128-, 192-, or 256-bit
encryption
algorithms.
Figure 1. SNMPv3 message format with User-Based Security Model
1061
C. Existing Authentication in SNMPv3 message identifiers and it is a unique ID associated with the
message. Also, timestamp is sent which the field TA
USM is implemented in the structure of authentication indicates time since the authoritative SNMP entity has been
and encryption and VACM in the form of access control. rebooted. In addition, manager sends PDU field that includes
The authentication process assures that the message is from a the body of an SNMP message and encrypts the PDU with
valid source, the management information was not altered in the symmetric key and sends it to the agent. Besides, the
transit and that it was not delayed or replayed. When a manager sends HMAC of these items to the agent. HMAC-
message passed the authentication process, it is certain the MD5 is a keyed hash function for MACs (message
message came from an authorized source. authentication codes) and K2 is secret hash key used for
authentication.
To achieve authentication, each pair of SNMP entities
must share a secret authentication key. In SNMPv3, there are →
A B: MsgID, TA, (PDUa)K1,
two different secret keys, one for privacy (encryption key or HMAC-MD5{MsgID, TA, (PDUa)K1 }k2
privacy key, privKey) and another for authentication
(authentication key, authKey). Authentication is supplied This protocol consist of all types of commands that can
through implementing Hashed Message Authentication Code be transferred between the manager and an agent because,
(HMAC) based on different one-way cryptography such as common messages such as GetRequest, SetRequest,
Message Digest Version 5 (MD5) and Secure Hash GetResponse, GetNextRequest and Trap are in form of a
Algorithm (SHA).Initial secret key must be distributed by special field in an SNMP message known as Protocol Data
configuration manager or network manager[4]. Unit (PDU) field. So, the format is the same for all of them
The need for techniques to verify the correctness of and the command is in the PDU field.
authentication is significant, so we will scrutiny In order to avoid ambiguity, we ignore the parameters
authentication between manager and agent that is particularly that are not of our interest in formal analysis. The goal of
important when protocol participants want to exchange proposed protocol is that the agent authenticates the
management information. manager, even in the presence of an active attacker.
D. Proposed Abstract model of SNMPV3 Protocol
We extracted the parameters that are exchanged between III. THE APPLIED Π-CALCULUS AND MODELING
the manager and agent. We illustrate this protocol in figure 2 AUTHENTICATIN
that A and B are the names of the manager and agent,
respectively. For the sake of simplicity, we assume that The applied π-calculus is an extremely expressive and
there is only one principal A acting as a Manager, and only powerful language for describing and analyzing security
one principal B acting as an agent. We used {M}K for an protocols with cryptographic primitives[6]. Cryptographic
encryption of the plaintext M under the key K, and || stands operations and communication through channels are the key
for message concatenation. elements of the applied π-calculus. Properties of processes
described in the applied pi calculus can be proved by
employing manual techniques [7], or by automated tools
MANAGER → AGENT such as ProVerif [8].
The syntax is coupled with a formal semantics to permit
( msgVersion & msgID & msgMaxSize & msgFlags &
reasoning about protocols. We briefly describe the syntax of
msgSecurityModel & msgAuthoritativeEngineID &
the applied pi-calculus that is used in this paper[9].
msgAuthoritativeEngineBoots & msgAuthoritativeEngineTime &
msgUserName & msgPrivacyParameters & DES{PDU}K1 ) ||
HMAC-MD5 {msgVersion & msgID & msgMaxSize &
msgFlags & msgSecurityModel & msgAuthoritativeEngineID & M,N ::= Applied π- calculus Terms (Messages)
msgAuthoritativeEngineBoots & msgAuthoritativeEngineTime &
x, y, z variables
msgUserName & msgPrivacyParameters & DES{PDU}K1 }k2
a, b, c, k, s names
f(M1,… ,Mn) constructor application
Figure 2. The proposed abstract model of SNMPv3.
P,Q ::= Applied-pi calculus plain Processes
0 empty process
P|Q parallel composition
At the beginning of communication, the type of !P replication
symmetric cryptographic algorithm and type of (va)P restriction (free variable instantiation)
authentication algorithm are exchanged between both output
M(x).P input
entities. After the connection is established, the manager let x = g(M1,… ,Mn) in P else Q destructor application
sends ID of message that the msgID contains the SNMP if M = N then P else Q conditional
1062
A. Correspondence Assertions behavior of the manager and agent that is modeled by the
process below.
Woo and Lam[10] introduce correspondence assertions
for specifying authenticity properties of security protocols
(* The processes *)
based on cryptography. Modeling authentication requires
correspondence assertions, and are also employed in our let manager =
models. We formally define the correspondences that we in(net, xTs);
verify. We prove correspondences of the form “If one
new MsgID;
principal ever reaches a certain point in a protocol, then
some other principal has previously reached some other new PDUa;
matching point in the protocol.” event beginServerAuth(MsgID,PDUa);
To express message authentication of A to B, we let cipher = sencrypt(PDUa,kSC) in
describe B’s process so that it sends out an end(B) event let hmac = hmacMD5((MsgID, xTS, cipher),khmSC) in
within session, modeling the fact that B has finished a
Simple network session. Similarly, A’s process is modified out(net, (MsgID, cipher, hmac))
to send a begin(B) event directly after public keys are let agent =
exchanged, modeling the fact that A has started a
new Ts;
communication with B[11]. In our syntax (based on that of
ProVerif), we express this correspondence assertion that out(net, Ts);
follows the pattern: in(net, (xMsgID, xcipher, xhmac));
A. Modeling SNMPv3 in the applied π-Calculus The whole system is obtained by putting in parallel the
two components, that initA|initB represent participants of a
In this section, the proposed abstract model of the SNMPv3 protocol running in parallel:
is modeled in the applied π-calculus. Once the protocol has process
been modeled in the applied π-calculus, the analysis can be
new kSC;
performed with the tool ProVerif and will supply a formal
proof of security for the model. new kHmSC;
The manager and agent taking part in the protocol are
described as two concurrent processes. Figure 3 shows the (!manager) | (!agent)
1063
This implementation has 26 lines of specific code; number of sessions, while relying as little as possible on
ProVerif takes less than one second to verify the message human intervention.
authentication query and to verify that the protocol satisfies
authenticity. We say a protocol is safe if it satisfies the Based on our verification and analysis performed on the
interactions included by the begin and end-assertions. protocol with ProVerif, we can conclude that the SNMPv3
protocol is able to authenticate the agent and manager
correctly during exchange of management information
B. Verifying Authenticity of SNMPv3 Using ProVerif between a manager and an agent of SNMP.
1064