Blockchain-based_secure_firmware_update_for_embedd
Blockchain-based_secure_firmware_update_for_embedd
DOI 10.1007/s11227-016-1870-0
This work was supported by Basic Science Research Program through the National Research Foundation
of Korea (NRF) funded by the Ministry of Science, ICT and Future Planning (NRF-2014R1A1A1006770).
B Jong-Hyouk Lee
jonghyouk@pel.smuc.ac.kr; hurryon@gmail.com; jonghyouk@smu.ac.kr
Boohyung Lee
boohyung@pel.smuc.ac.kr
123
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Blockchain-based secure firmware update for embedded devices. . . 1153
1 Introduction
According to the Gartner’s report [1], the Internet of Things (IoT) era will change our
lives with network connected IoT devices. The number of IoT devices is expected to
be 25 billion by 2020 and the number will continuously increase. The IoT devices
are tiny and small, while those are mostly embedded devices designed for specific
operations such as sensing and controlling.
Recent cyber attacks are targeting firmware, which is a software program on an
embedded device [2], rather than services built on well-turned servers [3]. Due to lim-
ited resources and capacities of embedded devices, strong security properties have not
been applied yet to the embedded devices. Many bugs and vulnerabilities of embedded
devices are reported every day and those are being used by attackers to break into the
embedded devices.
One of feasible ways to protect the embedded devices is to shorten the attack
window time by installing a latest firmware. In other words, updating the embedded
devices with the latest firmware helps to minimize effects of attacks targeting known
firmware vulnerabilities. A secure firmware update requires a correct firmware version
check, validation, and download, while supporting integrity. In addition, due to the
increasing number of the embedded devices in the IoT era, excessive network traffic
may occur when downloading the latest firmware simultaneously from a dedicated
firmware update server. The secure firmware update thus requires a means to avoid
such a current client–server model for firmware distribution in an IoT environment.
With this in mind, in this paper, we propose a new firmware update scheme that
utilizes a blockchain technology. In the proposed scheme, an embedded device requests
its firmware update to blockchain nodes on a peer-to-peer decentralised network. It
then receives a response from a blockchain node to determine whether its firmware
is up-to-date or not. When the firmware is not latest, the embedded device requests
a metadata file to download the latest firmware from a peer-to-peer firmware sharing
network consisting of the blockchain nodes. Even in the case that the version of the
firmware is up-to-date, the firmware integrity is checked via the blockchain nodes.
Accordingly, the proposed scheme guarantees the correctness and recentness of the
firmware on the embedded device in the IoT era.
This paper, which is an extended version of the paper published in Proc. of Qshine
2016 [4], is organized as follows. Section 2 provides related works. Section 3 presents
the proposed scheme with the overall architecture and operation procedures. In Sect. 4,
we discuss the proposed scheme’s strengths and weaknesses. Section 5 concludes this
paper.
2 Preliminaries
The ability to securely update firmwares of deployed embedded devices over networks
is one of essential features nowadays. Vendors use the remote firmware update to
provide new functionalities and also to patch vulnerabilities on the embedded devices.
123
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
1154 B. Lee, J.-H. Lee
In general, a vendor maintains its own firmware repository that contains pre-compiled
binaries of the firmware for embedded devices [3,5]. When requested, the firmware
file is downloaded to the embedded device.
For securing the remote firmware update, asymmetric cryptographic algorithms
such as ECC or RSA are normally used. For instance, to provide integrity and authen-
tication of the firmware, the message digest over the original firmware file is calculated
with a hash function and then the message digest is digitally signed using a private key.
The generated digital signature is attached to the firmware file with the corresponding
public key of the private key. After downloading the firmware file from the repos-
itory, a security check process is performed before the actual firmware update, i.e.,
the digital signature is validated only with the attached public key. Once the security
check process is successfully done, the actual firmware update is started on the target
embedded device.
The current model for firmware distribution from the repository to the embed-
ded device adopts the client–server model that means excessive network traffic may
occur when requesting the firmware update files from embedded devices simultane-
ously. When we consider the IoT environment that tens of millions of the embedded
devices are possibly required to be updated simultaneously, this client–server model
is inappropriate. In addition, the asymmetric cryptographic algorithm, which is used
for message signing, requires a complex key management and protection, e.g., private
keys must be well securely used and maintained for each firmware version.
2.2 Blockchain
123
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Blockchain-based secure firmware update for embedded devices. . . 1155
The proposed secure firmware update scheme enables that an embedded device
requests its firmware update to blockchain nodes and receives a response from a
blockchain node to determine whether the device’s firmware is up-to-date or not. If
the firmware is not up-to-date, then a metadata file with a peer list to download the
latest firmware is provided to the device so that the embedded device can keep the lat-
est firmware by downloading the latest firmware from a peer-to-peer firmware sharing
network consists of the blockchain nodes. Note that the peer-to-peer firmware sharing
network can be implemented by BitTorrent [11]. If the firmware is up-to-date, then
the firmware integrity is checked via the blockchain nodes. Note that the embedded
device is a peer involved in the blockchain network and the firmware sharing network
as well. Notations used in this paper are shown in Table 1.
3.1 Overview
Figure 1 depicts the overall architecture of the proposed scheme. The following entities
are defined:
123
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
1156 B. Lee, J.-H. Lee
Table 1 Notations
Notation Definition
• Vendor node A vendor node is outside of a blockchain network but keeps a secure
channel with a verification node to provide the relevant files for latest firmware
updates.
All blockchain nodes are either peers or trackers in a firmware sharing network, i.e.,
normal nodes are peers, whereas verification nodes are trackers. A verification node,
which is a BitTorrent tracker, keeps track of where firmware copies reside on peers,
which firmware copies are available, and helps coordinate efficient transmission and
reassembly of the copied firmware files [12]. When a normal node, more specifically a
request node, downloads the latest firmware file, it requires a metadata file and a peer
list that are provided from the verification node. Note that the metadata file contains the
filename, hash value of the file, piece length, tracker URL, etc., whereas the peer list
is composed of a hash value of the file and IP addresses of peers that have a complete
firmware file or an incomplete firmware file.
123
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Blockchain-based secure firmware update for embedded devices. . . 1157
Verification Node
n3
n4 v2
Response Node v1
n1 n5
Request Node n8
nj n2
Vendor Node n6 n7
ni
No (C2-3 )
Download the latest Confirmation of nj's
Verify ni's firmware ni's firmware version higher Download the latest
firmware for ni verifier by PoW
than nj's firmware version? firmware for ni
Yes (C2-1 )
Figure 2 shows the overall procedure of the proposed scheme. When an embedded
device, which is a normal node in a blockchain network, starts its firmware update
request by broadcasting a version-check request message, it becomes a request node
in the proposed scheme. Once the version-check request message is broadcasted in the
blockchain network, other normal nodes, i.e., response nodes, and verification nodes
respond to the version-check request message, respectively. Depending on the node
type, the response procedure is different as defined in the following cases:
In C1, a verification node checks whether a request node has the latest version of
the firmware or not. If the request node has the latest version, the verification node
further checks the integrity of the request node’s firmware. Otherwise, the request
node’s firmware is needed to be updated via the firmware sharing network.
123
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
1158 B. Lee, J.-H. Lee
In C2, a response node compares its firmware version with the firmware version
of the request node. If the firmware version of the response node is same with that of
the request node, the response node demands other nodes in the blockchain network
to verify its firmware file’s hash value, which is called a verifier that will be explained
later. If the verifier of the response node is confirmed by other nodes that will be done
via a six confirmation, i.e., proof-of-work (PoW), of the blockchain, the response
node believes that its firmware is correct. Then, the response node can check whether
the request node’s firmware has been altered by comparing each other’s verifiers. If
the firmware version of the response node is different with that of the request node,
the response node further checks whether the firmware version of the request node
is higher than its firmware version. If the firmware version of the request node is
higher, the response node’s firmware is needed to be updated via the firmware sharing
network. Otherwise, the request node’s firmware is needed to be updated via the
firmware sharing network.
The proposed scheme uses a different block structure compared with the blockchain
of Bitcoin. The block in the proposed scheme is made up of the block header and
verification field as shown in Fig. 3. The block header is composed of the block size,
version, previous block header hash, and merkle root. The verification field consists of
the verification counter, merkle tree, verification log, model name, firmware version,
and verifier.
123
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Blockchain-based secure firmware update for embedded devices. . . 1159
3.3 Procedure
As mentioned, the proposed scheme has the two different operation cases: C1 and C2.
The case C1 is then divided into two sub-cases (C1-1 and C1-2), while the case C2
is also similarly separated into C2-1, C2-2, and C2-3. The cases depends on the type
of response node, which receives the version-check request message sent from the
request node.
123
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
1160 B. Lee, J.-H. Lee
ni vi
1. req_verchk[PUni||IDni||D||v||r]
3. res_verchk[E(PUni, vnew||r+1||IDvi)]
4. Generates verifier H(fv) after
checking res_verchk message
5. req_verification[E(PUvi, H(fv)||r+2)||Signi]
6. Verifies and decrypts
req_verification message
and prepares to send H(fvnew)
7. res_verification[E(PUni, H(fvnew)||r+3)||Sigvi]
8. Verifies and decrypts
res_verification message,
and compares H(fv) and H(fvnew)
123
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Blockchain-based secure firmware update for embedded devices. . . 1161
ni vi
1. req_verchk[PUni||IDni||D||v||r]
3. res_verchk[E(PUni, vnew||Mvnew||r+1||IDvi)]
4. Decrypts res_verchk mesasge and
obtains H(fvnew) from Mvnew
5. req_download[E(PUvi, IDni||H(fvnew)||r+2)||vnew||Signi]
7. res_download[E(PUni, Lvnew||IDvi||r+3)||vnew||Sigvi]
123
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
1162 B. Lee, J.-H. Lee
the vender node. In C2-2, the legitimacy of a verifier is confirmed via the PoW as like
in the blockchain of Bitcoin [6], whereas the legitimacy of a verifier does not need
to be considered in C2-1 and C2-3 because there is no requirement of checking the
verifier.
– C2-1 It starts when n i ’s firmware version is higher than n j ’s firmware version.
– C2-2 It starts when n i ’s firmware version and n j ’s firmware version are equal.
– C2-3 It starts when n i ’s firmware version is lower than n j ’s firmware version.
The procedure of C2-1 shown in Fig. 6 is as follows.
1. A request node n i broadcasts a req_verchk message including PU n i , I Dn i , D,
v, and r to a blockchain network.
2. When receiving the message, n j compares v obtained from message and v and
confirms that n i ’s firmware version is higher.
3. n j responds by sending a res_verchk message containing the encrypted data such
as v , r + 1, and I Dn j . Note that PU n i obtained from the req_verchk message
is used for the encryption.
4. After decrypting the message with P Rn i , n i compares v and v . Then, it also
confirms that its firmware version is higher than that of n j .
5. n i generates a digital signature Sign i over a notice_download message containing
I Dn i , v , and r + 2. Then, Sign i is attached in the notice_download message,
when n i sends the message to n j .
ni nj vi
1. req_verchk[PUni||IDni||D||v||r]
2. Compares v and v'
3. res_verchk[E(PUni, v'||r+1||IDnj)]
4. Decrypts res_verchk message
and compares v and v'
5. notice_download[IDni||v'||r+2||Signi]
6. Verifies notice_download
message
7. req_metadata[E(PUvi, IDnj||v'||D||r+3)||PUnj]
9. res_metadata[E(PUnj, Mvnew||r+4)]
10. Decrypts res_metadata message
and obtains H(fvnew) from Mvnew
123
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Blockchain-based secure firmware update for embedded devices. . . 1163
123
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
1164 B. Lee, J.-H. Lee
ni nj
1. req_verchk[PUni||IDni||D||v||r]
2. Generates verifier H(fv')
after comparing v and v'
3. join_verification[IDni||IDnj||D||H(fv')] blockchain network
4. res_verchk[E(PUni, v'||r+1||IDnj)||PUnj]
5. Generates verifier H(fv) after
checking res_verchk message
6. req_verification[E(PUnj, H(fv)||r+2)||Signi]
7. Verifies and decrypts
req_verification message
and prepares to send H(fv')
8. res_verification[E(PUni, H(fv')||r+3)||Signj]
9. Verifies and decrypts
res_verification message,
and compares H(fv) and H(fv')
5. When n i receives the message, it decrypts the message with P Rn i and check
r + 1. If v and v are equal, n i generates verifier H ( f v). Otherwise, the process
is terminated with an error.
6. n i first encrypts H ( f v) and r + 2 with PU n j and generates a digital signature
Sign i over a req_verification message containing the encrypted H ( f v) and r +
2. Then, Sign i is attached in the req_verification message, when n i sends the
message to n j .
7. When n j receives the message, it first verifies the message’s integrity and orig-
inator with Sign i and PU n j obtained from the res_verchk message. Then, it
decrypts the message with P Rn j and checks r + 2. As a result of checking the
value, n j prepares to send H ( f v ). Otherwise, the process is terminated with an
error.
8. n j first encrypts H ( f v ) and r + 3 with PU n i and generates a digital signature
Sign j over a res_verification message containing the encrypted H ( f v ) and r +
3. Then, Sign j is attached in the res_verification message, when n j sends the
message to n i .
9. When n i receives the message, it first verifies the message’s integrity and origina-
tor with Sign j and PU n j previously shared. Then, it decrypts the message with
P Rn j and checks r + 3. Now, n i compares H ( f v) and H ( f v ) to verify n i ’s
firmware integrity. If the verifiers are equal, the process is successfully finished.
Otherwise, n i needs to download the latest firmware via a peer-to-peer firmware
sharing network similar to C2-1 or C2-3.
123
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Blockchain-based secure firmware update for embedded devices. . . 1165
vi ni nj
1. req_verchk[PUni||IDni||D||v||r]
2. Compares v and v'
3. res_verchk[E(PUni, v'||r+1||IDnj)]
4. Decrypts res_verchk message
and compares v and v'
5. req_metadata[E(PUvi, IDni||v||D||r+2)||PUni]
7. res_metadata[E(PUni, Mvnew||r+3)]
9. req_download[E(PUvi, IDni||H(fvnew)||r+4)||Signi]
10. Verifies and decrypts req_download
message, and checks H(fvnew)
123
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
1166 B. Lee, J.-H. Lee
11. vi first encrypts Lvnew , I Dvi , and r + 5 with PU n i and generates a digital
signature Sigvi over a res_download message containing the encrypted data.
Then, Sigvi is attached in the res_download message, when vi sends the message
to n i .
12. When n i receives the message, it first verifies the message’s integrity and orig-
inator with Sigvi and PU vi previously shared. Then, it decrypts the message
with P Rn i and checks r + 5. Now, n i is able to download the latest firmware file
f vnew from the peer-to-peer firmware sharing network and then installs the file.
After the end of firmware verification, the request node makes its verification log
including request node’s ID, response node’s ID, timestamp, etc. The request node
then broadcasts it to the blockchain network. Consequentially, it enables to validate
the firmware integrity and decide whether the update firmware on the device requires
or not without a user’s control.
4 Discussion
The proposed scheme focuses on minimizing the attack window time by enabling
an embedded device can quickly check its firmware version and download the latest
firmware if needed. It thus helps to shorten effects of attacks targeting known firmware
vulnerabilities on the embedded device. As this scheme has been developed for the
IoT environment, all the procedures such as firmware validation and download to
update are based on distributed models. In other words, a blockchain technology has
been adopted for secure firmware version check and validation, while BitTorrent has
been used for a peer-to-peer firmware sharing network for downloading the latest
firmware. However, a verification node acts as a tracker in the peer-to-peer firmware
sharing network. The verification node is thus considered as a server assisting in
the communication between peers for firmware downloading. The proposed scheme
can be improved by adopting distributed hash tables, i.e., implementing a trackerless
BitTorrent system.
In the proposed scheme, a verification node’s public key is assumed to be pre-
shared to all normal nodes. As the number of the verification nodes increases, the key
distribution and management cost increases. However, in practice, the number of the
verification nodes would not be many.
The proposed scheme enables that an embedded device keeps its firmware up-to-
date while providing its integrity, i.e., correctness of firmware. However, it does not
mean that the provided firmware is not buggy nor vulnerable, e.g., stack overflow
[14]. In addition, the proposed scheme does not guarantee that involved nodes work
correctly. We have assumed that all nodes work as defined in the proposed scheme.
However, in practice, some nodes can be compromised by an attack’s physical access
and firmware modification attack.
In the proposed scheme, a request node starts its firmware update request by sending
the version-check request message, which is a broadcast message. Then, depending
on the node type receives the broadcast message, the proposed scheme has 2 different
operation cases such as C1 and C2. However, due to the nature of the broadcast
message, the proposed scheme may cause unnecessary network traffic and nodes’
123
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Blockchain-based secure firmware update for embedded devices. . . 1167
5 Conclusion
In this paper, we presented a new firmware update scheme that securely checks a
firmware version, validates the correctness of firmware, and enables downloading
of the latest firmware for embedded devices in an IoT environment. The proposed
scheme relies on a blockchain technology for firmware checking and validation, while
BitTorrent can be used to implement a peer-to-peer firmware sharing network for
firmware downloading.
The architecture and detailed operation procedures of the proposed scheme have
been illustrated. In addition, we have discussed the proposed scheme’s strengths and
weaknesses. As mentioned, there are some considerations and limitations of the current
scheme so that we will improve the proposed scheme to eliminate the found limitations
and improve security and scalability.
References
1. Gartner (2014) Gartner says 4.9 billion connected things will be in use in 2015, Gartner Newsroom
2. Firmware—Wikipedia. https://en.wikipedia.org/wiki/Firmware
3. Choi B-C, Lee S-H, Na J-C, Lee J-H (2016) Secure firmware validation and update for consumer
devices in home networking. IEEE Trans Consum Electron 62(1):39–44
4. Lee B, Malik S, Wi S, Lee J-H (2016) Firmware verification of embedded devices based on a blockchain.
In: Proceedings of the Qshine 2016
5. Jurkovi G, Sruk V (May 2014) Remote firmware update for constrained embedded systems. In: Pro-
ceedings of the MIPRO 2014
6. Nakamoto S (2009) Bitcoin: a peer-to-peer electronic cash system
7. Blockchain Bitcoin Wiki. https://en.bitcoin.it/wiki/Block_chain
8. Hu Y, Perrig A, Johnson DB (2003) Efficient security mechanisms for routing protocols. In: Proc.
NDSS03
9. Badev A, Chen M (2013) Bitcoin: technical background and data analysis. Federal Reserve Board
10. Bider D, Baushke M (2012) SHA-2 data integrity for the secure shell (SSH) transport layer protocol.
IETF RFC 6668
11. Cohen B (2003) Incentives build robustness in bitorrent. In: Proceedings of the 1st Workshop on
Economics of Peer-to-Peer Systems
12. Wiki Theory—Bittorrent Protocol Specification v1.0. https://wiki.theory.org/BitTorrentSpecification
13. Antonopoulos, Andreas M (2014) Mastering Bitcoin: unlocking digital crypto-currencies. OReilly
Media
14. Alouneh S, Bsoul H, Kharbutli M (2016) A software tool to protect executable files from buffer overflow
attacks. Int J Internet Technol Secur Trans 6(2):133–166
15. Ahamad S, Al-Shourbaji I, Al-Janabi S (2016) A secure NFC mobile payment protocol based on
biometrics with formal verification. Int J Internet Technol Secur Trans 6(2):103–132
123
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Terms and Conditions
Springer Nature journal content, brought to you courtesy of Springer Nature Customer Service Center
GmbH (“Springer Nature”).
Springer Nature supports a reasonable amount of sharing of research papers by authors, subscribers
and authorised users (“Users”), for small-scale personal, non-commercial use provided that all
copyright, trade and service marks and other proprietary notices are maintained. By accessing,
sharing, receiving or otherwise using the Springer Nature journal content you agree to these terms of
use (“Terms”). For these purposes, Springer Nature considers academic use (by researchers and
students) to be non-commercial.
These Terms are supplementary and will apply in addition to any applicable website terms and
conditions, a relevant site licence or a personal subscription. These Terms will prevail over any
conflict or ambiguity with regards to the relevant terms, a site licence or a personal subscription (to
the extent of the conflict or ambiguity only). For Creative Commons-licensed articles, the terms of
the Creative Commons license used will apply.
We collect and use personal data to provide access to the Springer Nature journal content. We may
also use these personal data internally within ResearchGate and Springer Nature and as agreed share
it, in an anonymised way, for purposes of tracking, analysis and reporting. We will not otherwise
disclose your personal data outside the ResearchGate or the Springer Nature group of companies
unless we have your permission as detailed in the Privacy Policy.
While Users may use the Springer Nature journal content for small scale, personal non-commercial
use, it is important to note that Users may not:
1. use such content for the purpose of providing other users with access on a regular or large scale
basis or as a means to circumvent access control;
2. use such content where to do so would be considered a criminal or statutory offence in any
jurisdiction, or gives rise to civil liability, or is otherwise unlawful;
3. falsely or misleadingly imply or suggest endorsement, approval , sponsorship, or association
unless explicitly agreed to by Springer Nature in writing;
4. use bots or other automated methods to access the content or redirect messages
5. override any security feature or exclusionary protocol; or
6. share the content in order to create substitute for Springer Nature products or services or a
systematic database of Springer Nature journal content.
In line with the restriction against commercial use, Springer Nature does not permit the creation of a
product or service that creates revenue, royalties, rent or income from our content or its inclusion as
part of a paid for service or for other commercial gain. Springer Nature journal content cannot be
used for inter-library loans and librarians may not upload Springer Nature journal content on a large
scale into their, or any other, institutional repository.
These terms of use are reviewed regularly and may be amended at any time. Springer Nature is not
obligated to publish any information or content on this website and may remove it or features or
functionality at our sole discretion, at any time with or without notice. Springer Nature may revoke
this licence to you at any time and remove access to any copies of the Springer Nature journal content
which have been saved.
To the fullest extent permitted by law, Springer Nature makes no warranties, representations or
guarantees to Users, either express or implied with respect to the Springer nature journal content and
all parties disclaim and waive any implied warranties or warranties imposed by law, including
merchantability or fitness for any particular purpose.
Please note that these rights do not automatically extend to content, data or other material published
by Springer Nature that may be licensed from third parties.
If you would like to use or distribute our Springer Nature journal content to a wider audience or on a
regular basis or in any other manner not expressly permitted by these Terms, please contact Springer
Nature at
onlineservice@springernature.com