C PID6129769
C PID6129769
ESP8266 Updates
Xinchi He Mauricio Papa Rose Gamble
Tandy School of Computer Science Tandy School of Computer Science Tandy School of Computer Science
The University of Tulsa The University of Tulsa The University of Tulsa
Tulsa, OK, USA Tulsa, OK, USA Tulsa, OK, USA
[email protected] [email protected] [email protected]
Abstract—The ESP8266 is a popular Arduino-compatible SoC ESP8266 boards can be updated directly through a serial
chip that has been adopted by many IoT (Internet of Things) connection following a simple sequence of steps: (i) create
device manufacturers. Available OTA (Over–The–Air) libraries the Arduino program, (ii) compile the code into binary, and
to upload programs to the chip exist, but they offer limited
security mechanisms. This paper describes extensions to those (iii) upload the binary through the available UART (Universal
libraries that allow incremental computation of a SHA1 hash Asynchronous Receiver/Transmitter). However, this approach,
over program fragments and the ability to validate its value using which is mainly used for development purposes, requires
an authenticated remote service through RESTful APIs. This is physical access to the board. This process would not be cost–
an important feature that offers basic primitives to incorporate efficient nor practical for large scale deployments such as in
self-protection strategies into the platform. Testing on a proof-of-
concept system shows promising results and potential to extend a smart city.
the approach to a large distributed domain. For this reason, several available Arduino libraries allow the
Index Terms—wireless security, over–the–air updates, self pro- ESP8266 boards to receive updates in an OTA manner through
tection, ESP8266, Arduino, Internet of Things Wi–Fi [3]. However, these libraries offer minimal verification
I. I NTRODUCTION capabilities to validate the legitimacy of the update; leaving
the system vulnerable to cyber attacks. Current libraries allow
The ESP8266 [1] is a widely used SoC (System on Chip) developers to upload a binary and its associated MD5 check-
with Wi–Fi capabilities that has been used in IoT devices and sum as a limited mechanism to validate the integrity of the
boards such as Wemos D1 Mini and Adafruit Feather HUZ- update. However, this approach is susceptible to cyber attacks.
ZAH. It is Arduino-compatible, has GPIO (General-Purpose In particular, since the party uploading the update also sends
Input/Output) pins and includes a 10-bit ADC (analog-to- the MD5, it would be trivial for an attacker with access to
digital converter). calculate a valid MD5 for an update that may include malware.
Boards using this chip have a small footprint and they
It is important to note that MD5 checksums are not always
are very affordable. For instance, the Wemos D1 Mini board
enabled by default.
(Figure 1) is only 25.6mm by 34.2mm and, at the time of
This paper presents an approach that serves two purposes:
this writing, its cost was approximately $2–$3, making it an
attractive IoT development platform. 1) Extend existing ESP8266 Arduino OTA libraries by
allowing remote verification using a more robust SHA1
[4] hashing scheme.
2) Provide developers with primitives to incorporate self-
protection strategies that are suitable for more critical
applications and large distributed environments.
The approach was tested using the ESP8266–based Wemos
D1 Mini board and a remote web service to validate the SHA1
hash. A Python script library was used to verify that the
SHA1 calculated by the extended library is correct. A trusted
Fig. 1. Wemos D1 Mini (left), US quarter (middle), and relay shield (right)
web service was also deployed to allow the ESP8266 board
As for most network-capable devices, program updates are to validate the authenticity of the update. Preliminary results
an essential part of the development and deployment lifecycle indicate that the proposed extension to the ESP8266 Arduino
for ESP8266–based solutions. Updates are important for a OTA update libraries can be used to protect the process from
number of reasons; they can be used to fix and address invalid updates.
security vulnerabilities, add new functionality, incorporate new The following sections give an overview of the self-
communication protocols and satisfy compliance requirements protection concept, the ESP8266 SoC and then describe our
[2]. approach and experimental results in detail.