4 OPC UA security architecture

4.1 OPC UA security environment

OPC UA is a protocol used between components in the operation of an industrial facility at multiple levels: from high-level enterprise management to low-level direct process control of a device. The use of OPC UA for enterprise management involves dealings with customers and suppliers. It may be an attractive target for industrial espionage or sabotage and may also be exposed to threats through untargeted malware, such as worms, circulating on public networks. Disruption of communications at the process control could result in financial losses, affect employee and public safety or cause environmental damage.

OPC UA will be deployed in a diverse range of operational environments with varying assumptions about threats and accessibility, and with a variety of security policies and enforcement regimes. OPC UA, therefore, provides a flexible set of security mechanisms. Figure 1 is a composite that shows a combination of such environments. Some OPC UA Clients and Servers are on the same host and can be easily protected from external attack. Some Clients and Servers are on different hosts in the same operations network and might be protected by the security boundary protections that separate the operations network from external connections. Some OPC UA Applications run in relatively open environments where users and applications might be difficult to control. Other applications are embedded in control systems that have no direct electronic connection to external systems.

Figure1-OPC UA network model

4.2 Security objectives

4.2.1 Overview

Fundamentally, information system security reduces the risk of damage from attacks. It does this by identifying the threats to the system, identifying the system’s vulnerabilities to these threats, and providing countermeasures. The countermeasures reduce vulnerabilities directly, counteract threats, or recover from successful attacks.

Industrial automation system security is achieved by meeting a set of objectives. These objectives have been refined through many years of experience in providing security for information systems in general and they remain quite constant despite the ever-changing set of threats to systems. They are described in the sub clause 5.1 and sub clause 5.2 reconciles these objectives against the OPC UA functions. Clause 6 offers additional best practice guidelines to Client and Server developers or those that deploy OPC UA Applications.

4.2.2 Authentication

Entities such as clients, Servers, and users should prove their identities. Authentication can be based on something the entity is, has, or knows.

4.2.3 Authorization

The access to read, write, or execute resources should be authorized for only those entities that have a need for that access within the requirements of the system. Authorization can be as coarse-grained as allowing or disallowing a Client to access a Server or it could be much finer grained such as allowing specific actions on specific information items by specific users.

4.2.4 Confidentiality

Data is protected from passive attacks such as eavesdropping, whether the data is being transmitted, in memory, or being stored. To provide Confidentiality, data encryption algorithms using special secrets for securing data are used along with Authentication and Authorization mechanisms for accessing that secret.

4.2.5 Integrity

Receivers receive the same information that the original sender sent, without the data being changed during transmission.

4.2.6 Auditability

Actions taken by a system must be recorded in order to provide evidence to stakeholders:

  • that this system works as intended (successful actions are tracked).
  • that identify the initiator of certain actions (user activity is tracked).
  • that attempts to compromise the system were denied (unsuccessful actions are tracked).

4.2.7 Availability

Availability is impaired when the execution of software that needs to run is turned off or when the software or communication system is overwhelmed by processing input. Impaired Availability in OPC UA can appear as slowing down of Subscription performance or the inability to add Sessions for example.

4.3 Security threats to OPC UA systems

4.3.1 Overview

OPC UA provides countermeasures to resist threats to the security of the information that is communicated. The sub clauses 4.3.2, 4.3.3, 4.3.4, 4.3.5, 4.3.6, 4.3.7, 4.3.8, 4.3.9, 4.3.10, and 4.3.11 list the currently known threats to environments in which OPC UA will be deployed, and Sub- clause 5.1 reconciles these threats against the OPC UA functions.

4.3.2 Message flooding

An attacker can send a large volume of Messages, or a single Message that contains a large number of requests, with the goal of overwhelming the OPC UA Server or dependent components such as CPU, TCP/IP stack, Operating System, or the File System. Flooding attacks can be conducted at multiple layers including OPC UA, SOAP, [HTTP] or TCP.

