SP02508 Sigma Designs Security2 Command Class v2 Commercial in Confidence Removed
SP02508 Sigma Designs Security2 Command Class v2 Commercial in Confidence Removed
SP02508 Sigma Designs Security2 Command Class v2 Commercial in Confidence Removed
TABLE OF CONTENTS
1.1 Assessment Overview .............................................................................................................................. 3
1.2 Motivation for conducting security review ...................................................................................... 3
1.3 About SensePost ........................................................................................................................................ 3
1.4 Risk Summary .............................................................................................................................................. 4
1.5 Conclusion & Recommendations........................................................................................................ 4
2.1 Z-Wave Network Security ...................................................................................................................... 5
3.1 Summary ....................................................................................................................................................... 6
3.2 Z-Wave Controller Components ......................................................................................................... 6
3.3 Decryption and Replay Attacks ............................................................................................................ 6
4.1 Results Summary ....................................................................................................................................... 7
4.2 Z-Wave Device Assessment ................................................................................................................... 7
5.1 Z Wave Device Assessment ................................................................................................................... 9
5.1.1 Data Encryption ................................................................................................................................. 9
1 EXECUTIVE SUMMARY
1.1 Assessment Overview
The assessment of Sigma Designs' Security 2 Command Class commenced on the 19th of June
2017 and concluded on the 21st of June 2017. This assessment was the culmination of several
previous projects – both on a documentation review level as well as a technical assessment of
the protocol implemented on hardware provided by Sigma Designs. This final project was
requested by Sigma Systems in order to identify any final concerns prior to the standard being
finalised and published.
Sigma Designs engaged the services of SensePost in order to:
Evaluate whether the risk of replay attacks identified during previous projects had
been effectively mitigated.
Evaluate whether the security controls introduced in the Security 2 Command Class
were effective when physically implemented.
Gauge whether the risk identified within the protocol was at a level acceptable and
that such risk would not have a significant impact on the delivery of the service,
expose clients to harm or loss or other such consequences.
The results provided are the output of the security assessment performed and should be used
as input into a larger risk management process.
These results are a point in time assessment of the system and environment as they were
presented for testing. Any changes could yield a different set of results.
0 0 0
Critical High Medium
0 2 2
Low Info Total
2 Z-WAVE SECURITY
2.1 Z-Wave Network Security
The Security 2 Command Class allows various nodes on a Z-Wave network to communicate
securely with each other. Backwards compatibility with nodes implementing prior versions of
the Security Command Class is supported by means of Security Scheme 0, although newer
devices are envisioned to support the use of Security Scheme 2, which offers numerous
advantages over prior schemes.
The Security 2 Command Class provides support for secure key exchange as well as secure
single-case and multi-case communication. Replay attacks are prevented by means of Pre-
Agreed Nonces. For singlecast communication, the “Singlecast Pre-Agreed Nonce” (SPAN) is
utilised. Likewise, for multicast communication, the “Multicast Pre-Agreed Nonce” (MPAN) is
used.
Earlier reviews were based on the revised protocol standard document provided by Sigma
Designs titled: Security 2 Command Class, version 1 ALPHA (S0, S2, Security Command Class).
The document version was SDS11274.
This assessment was based on the finalised standard document provided by Sigma Designs,
titled: Z-Wave Transport-Encapsulation Command Class Specification. The document number
was SDS13783, and the review focussed on sections 3.6 – Security 2 (S2) Command Class, version
1 – and 3.7 – Supervision Command Class, version 1.
3 TESTING METHODOLOGY
3.1 Summary
The following section details the research approach and methodology used during the course
of the assessment. The section describes the components which were tested, as well as the
manner in which tests were performed.
5 ASSESSMENT RESULTS
5.1 Z Wave Device Assessment
CVSS:3.0/AV:P/AC:H/PR:
Reference R01 Risk Rating Informational H/UI:R/S:U/C:N/I:N/A:N
0.0
Technical Overview During the assessment, it was discovered that it was possible to downgrade the
Security 2 Command Class communication between the controller and the door locks
to Security 0 Command Class by leveraging a known bug in the inclusion process in
the version of the software used. Details on reproducing this behaviour are outlined
in Appendix A.1.
Further discussion with the client indicated that this behaviour was by design, due to
the fact that devices need to maintain backwards compatibility in order to
communicate with older devices.
Attack Conditions An attacker would need to follow the exact steps outlined in Appendix A.1 in order to
reproduce this behaviour.
Business Impact A successful attack would result in an attacker being able to downgrade the protocol
used by devices implementing the Security 2 Command Class to the Security 0
Command Class during inclusion. This would render newer devices to the security
shortcomings present in the Security 0 Command Class.
Recommendations It is highly recommended that Sigma Designs investigate this issue. Details on
reproducing the behaviour are outlined in Appendix A.
Should it be found that this behaviour is unintended, the matter would need to be
addressed on a firmware level.
Investigation by Sigma Designs into the relevant finding indicated that this behaviour
was by design. Furthermore, only highly privileged persons would be in a position to
initiate this downgrade. Furthermore, procedures are in place in terms of certification
to notify and alert installers in cases where secure devices connect to networks using
downgraded communications.
Attack Example The following series of images illustrate a Secure Keypad Door Lock being included
with an incorrect Device Specific Key (DSK) during inclusion, and later communicating
via the Security 0 Command Class.
Figure 2 – Secure Keypad Door Lock (node 12 - highlighted in red) included using Security 0 Command Class
(highlighted in dark blue)
https://www.first.org/cvs
s/calculator/3.0#CVSS:3.
Reference R02 Risk Rating Informational 0/AV:P/AC:H/PR:H/UI:R/
1.6
S:U/C:L/I:N/A:N
Technical Overview During the assessment, it was found that the application binaries for the PC Controller
software as well as the PC Zniffer applications were .NET applications, and neither was
compiled with any form of obfuscation. Likewise, serial communications with the USB
devices were also found to be very straight forward.
Between the unobfuscated binaries and the unobfuscated serial communication, it was
trivial to reverse-engineer the protocols used to control the PC Controller and Zniffer
USB devices. This allowed the analyst to reverse-engineer the serial communications,
using the reversed binary applications as a reference, and develop his own tool-set for
communicating with the devices.
Attack Conditions An attacker would need access to the application binaries and would need to be
familiar with reverse engineering applications and communications.
Business Impact This issue would make it easier to reverse-engineer the application or the protocol.
Information gained in this manner may be used to bypass various checks or even
repurpose Sigma Designs’ applications. In addition to this, it may also result in the
loss of Sigma Designs’ intellectual property.
Recommendations Whilst code obfuscation does not necessarily render applications immune to reverse-
engineering, it does make it considerably more difficult.
As such, it is highly recommended that applications be obfuscated prior to
distribution. Dotfuscator is provided with Visual Studio, and would provide an
adequate level of protection.
The .NET assemblies provided with the Z-Wave development kit are experimental. In
real-world deployments, controllers would be deployed on secure systems, and end
users would not have easy access to application binaries.
Attack Example The following series of images displays unobfuscated application binaries, decoding
of serial communications and a toolset implemented by the analyst.
6 CONCLUSION
Sigma Designs’ Security 2 Command Class specification appears to have a robust security
posture. Concerns identified during previous assessments have all been adequately addressed.
The manner in which PANs are used in both multicast and singlecast communication would be
effective in preventing replay attacks. Furthermore, the constraints implemented in the
activation and verification of devices, as well as the grouping of different device types
dependant on the security of the group they belong to would make it difficult for an attacker
(even with physical access to a connected device) to attack other nodes on the Z-Wave network.
Furthermore, the technical phases of the various projects also highlighted few issues, with the
potential protocol downgrade attack being mitigated by various factors.
4: The next step would be to input the DSK. As per the documentation, this has to be entered
within ten seconds as a result of the known bug. In this case, we wait for longer than ten seconds
in order to see whether we can leverage off the known bug. After a period greater than ten
seconds, we enter the DSK. This can be entered correctly or incorrectly. Either option would
result in the device being included as a Security 0 Command Class device.
5: Since the PC Controller will not receive a response and successfully include the device, we
abort the operation.
6: We once again click on the Add button in the PC Controller application and press the inclusion
button on the door lock three times. The device is now included in the network.
7: Analysis of the communication indicate that the device will now be communicating using
Security 0 Command Class, as no Security 2 Command Class frames are present when
communicating with the device.
Figure 11 – Communication with Node 12 (highlighted red). No Security 2 Command Class packets seen (highlighted dark blue)
BIR Description
Successful attacks within this category could result in an attacker gaining access to view, modify
or destroy highly confidential information; conduct or falsify large numbers of unauthorised
financially sensitive operations (e.g. falsification of financial transactions, deletion of data
records), or lead to a complete compromise of the target.
Critical Such attacks could have a catastrophic impact on the confidentiality, integrity and availability of
the systems and the business. This could result in a significant financial loss, significant
reputational damage, serious legal and compliance related fines and other effects on the
business.
An immediate remediation plan should be developed to address issues rated at this level.
Successful attacks within this category could result in an attacker gaining access to view, modify
or destroy confidential information; conduct or falsify unauthorised financially sensitive
operations (e.g. falsification of financial transactions, deletion of data records), or lead to
significant compromise of the target.
High Such attacks could have a significant impact on the confidentiality, integrity and availability of
the systems and the business. This could result in a significant financial loss, significant
reputational damage, serious legal and compliance related fines and other effects on the
business.
An immediate remediation plan should be developed to address issues rated at this level.
Successful attacks within this category could allow an attacker to gain access to sensitive
information or to private (personal) records, or could cause the system to perform unauthorised,
but non-business critical, operations, or could lead to a significant outage of services.
Medium Such attacks could have a noticeable impact on the confidentiality, integrity and availability of
the systems and the business, which could result in a noticeable financial loss, considerable
reputational damage, legal and compliance related fines and other effects on the business.
A timely remediation plan should be developed to address issues rated at this level. However,
business requirements may dictate other actions are appropriate.
A Low BIR is unlikely to have a noticeable impact on the business. However, such issues do not
exist in isolation and may be used by an attacker as part of more complicated, blended attack,
Low and should not be dismissed. Issues should be considered both individually and collectively.
Issues identified at this level should be addressed as part of normal improvement exercises.
However, business requirements may dictate other actions are appropriate.
Critical 9.0-10.0
Appendix C. Methodologies
SensePost follows a number of methodologies when conducting security assessments. These
methodologies are based on our extensive assessment experience and include a large amount
of information.
In order to keep the length of this report to a manageable level, all of the current methodologies
used by SensePost analysts can be viewed at
http://sensepost.com/assessments/methodologies.pdf
Change Management