IoT Security Best Practice Guidelines
IoT Security Best Practice Guidelines
January 2020
1
HKCERT IoT Security Best Practice Guidelines
Disclaimer
The Hong Kong Computer Emergency Response Team Coordination Centre (HKCERT) and the Hong
Kong Productivity Council (HKPC) reserve the right to amend the document from time to time without
prior notice.
While we have made every attempt to ensure that the information contained in this document is
obtained from reliable sources, HKCERT is not responsible for any errors or omissions, or for the results
obtained from the use of this information. All information in this document is provided "as is", with
no guarantee of completeness, accuracy, timeliness or of the results obtained from the use of this
information, and without warranty of any kind, express or implied, including, but not limited to
warranties of performance, merchantability and fitness for a particular purpose.
The information contained in this document is intended to provide general information and for
reference only. Reliance or use of this information shall be at the reader’s own risk. Nothing herein
shall to any extent substitute for the independent investigations and the sound technical and business
judgment of the reader. In no event will HKCERT, HKPC or its partners, employees or agents, be liable
to you or anyone else for any decision made or action taken in reliance on the information in this
document, or for any consequential, special or similar damages, even if advised of the possibility of
such damages.
Licence
The content of this document is provided under Creative Commons Attribution 4.0 International
Licence. You may share and adopt the content for any purpose, provided that you attribute the work
to HKCERT. http://creativecommons.org/licenses/by/4.0
2
HKCERT IoT Security Best Practice Guidelines
Table of Contents
3
HKCERT IoT Security Best Practice Guidelines
1. Executive Summary
The adoption of Internet of Things (IoT) technology is a growing trend in various sectors.
Startups, small and medium-sized enterprises (SMEs), and other enterprises have started
adopting IoT technology to create business values for their products and bring about new
customer experience. As focus remains on the functions and features that IoT technology
brings, not many people fully understand the accompanying potential security risks.
This document aims to facilitate developers to incorporate IoT security best practices early at
the design stage. And, it provides verification checklists for developers to perform self-
verification on their IoT solutions in order to raise the security awareness of IoT technology.
An IoT architecture model is proposed to illustrate the composition of IoT solutions. It consists
of four layers, namely the perception layer, network layer, management layer, and application
layer. IoT-related security issues, best practices and verification items are discussed pertinent
to each layer and presented in tables for ease of reference.
This document enables developers to first be aware of various security issues raised at each
layer; second, to understand the associated best practices while developing IoT solutions; and,
finally, to conduct self-verification to verify their IoT solutions according to the verification
checklists. In the long run, it is hoped that developers would incorporate IoT security into their
development cycles.
2. Introduction
2.1 Overview
Put simply, the Internet of Things (IoT) technology uses network connectivity (e.g. Internet) to
interconnect various physical devices to collect, exchange, process, and react to the data
around the physical world. It ushers a new era of innovation and business opportunities that
yields benefits in terms of efficiency, business growth, and quality of life.
However, new cyber security threats also arise from IoT technology as attackers from time to
time have been seeking to exploit vulnerabilities in IoT devices. One famous DDoS attack from
infected IoT devices was the Mirai Botnet which brought down the domain registration
services provider, Dyn, in October 2016.
To better preserve IoT security, developers are encouraged to get involved and adopt the best
practices at the early stage of product design. Besides, developers should go through the self-
verification checklists to verify the security level at the testing stage.
4
HKCERT IoT Security Best Practice Guidelines
2.2 Objectives
2.3. Scope
The scope of this document mainly focuses on common security issues that HKCERT has
observed with regard to IoT solutions, as well as proposes feasible and essential best practices
for improving the IoT security. As the scope is not aimed at providing a holistic security
framework on IoT security, this document cannot be served as a bulletproof security baseline.
Yet, it serves the purpose of attaining a certain level of security controls that would reduce
common security risks.
The target audience of this document is developers, who take part in the following areas:
5
HKCERT IoT Security Best Practice Guidelines
3. Methodology
1. Scope definition
The scope definition involves defining the scope, objectives, target audience, key
elements of the document and the study.
2. Desktop research
The desktop research involves identifying existing publications and information on the
topics related to the objectives of the study, which will serve as supporting materials
for analysis and formulation of the best practice guidelines. The list of reference
publications can be referred in the Appendix.
In general, several layers composite a complete IoT solution. It can be depicted in the below
model with a basic four-layer architecture which shows cross-cutting security across all layers
(see figure 1).
6
HKCERT IoT Security Best Practice Guidelines
Application Layer
Application layer is responsible for delivering application services. In general, this layer
consists of web application, API service, data analytics, business process and mobile
application. Users mainly interact with this layer through the web application and mobile
application. This layer also handles all application data processing, analytics, and storage.
Some IoT solutions may also integrate with their corporate IT infrastructure for other business
workflow processes, big data and AI modelling.
Management Layer
Management layer is used for managing the IoT services. In general, this layer consists of
management platform, monitoring system and software update platform. IoT solution
providers interact with this layer through the management interface to manage the lifecycle
7
HKCERT IoT Security Best Practice Guidelines
of the IoT devices. For example, this layer manages the provision, deployment, monitoring,
software update, and disposal of IoT devices.
Network Layer
Network layer is responsible for network connectivity for IoT devices, network devices, and
servers. This layer handles data transmission between IoT devices, mobile phones that runs
over the mobile application and backend servers. This layer involves different network
technologies including short range device to device wireless connectivity (e.g. RFID, NFC,
zigbee, Bluetooth, etc.), long range device to carrier gateway wireless connectivity (e.g. Sigfox,
NB-IoT, LoRa, etc.), wireless Internet connectivity (e.g. WiFi) and cellular network connectivity
(e.g. 4G and 5G).
Perception Layer
Perception layer is the physical layer where IoT devices reside. IoT devices interact with the
physical world through different sensors to collect different physical measurements (e.g.
temperature, air quality, speed, humidity, pressure, flow, movement, electricity, etc.). IoT
devices would also have some sort of kinetic interaction with the physical world through
actuator, motors, robotics, etc. Depending on the capability of IoT devices, some IoT devices
may not be capable of supporting Internet Protocol (IP) to connect the Internet directly. In
this case, IoT gateways are used to act as the network bridge between the IoT devices and the
Internet.
The personal data privacy cuts across all the above four layers. It covers various security issues
arising from each layer and the necessary solutions to mitigate the risks.
8
HKCERT IoT Security Best Practice Guidelines
1
Personal Data (Privacy) Ordinance (https://www.pcpd.org.hk/english/data_privacy_law/ordinance_at_a_Glance/ordinance.html)
9
HKCERT IoT Security Best Practice Guidelines
rest and in transit, and other IoT needed for proper operations of the
security best practices recommended device.
in this Guideline.
End users’ consent is obtained before
using personal data for purposes
The solution should minimise the unrelated to the original core
collection and retention of personal functions of the device, or for
data, and should only store and purposes not specified in its privacy
process de-identified or anonymised policy communicated to end-users.
data if applicable.
Personal data that is no longer
The solution should seek end users’ necessary is destroyed or
consent for data collected beyond anonymised.
what is needed for proper operations
of the device.
10
HKCERT IoT Security Best Practice Guidelines
2
ISO/IEC 27701:2019 Security techniques — Extension to ISO/IEC 27001 and ISO/IEC 27002 for privacy information management — Requirements and guidelines
(https://www.iso.org/standard/71670.html)
11
HKCERT IoT Security Best Practice Guidelines
4.2.2.2 Web Web application is considered a major The web application should be checked The web application is checked not
Application attack surface that requires the against well-established web security vulnerable to common web
Security implementation of effective security standards. application vulnerabilities (e.g.
measures. Many web application OWASP 3 Top 10 including cross-site
standards have already been well- The web application should require user scripting (XSS), SQL injection and
established. As such, it is advised to authentication (refer to the row Cross-site request forgery (CSRF),
reference and check against those well- “Authentication Security” for details). etc.).
established web application security
standards to ensure web application The web application should enable The web application requires user
security. session timeout. login for user authentication.
3
OWASP Top 10 (https://www.owasp.org/index.php/Category:OWASP_Top_Ten_Project)
12
HKCERT IoT Security Best Practice Guidelines
4.2.2.3 API service is supported by a backend The API service should be checked The web application is checked not
Application web server that is subject to the same against well-established web security vulnerable to common web
Programming security risk as web application does. standards. application vulnerabilities (e.g.
Interface (API) Web application standards also apply to OWASP4 Top 10 API Security including
Security API services. The API service should require broken authentication, injection and
authentication prior to processing other rate limiting, etc.).
Many web application standards have service requests.
already been well-established. As such, All unauthenticated requests are
it is advised to make reference to and The API service should respond to denied by the API service.
check against those well-established authenticated request only (refer to the
web application security standards to row “Authentication Security” for
ensure web application security. details).
4
OWASP Top 10 API Security (https://www.owasp.org/index.php/OWASP_API_Security_Project)
13
HKCERT IoT Security Best Practice Guidelines
The API service should use rate limiting The web server which hosts the API
to slow down volumetric attack service uses valid TLS server
attempts. certificate signed by trusted
certificate authority.
The API service should be protected by
web application firewall. The API service has defined the
maximum number of requests to be
accepted per second and per source
IP address and blocked access
exceeding this limit.
14
HKCERT IoT Security Best Practice Guidelines
4.2.2.5 Cloud It is common to build IoT solution with The solution should protect the data on Data is encrypted at rest and in
Data Security cloud database or cloud storage cloud using encryption at rest and in transit.
platform. Since the cloud database transit.
and cloud data store is directly In using data encryption on cloud, the
accessible through the Internet, it may In using data encryption on cloud, the solution adopts key management in
pose higher risk of data breach due to solution should adopt encryption key whole lifecycle of encryption key
cyber attack. management to manage the whole operations (e.g. key generation, key
lifecycle of encryption key operations storage, key usage, key rotation, key
Although many cloud service providers (e.g. key generation, key storage, key revocation and key destruction).
provide various data protection usage, key rotation, key revocation and
features to address the data security key destruction). For IoT solution that processes highly
on cloud, the adoption of the features sensitive or requires higher security
are often neglected, which may pose For IoT solution that processes highly assurance of data encryption on
sensitive or requires higher security cloud, Hardware Security Module
15
HKCERT IoT Security Best Practice Guidelines
5
FIPS 140-2 Security Requirements for Cryptographic Modules (https://csrc.nist.gov/publications/detail/fips/140/2/final)
16
HKCERT IoT Security Best Practice Guidelines
4.2.3.2 Device Managing IoT devices with unique The device management platform Individual device can be identified
Management identifiers can prevent invalid or should have the capabilities of with unique identifier.
illegitimate IoT devices from affecting managing and tracking connected
the security of IoT solutions. devices through unique identifiers. Individual device can be tracked on
the device management platform.
Since IoT devices may not be kept The device management platform
updated in a timely manner and the old should provide device asset information Device model and firmware version
version may be still in use, device asset including device models and firmware can be checked on the device
information is essential to assess the versions. management platform.
scope of impact on vulnerability
management. The device management platform When anomaly with IoT device
should validate the integrity of device integrity is detected, individual device
IoT solution usually involves data root of trust boot process status, can be quarantined from the device
collection from IoT devices, analysis of monitor abnormal behaviour of IoT management platform.
data and producing insights into devices and quarantine devices if there
business decision making. It is essential is any anomaly with IoT device integrity.
to ensure the integrity of IoT devices
and avoid tampering the source of data
collection.
4.2.3.3 Data and Unlike IT system, IoT devices often lack Audit logs and security event logs Audit logs and security event logs are
Event data and event monitoring. should be monitored. being monitored.
Monitoring
On-going security monitoring helps The solution should define all security Security relevant events, such as
maintain the security status of IoT relevant events. elevation of privilege attempts;
17
HKCERT IoT Security Best Practice Guidelines
18
HKCERT IoT Security Best Practice Guidelines
4.2.4.2 Network Since attackers scan for any vulnerable The solution should ensure all No unnecessary network services are
Services network services over the network, unnecessary network services are detected.
Security reducing attack surface on the network disabled.
and securing the network services Access is denied to network services
minimise the security risk of network The solution should require without authentication.
attacks. authentication in accessing the network
services.
19
HKCERT IoT Security Best Practice Guidelines
4.2.4.3 Since Internet communications routes The solution should use Transport Layer The end-to-end communications
Transport through public network hop may Security (TLS) encryption for the between source devices and
Security expose to eavesdropping attacks, communications between devices and destination Internet servers are
Transport Layer Security (TLS) the Internet. encrypted with TLS.
encryption ensures the end-to-end data
confidentiality, data integrity and If the device does not natively support If the device does not natively support
authentication in the course of Internet Protocols, the solution should Internet Protocols, the end-to-end
communications over the Internet. provide IoT gateway for TLS encryption communications between IoT
communications over the Internet. gateways and destination Internet
Some IoT devices may not natively servers are encrypted with TLS.
support Internet Protocols, IoT gateway The IoT gateway should act as a firewall
can act as a firewall to enhance the to isolate IoT wireless network from the The IoT gateway can block network
network isolation and support TLS Internet. traffic from the Internet to IoT
encryption for the communications wireless network and vice versa.
over the Internet. The application service endpoints
should use valid TLS digital certificate The application service endpoints use
Attackers may intercept the network signed by trusted certificate authority. valid TLS server certificate signed by
transport by man-in-the-middle attack IoT device endpoint and IoT gateway trusted certificate authority for
between the communications should validate the authenticity of authenticity validation.
endpoints. Transport security can connection endpoints with TLS digital
ensure the authenticity of certificate. Each IoT device endpoint uses unique
communications endpoints. API token or unique TLS digital
For IoT solution that requires higher certificate for authenticity validation.
security assurance of the authenticity of
each IoT device endpoint, the IoT
solution should validate the
authenticity of each IoT device
endpoint with unique API token or
unique TLS digital certificate signed by
trusted certificate authority.
20
HKCERT IoT Security Best Practice Guidelines
Since attackers may inject malware into The device should include software / Users can update the device software
software / firmware / patch files, firmware update capability. / firmware with official software tools.
proper validation of legitimate software
/ firmware / patch files update would The device should include security Users can apply security patches
prevent against malware infection patch update capability. update to fix device vulnerabilities.
through tampered update files.
The device should establish the root of The device has hardware-validated
Since attackers may reverse engineer trust of device integrity by hardware- boot process to allow booting from
the firmware to extract hardcoded validated boot process with signed or signed or encrypted software /
account credentials or passwords, it encrypted software / firmware / patch firmware / patch files only.
would pose serious security risk on IoT files.
devices if the hardcoded password is Users are restricted from updating
disclosed publicly. The device should only allow the unofficial or modified software /
installation of signed software / firmware to the device.
Since users may often fail to change firmware / patch files.
default password during initial The device manufacturer / developer
installation and setup, default password confirms that the factory default or
21
HKCERT IoT Security Best Practice Guidelines
4.2.5.2 Physical Since attackers may exploit The device should disable unnecessary No unnecessary physical external
Security vulnerabilities through external physical external interfaces or ports on interfaces or ports exist or being
interfaces or ports, disabling or limiting the device. enabled on the device.
the capabilities of physical external
interfaces or ports reduces the security The device should restrict direct access Users cannot gain administrative
risk of gaining device control locally. to administrative capabilities through capabilities through physical
physical interfaces or ports. interfaces or ports.
Since anyone can easily gain system
control of the devices, debug interface The device should disable unnecessary Debug interfaces or ports are disabled
disabling or applying security restriction debug interfaces or ports. if they are not required.
on debug interfaces or ports reduces
the security risk of system compromise If debug interfaces or ports are If debug interfaces or ports are
due to physical intrusion. required, authentication or access required, authentication or access
control should be required to restrict control is required before granting
22
HKCERT IoT Security Best Practice Guidelines
4.2.5.3 Data Since IoT devices are more likely prone Personal data, sensitive data and user Personal data stored in the device
Security to physical tampering, proper credential data should be protected storage is protected with encryption
consideration and handling of data with encryption in device storage. (e.g. AES-256).
security of the device storage are
important. Where the device hardware is capable Neither personal data, sensitive data
of supporting asymmetric nor user credential data is stored in
Since device storage can be physically cryptography, each device should have plain text in both internal and external
extracted with the provision of proper a unique asymmetric key-pair securely storage memory.
hardware tools, sensitive data has to be generated at manufacture, with the
encrypted at rest to ensure data private key secured within a Secure The device manufacturer / developer
confidentiality. Element (if supported by the hardware), confirms a unique encryption key is
and a PKI digital certificate from the generated and stored within a Secure
In addition to encryption of sensitive manufacturer’s PKI. Element (if supported by the
data, proper usage and protection of hardware) for each device.
encryption key are also often neglected, For device hardware that does not
which may pose higher risk of sensitive support asymmetric cryptography, a Users can perform data erasure on the
information disclosure. secret symmetric key unique per device device such that all personal data,
should be securely generated at sensitive data and user credential data
Since devices may be recycled or re- manufacture, with the private key are erased.
used by other users, users should have secured within a Secure Element (if
control of performing data erasure supported by the hardware). The User can perform factory reset such
when the device is no longer used or manufacturer should securely that all data and user configurations
being disposed. distribute the device symmetric key to are cleaned up.
23
HKCERT IoT Security Best Practice Guidelines
4.2.5.4 Device IoT devices may counter different The device should remain operating and The device can function locally as
Availability operating conditions such as network locally functioning in case of loss of normal in case of loss of network
outage, power outage, etc. that may network connectivity. connectivity or absence of network
affect the device availability. connectivity.
If the device requires network
IoT devices should be able to recover connectivity to function, the device If the device requires network
automatically and resume the normal should resume to an expected, connectivity to function, the device
operation state in the event of different operational and stable state after can resume to function normally after
operating conditions to avoid exposure resumption of network connectivity resumption of network connectivity
of security loopholes. automatically. automatically.
The device should recover to the The device can recover to normal
operating state in case of power operating state after power outage.
outage.
24
HKCERT IoT Security Best Practice Guidelines
25