Message flooding attacks can use both well-formed and malformed Messages. In the first scenario, the attacker could be a malicious person using a legitimate Client to flood the Server with requests. Two cases exist, one in which the Client does not have a Session with the Server and one in which it does. Message flooding may impair the ability to establish OPC UA Sessions, or terminate an existing Session. In the second scenario, an attacker could use a malicious Client that floods an OPC UA Server with malformed Messages in order to exhaust the Server’s resources. In general, Message flooding may impair the ability to communicate with an OPC UA entity and result in denial of service. Message flooding impacts Availability. See 5.1.2 for the reconciliation of this threat.

4.3.3 Eavesdropping

Eavesdropping is the unauthorized disclosure of sensitive information that might result directly in a critical security breach or be used in follow-on attacks.

If an attacker has compromised the underlying operating system or the network infrastructure, then the attacker might be able to record and capture Messages. It may be beyond the capability of a Client or Server to recover from a compromised operating system.

Eavesdropping impacts Confidentiality directly and indirectly threatens all other security objectives.

See 5.1.3 for the reconciliation of this threat.

4.3.4 Message spoofing

An attacker may forge Messages from a Client or a Server. Spoofing may occur at multiple layers in the protocol stack.

By spoofing Messages from a Client or a Server, attackers may perform unauthorized operations and avoid detection of their activities.

Message spoofing impacts Integrity and Authorization.

See 5.1.4 for the reconciliation of this threat.

4.3.5 Message alteration

Network traffic and application layer Messages may be captured or modified and forwarded to OPC UA Clients and Servers. Message alteration may allow illegitimate access to a system.

Message alteration impacts Integrity and Authorization.

See 5.1.5 for the reconciliation of this threat.

4.3.6 Message replay

Network traffic and valid application layer Messages may be captured and resent to OPC UA Clients and Servers at a later stage without modification. An attacker could misinform the user or send a valid command such as opening a valve but at an improper time, so as to cause damage or property loss.

Message replay impacts Authorization.

See 5.1.6 for the reconciliation of this threat.

4.3.7 Malformed Messages

An attacker can craft a variety of Messages with invalid Message structure (malformed XML, SOAP, UA Binary, etc.) or data values, and send them to OPC UA Clients or Servers.

The OPC UA Client or Server may incorrectly handle certain malformed Messages by performing unauthorized operations or processing unnecessary information. It might result in a denial or degradation of service including termination of the application or, in the case of embedded devices, a complete crash. In a worst-case scenario an attacker could use malformed Messages as a pre- step for a multi-level attack to gain access to the underlying system of an OPC UA Application.

Malformed Messages impact Integrity and Availability.

See 5.1.7 for the reconciliation of this threat.

4.3.8 Server profiling

An attacker tries to deduce the identity, type, software version, or vendor of the Server or Client in order to apply knowledge about specific vulnerabilities of that product to mount a more intrusive or damaging attack. The attacker might profile the target by sending valid or invalid formatted Messages to the target and try to recognize the type of target by the pattern of its normal and error responses.

Server profiling impacts all of the security objectives indirectly.

See 5.1.8 for the reconciliation of this threat.

4.3.9 Session hijacking

An attacker may use information (retrieved by sniffing the communication or by guessing) about a running Session established between two applications to inject manipulated Messages (with valid session information) that allow him or her to take over the Session from the authorized user.

An attacker may gain unauthorized access to data or perform unauthorized operations. Session hijacking impacts all of the security objectives.

See 5.1.9 for the reconciliation of this threat.

4.3.10 Rogue Server

An attacker builds a malicious OPC UA Server or installs an unauthorized instance of a genuine OPC UA Server.

The OPC Client may disclose necessary information.

A rogue Server impacts all of the security objectives except Integrity.

See 5.1.10 for the reconciliation of this threat.

4.3.11 Compromising user credentials

An attacker obtains user credentials such as usernames, passwords, Certificates, or keys by observing them on papers, on screens, or in electronic communications, or by cracking them through guessing or the use of automated tools such as password crackers.

An unauthorized user could launch and access the system to obtain all information and make control and data changes that harm plant operation or information. Once compromised credentials are used, subsequent activities may all appear legitimate.

Compromised user credentials impact Authorization and Confidentiality.

