IoT and Cybersecurity

As more and more devices are connected to the internet, IoT has become a pervasive trend in manufacturing, transportation, energy generation, and smart buildings/homes, among others. Because IoT is everywhere around us, privacy and security have become very important. This module introduces IoT with a device that has lots of sensors and is internet connected: smartphones. In this module, students work on projects that accesses various sensors on their phones, such as the compass and motion sensors. The module also utilizes a 3D simulated robotics environment where students create programs that control their robots and perform various tasks. Initially, all communication between the program and the robot is in the open, i.e., unencrypted. Students learn how to eavesdrop on messages and take control of others’ robots, and conversely, how to protect their robots from these attacks. The curriculum then introduces various cybersecurity concepts such as Denial of Service (DoS) attacks, encryption, secure key exchange, and authentication.

Table of Contents

Unit 1: Introduction to the Internet of Things (IoT)

Estimated time

45 minutes x 5 days

Lesson summary

Students will learn about the Internet of Things (IoT), which refers to physical objects (or groups of such objects) that are equipped with sensors, processing ability, software, and other technologies in order to be able to connect to and exchange data with other devices and systems. This flow of data can occur either over the Internet or by using other communications networks. Thingspeak, an IoT analytics platform provided by Mathworks, is one particular method for accessing the data being collected by these IoT devices and will be the focus of this lesson.

Learning objectives

The students will be able to:

  • Access Remote Procedure Calls (RPC’s) for ThingSpeak sensors
  • Create a complementary pair of applications taking advantage of ThingSpeak
  • Describe how this technology affects our lives (i.e. applications of tech)
Vocabulary

IoT, sensors, RPC’s

Activities
Lesson Resources

Unit 2: Your Phone as a Sensor with PhoneIoT

Estimated time

45 minutes x 5 days

Lesson summary

Students will learn about PhoneIoT, which is an app that lets students connect their phones/tablets to NetsBlox and access their sensor data as IoT devices over the internet.

Learning objectives

The students will be able to:

  • Connect their phones to NetsBlox and access sensors
  • Select the appropriate access paradigm for sensor data
  • Integrate sensor data into their NetsBlox projects for practical purposes like controlling sprites
Vocabulary

Polling, streaming

Activities
Lesson Resources

Unit 3: Graphical User Interface (GUI) using PhoneIoT

Estimated time

45 minutes x 5 days

Lesson summary

Students will learn about how to make GUIs with PhoneIoT. This allows useful virtual controls like buttons, text boxes, joysticks, etc. to be added to the PhoneIoT app display and used to control NetsBlox projects through event-based message passing.

Learning objectives

The students will be able to:

  • Add widgets/controls to their PhoneIoT devices
  • Receive events from the user when interacting with controls
  • Create remote controllers for NetsBlox projects
Vocabulary

GUI, widget/control, canvas

Activities
Lesson Resources

Unit 4: Introduction to RoboScape Online

Estimated time

45 minutes x 5 days

Lesson summary

Students will learn how to control a robot through NetsBlox, and how to accomplish basic tasks using its motors and sensors.

Learning objectives

The students will be able to:

  • Connect to a robot through NetsBlox
  • Drive a robot using a controller program
  • Access sensors on remote robots
Vocabulary

Robotics, autonomy, sensors

Activities
Lesson Resources

Unit 5: Controlling Remote Robots

Estimated time

45 minutes x 5 days

Lesson summary

Students will learn how to accomplish more advanced tasks with their robots.

Learning objectives

The students will be able to:

  • Use sensors to navigate in an environment
  • Create a custom controller app for their robot
Vocabulary

LIDAR

Activities
Lesson Resources

Unit 6: Introduction to Cybersecurity

Estimated time

45 minutes x 5 days

Lesson summary

Students will learn about how the simplest way to send messages is not resistant to some similarly simple attacks. To keep their robot secure, they will also learn how to defend it from spoofed messages and brute force attacks.

Learning objectives

The students will be able to:

  • Understand the risks of communications over insecure channels
  • Know possible methods to mitigate a Brute Force attack
  • Send and receive encrypted messages
Vocabulary

Encryption, Brute Force attacks

Activities
Lesson Resources

Unit 7: Cybersecurity with Robots

Estimated time

45 minutes x 5 days

Lesson summary

Students will learn about more advanced topics in cybersecurity.

Learning objectives

The students will be able to:

  • Write software to break a simple cipher
  • Create a more advanced encryption program
  • Understand how a replay attack works
  • Use sequence numbers to prevent replay attacks
Vocabulary

Key exchange, replay attack, sequence number

Activities
Lesson Resources

Unit 8: Individual or Team Project

Estimated time

45 minutes x 5 – 10 days

Lesson summary

Students will break into small teams of 1 (individual) to 4 and brainstorm/implement some large project in NetsBlox using concepts learned so far. Projects should be related to IoT, which includes PhoneIoT and RoboScape Online, as well as any other IoT-related services available in NetsBlox, even if they have not been covered in previous activities (see below for examples).

Project Ideas

This is meant to be a creative project where students all come up with their own unique project concepts, but here are some general examples of directions that could be taken if students are struggling to come up with one:

  • Use RoboScape Online to create a new, more complex project than those covered so far. This could include a competitive hacking/defending problem if in a group of 2 or 4. This could also include more complex projects that require robots to collaborate to complete some objective (optionally with a third party attempting to hack the robots at the same time). There are several environments that could be used already, and new (simple) ones could be added if they can lead to compelling project ideas.
  • Use PhoneIoT to make a remote controller for a robot in RoboScape Online. This could involve buttons, joysticks, sensors like accelerometer, gyroscope, compass heading, etc. Remember that this project should span the whole 5-10 days, so it must be sufficiently complex.
  • Use PhoneIoT to make an app with a live readout of some type of data based on the phone’s location. This could include issuing warnings for e.g. low air quality, nearby traffic, chance of precipitation, etc.
  • Extend a previous project with new features. Note that the new features must be significant changes, as the project should last for 5-10 days (depending on scheduling). Historically, most new features students come up with are relatively short to implement, so this option should probably be a last resort.
Data Sources

The following is a list of additional data sources (in no particular order) that can be used for data-driven projects:

  • AirQuality – Read real-time air quality index information based on location.
  • BingTraffic – Read streams of recent traffic accidents, construction areas, etc.
  • RainViewer – Get recent, current, and projected radar images across the world (Note: coverage may vary, but the continental USA should be well-covered).
  • ThingSpeak – This has already been covered to some degree, but there are many types of sensors that were not used in previous lessons which could be interesting.
  • WaterWatch – Read real-time water data based on location.
  • Weather – Read real-time weather data based on location.
  • Any IoT Scape services, which are all under “Community > Device” in the services dropdown menu of a call/run block. Some of these have been used in previous activities, but there may be others depending on what devices are connected to the NetsBlox server.
Student Resources