See 5.1.11 for the reconciliation of this threat.

4.4 OPC UA relationship to site security

OPC UA security works within the overall Cyber Security Management System (CSMS) of a site. Sites often have a CSMS that addresses security policy and procedures, personnel, responsibilities, audits, and physical security. A CSMS typically addresses threats that include those that were described in 4.3. They also analyse the security risks and determine what security controls the site needs.

Resulting security controls commonly implement a “defence-in-depth” strategy that provides multiple layers of protection and recognizes that no single layer can protect against all attacks. Boundary protections, shown as abstract examples in Figure 1, may include firewalls, intrusion detection and prevention systems, controls on dial-in connections, and controls on media and computers that are brought into the system. Protections in components of the system may include hardened configuration of the operating systems, security patch management, anti-virus programs, and not allowing email in the control network. Standards that may be followed by a site include [NERC CIP] and [IEC 62351] which are referenced in Clause 2.

The security requirements of a site CSMS apply to its OPC UA interfaces. That is, the security requirements of the OPC UA interfaces that are deployed at a site are specified by the site, not by the OPC UA specification. OPC UA specifies features that are intended so that conformant Client and Server products can meet the security requirements that are expected to be made by sites where they will be deployed. Those who are responsible for the security at the site should determine how to meet the site requirements with OPC UA conformant products.

The system owner that installs OPC UA Clients or Servers should analyse its security risks and provide appropriate mechanisms to mitigate those risks to achieve an acceptable level of security. OPC UA meets the wide variety of security needs that might result from such individual analyses. OPC UA Clients and Servers are required to be implemented with certain security features which are available for the system owner’s optional use. Each system owner should be able to tailor a security solution that meets its security and economic requirements using a combination of mechanisms available within the OPC UA specification and external to OPC UA.

The security requirements placed on the OPC UA Clients and Servers deployed at a site are specified by the site CSMS, not by the OPC UA specification. The OPC UA security specifications, however, are requirements placed upon OPC UA Client and Server products, and recommendations of how OPC UA should be deployed at a site in order to meet the security requirements that are anticipated to be specified at the site.

OPC UA addresses some threats as described in 4.3. The OPC Foundation recommends that Client and Server developers address the remaining threats, as detailed in Clause 6. Threats to infrastructure components that might result in the compromise of Client and Server operating systems are not addressed by OPC UA.

4.5 OPC UA security architecture

The OPC UA security architecture is a generic solution that allows implementation of the required security features at various places in the OPC UA Application architecture. Depending on the different mappings described in Part 6, the security objectives are addressed at different levels. The OPC UA Security Architecture is structured in an Application Layer and a Communication Layer atop the Transport Layer as shown in Figure 2.

Figure2-OPC UA security architecture

The routine work of a Client application and a Server application to transmit information, settings, and commands is done in a Session in the Application Layer. The Application Layer also manages the security objectives user Authentication and user Authorization. The security objectives that are managed by the Application Layer are addressed by the Session Services that are specified in Part 4. A Session in the Application Layer communicates over a Secure Channel that is created in the Communication Layer and relies upon it for secure communication. All of the Session data is passed to the Communication Layer for further processing.

Although a Session communicates over a Secure Channel and has to be activated before it can be used, the binding of users, Sessions, and Secure Channels is flexible.

Impersonation allows a user to take ownership of an existing Session.

If a Secure Channel breaks, the Session will remain valid for a period of time allowing the Client to re-establish the connection to the Session via a new Secure Channel. Otherwise, the Session closes after its lifetime expires.

The Communication Layer provides security mechanisms to meet Confidentiality, Integrity and application Authentication as security objectives.

One essential mechanism to meet the above mentioned security objectives is to establish a Secure Channel (see 4.11) that is used to secure the communication between a Client and a Server. The Secure Channel provides encryption to maintain Confidentiality, Message Signatures to maintain Integrity and Digital Certificates to provide application Authentication for data that comes from the Application Layer and passes the “secured” data to the Transport Layer. The security mechanisms that are managed by the Communication Layer are provided by the Secure Channel Services that are specified in Part 4.

The security mechanisms provided by the Secure Channel services are implemented by a protocol stack that is chosen for the implementation. Mappings of the services to some of the protocol stack options are specified in Part 6 which define how functions in the protocol stack are used to meet the OPC UA security objectives.

The Communication Layer can represent an OPC UA protocol stack. OPC UA specifies alternative stack mappings that can be used as the Communication Layer. These mappings are described in Part 6.

If the OPC UA native mapping is used, then functionality for Confidentiality, Integrity, application Authentication, and the Secure Channel are similar to the SSL/TLS specifications, as described in Part 6.

If the Web Services mapping is used then WS Security, WS Secure Conversation and XMLEncryption as well as XMLSignature are used to implement the mechanisms for Confidentiality, Integrity, application Authentication as well as for implementing a Secure Channel. For more specific information, see Part 6.

The Transport Layer handles the transmission, reception, and the transport of data that is provided by the Communication Layer.

To survive the loss of the Transport Layer connections (e.g. TCP connections) and resume with a new connection, the Communication Layer is responsible for re-establishing the Transport Layer connection without interrupting the logical Secure Channel.

4.6 SecurityPolicies

A SecurityPolicy specifies which security mechanisms are to be used and are derived from a Security Profile (see 4.7 for details). Security policies are used by the Server to announce which mechanisms it supports and by the Client to select one to use with the Secure Channel it wishes to open. SecurityPolicies include the following information:

  • algorithms for signing and encryption
  • algorithm for key derivation

The choice of SecurityPolicy is normally made by the administrator typically when the Client and Server products are installed. The available security policies are specified in Part7. The Administrator can at a later time also change or modify the selection of SecurityPolicies as circumstances dictate.

The announcement of security policies is handled by special discovery services specified in Part 4. More details about the discovery mechanisms and policy announcement strategies can be found in Part 12.

If a Server serves multiple Clients then it maintains separate policy selections for each Client. This allows a new Client to select policies independent of the policy choices that other Clients have selected for their Secure Channels.

Since computing power increases every year, specific algorithms that are considered as secure today can become insecure in the future, therefore, it makes sense to support different security policies in an OPC UA Application and to be able to adopt more as they become available. NIST or other agencies even make predictions about the expected lifetime of algorithms (see NIST 800-57). The list of supported security policies will be updated based on recommendation such as those published by NIST. From a deployment point of view it is important that the periodic site-review checks that the currently selected list of security profiles still fulfil the required security objectives and if they do not, then a newer selection of Security Profiles is selected

There is also the case that new security policies are composed to support new algorithms that improve the level of security of OPC UA products. The application architecture of OPC UA Clients and Servers should be designed in a way that it is possible to update or add additional cryptographic algorithms to the application with little or no coding changes.

Part 7 specifies several policies which are identified by a specific unique URI. To improve interoperability among vendors’ products, Server products implement these policies rather than define their own. Clients support the same policies.

4.7 Security Profiles

OPC UA Client and Server products are certified against Profiles that are defined in Part 7. Some of the Profiles specify security functions and others specify other functionality that is not related to security. The Profiles impose requirements on the certified products but they do not impose requirements on how the products are used. A consistent minimum level of security is required by the various Profiles. However, different Profiles specify different details such as which encryption algorithms are required for which OPC UA functions. If a problem is found in one encryption algorithm then the OPC Foundation can define a new Profile that is similar, but that specifies a different encryption algorithm that does not have a known problem. Part 7 is the normative specification of the Profiles.

Policies refer to many of the same security choices as Profiles; however the policy specifies which of those choices to use in the Session. The policy does not specify the range of choices that the product offers, they are described in the Profiles that it supports.

These policies are included in Certification Testing associated with OPC UA Client and Servers. The Certification Testing ensures that the standard is followed and that the appropriate security algorithms are supported.

Each security mechanism in OPC UA is provided in Client and Server products in accordance with the Profiles with which the Client or Server complies. At the site, however, the security mechanisms may be deployed optionally. In this way each individual site has all of the OPC UA security functions available and can choose which of them to use to meet its security objectives.

4.8 User Authorization

OPC UA provides a mechanism to exchange user credentials but does not specify how the applications use these credentials. Client and Server applications may determine in their own way what data is accessible and what operations are authorized. Profiles exist to indicate the support of user credentials to restrict or control access to data.

4.9 User Authentication

User Authentication is achieved when the Client passes user credentials to the Server as specified via Session Services (described in Part 4). The Server can authenticate the user with these credentials. The owner (user) of a Session can be changed using the ActivateSession Service in order to meet needs of the application.

4.10 Application Authentication

OPC UA uses a concept conveying Application Authentication to allow applications that intend to communicate to identify each other. Each OPC UA Application Instance has a Digital Certificate (Application Instance Certificate) assigned that is exchanged during Secure Channel establishment. The receiver of the Certificate checks whether it trusts the Certificate and based on this check it accepts or rejects the request or response Message from the sender. This trust check is accomplished using the concept of TrustLists. TrustLists are a CertificateStore designated by an administrator. An administrator determines if the Certificate is signed, validated and trustworthy before placing it in a TrustList. TrustLists usually also include Certificate Revocation Lists (CRLs). OPC UA makes use of these industry standard concepts as defined by other organizations.

In OPC UA HTTPS can be used to create Secure Channels, however, these channels do not provide Application Authentication. If Authentication is required, it is based on user credentials.

More details on Application Authentication can be found in Part 4.

The OPC UA Security Services are a group of abstract service definitions specified in Part 4 that are used for applying various security mechanisms to communication between OPC UA Clients and Servers.

The Discovery Service Set (specified in Part 4) defines services used by an OPC UA Client to obtain information about the security policies (see 4.6) and the Digital Certificates of specific OPC UA Servers.

The services of the Secure Channel Service Set (specified in Part 4) are used to establish a Secure Channel which is responsible for securing Messages sent between a Client and a Server. The challenge of the Secure Channel establishment is that it requires the Client and the Server to securely exchange cryptographic keys and secret information in an insecure environment, therefore a specific Key Exchange Algorithm (similar to SSL Handshake protocol defined in SSL/TLS) is applied by the communication participants.

The OPC UA Client retrieves the security policies and Digital Certificates of the OPC UA Server by the above mentioned discovery services. These Digital Certificates contain the Public Keys of the OPC UA Server.

The OPC UA Client sends its Public Key in a Digital Certificate and secret information with the OpenSecureChannel service Message to the Server. This Message is secured by applying Asymmetric Encryption with the Server’s Public Key and by generating Asymmetric Signatures with the Client’s Private Key. However the Digital Certificate is sent unencrypted so that the receiver can use it to verify the Asymmetric Signature.

The Server decrypts the Message with its Private Key and verifies the Asymmetric Signature with the Client’s Public Key. The secret information of the OPC UA Client together with the secret information of the OPC UA Server is used to derive a set of cryptographic keys that are used for securing all further Messages. Furthermore, all other service Messages are secured with Symmetric Encryption and Symmetric Signatures instead of the asymmetric equivalents.

The Server sends its secret information in the service response to the Client so that the Client can derive the same set of cryptographic keys.

Since Clients and Servers have the same set of cryptographic keys they can communicate securely with each other.

These derived cryptographic keys are changed periodically so that attackers do not have unlimited time and unrestricted sequences of Messages to use to determine what the keys are.

4.12 Auditing

4.12.1 General

Clients and Servers generate audit records of successful and unsuccessful connection attempts, results of security option negotiations, configuration changes, system changes, user interactions and Session rejections.

OPC UA provides support for security audit trails through two mechanisms. First, it provides for traceability between Client and Server audit logs. The Client generates an audit log entry for an operation that includes a request. When the Client issues a service request, it generates an audit log entry and includes the local identifier of the log entry in the request sent to the Server. The Server logs requests that it receives and includes the Client’s entry id in its audit log entry. In this fashion, if a security-related problem is detected at the Server, the associated Client audit log entry can be located and examined. OPC UA does not require the audit entries to be written to disk, but it does require that they be available. OPC UA provides the capability for Servers to generate Event Notifications that report auditable Events to Clients capable of processing and logging them. See Part 4 for more details on how services in OPC UA are audited.

Second, OPC UA defines audit parameters to be included in audit records. This promotes consistency across audit logs and in Audit Events. Part 5 defines the data types for these parameters. Other information models may extend the audit definitions. Part 7 defines Profiles which include the ability to generate Audit Events and use these parameters, including the Client audit record id.

Because the audit logs are used to prove that the system is operating securely, the audit logs themselves are also secured from unauthorized tampering. If someone without authorization were able to alter or delete log records, this could hide an actual or attempted security breach. Because there are many different ways to generate and store audit logs (e.g. files or database), the mechanisms to secure audit logs are outside the scope of this specification.

In addition, the information in an audit record may contain sensitive or private information, thus the ability to subscribe for Audit Events is restricted to appropriate users and/or applications. As an alternative, the fields with sensitive or private information can instead contain an error code indicating access denied for users that do not have appropriate rights.

The clauses 4.12.2, 4.12.3, 4.12.4 and 4.12.5 illustrate the behaviour of OPC UA Servers and Clients that support Auditing.

4.12.2 Single Client and Server

Figure 3 illustrates the simple case of a Client communicating with a Server

Figure3-Simple Servers

In this case, OPC Client “A” executes some auditable operation that includes the invocation of an OPC UA service in Server “D”. It writes its own audit log entry, and includes the identifier of that entry in the service request that it submits to the Server.

The Server receives the request and creates its own audit log entry for it. This entry is identified by its own audit id and contains its own Auditing information. It also includes the name of the Client that issued the service request and the Client audit entry id received in the request.

Using this information, an auditor can inspect the collection of log entries of the Server and relate them back to their associated Client entries.

4.12.3 Aggregating Server

Figure 4 illustrates the case of a Client accessing services from an aggregating Server. An aggregating Server is a Server that provides its services by accessing services of other OPC UA Servers, referred to as lower layer-Servers.

Figure4-Aggregating Servers

In this case, each of the Servers receives requests and creates its own audit log entry for them. Each entry is identified by its own audit id and contains its own Auditing information. It also includes the name of the Client that issued the service request and the Client audit entry id received in the request. The Server then passes the audit id of the entry it just created to the next Server in the chain.

Using this information, an auditor can inspect the Server’s log entries and relate them back to their associated Client entries.

In most cases, the Servers will only generate Audit Events, but these Audit Events will still contain the same information as the audit log records. In the case of aggregating Servers, a Server would also be required to subscribe for Audit Events from the Servers it is aggregating. In this manner, Server “B” would be able to provide all of the Audit Events to Client “A”, including the Events generated by Server “C” and Server “D”.

4.12.4 Aggregation through a non-auditing Server

Figure 5 illustrates the case of a Client accessing services from an aggregating Server that does not support Auditing.

Figure5-Aggregating Servers

In this case, each of the Servers receives requests and creates their own audit log entry for them, with the exception of Server “B”, which does not support Auditing. In this case, Server “B” passes the audit id it receives from its Client “A” to the next Server. This creates the required audit chain. Server “B” is not listed as supporting Auditing. In a case where a Server does not support writing audit entries, the entire system may be considered as not supporting Auditing.

In the case of an aggregating Server that does not support Auditing, the Server would still be required to subscribe for Audit Events from the Servers it is aggregating. In this manner, Server “B” would be able to provide all of the Audit Events to Client “A”, including the event generated by Server “C” and Server “D”, even though it did not generate an Audit event.

4.12.5 Aggregating Server with service distribution

Figure 6 illustrates the case of a Client that submits a service request to an aggregating Server, and the aggregating service supports that service by submitting multiple service requests to its underlying Servers.

Figure6-Aggregating Servers

In the case of aggregating Servers, a Server would be required to subscribe for Audit Events from the Servers it is aggregating. In this manner, Server “B” would be able to provide all of the Audit Events to Client “A”, including the event generated by Server “C” and Server “D”.

results matching ""

    No results matching ""