Project 4C
Internet Of Things Security

INTRODUCTION:

The Internet Of Things is populated with an ever expanding range of sensors and appliances. Initially such devices were likely to be connected to monitoring and control devices over purely local/personal networks (e.g., infra-red, Bluetooth, ZigBee), but it is increasingly common to connect such devices (directly or via a bridge) to the Internet. This enables remote monitoring and control, but it also exposes them to a variety of remote attacks.

For some targets (e.g., a national power grid or uranium separation centrifuges) their strategic importance and need for protection should be clear. It might not be immediatly obvious how one might hijack simple devices (e.g., light switches or temperature/humidity sensors) for nefarious purposes, but:

Attackers have proven innovative and resourceful in making use of compromised devices of many kinds, so even if you do not see any obvious dangers, prudence suggests that greater care be taken with the security of IOT devices. In particular, all communications and control for IOT devices should be encrypted and authenticated.

In this project we will extend your embedded temperature sensor to accept commands from, and send reports back to, a network server. You will do this over both unencrypted and encrypted channels.

RELATION TO READING AND LECTURES:

This project applies the principles discussed in the reading and lectures on Cryptography, Distributed Systems Security, and Secure Socket Layer encryption.

PROJECT OBJECTIVES:

DELIVERABLES:

A single compressed tarball (.tar.gz) containing:

PREPARATION:

PROJECT DESCRIPTION:

Part 1: Communication with a Logging Server

Write a program (called lab4c_tcp) that:

The ID number (passed with the initial ID= command) will appear in the TCP server log (follow the TCP server URL), and will permit you to find the reports and server-side logs for your sessions. It is vitally important that the ID= string you send to the server (in your first report) be identical to the value (passed to your client) in the --id= command line argument. If they are not identical, the sanity-check and grading scripts will be unable to find the reports from your session(s) and will assume that your program did not work.

If the server receives incorrect reports from you it will send back LOG messages describing the errors.

To protect your privacy, you do not have to use your student ID number, but merely a nine-digit number that you will recognize and that will be different from the numbers chosen by others.

From the server status page, you will also be able to see, for each client, a log of all commands sent to and reports received from that client in the most recent session. If the server does not like your reports, it may be due to garbage (typically null) characters. If the problem with your reports is not obvious, examine the server log in an editor that will display non-graphical characters.

As in Project 4B, to facilitate development and testing you might find it helpful to write your program to, if compiled with a special (-DDUMMY) define, include mock implementations for the mraa_aio_ and mraa_gpio_ functionality. Doing so will enable you to do most of your testing on your regular computer. When you are satisfied that it works there, modify your Makefile run the command "uname -r", check for the presence of the string "beaglebone" in that output, and if not found, build with a rule that passed the -DDUMMY flag to gcc.

Part 2: Authenticated TLS Session Encryption

Write a program (called lab4c_tls) that:

The ID number will appear in the TLS server log (follow the TLS server URL), and will permit you to find the reports for your sessions.

The SSL library is not bullet-proof against protocol errors, and buggy clients will occasionally crash the server. It should be restarted pretty promptly. If not, ask one of the TAs for help. If the server seems to crash when you are testing your client, you probably have a bug in your SSL connection establishment.

Note that you may choose to:

SUMMARY OF EXIT CODES:

SUBMISSION:

Your tarball should have a name of the form lab4c-studentID.tar.gz. You can sanity check your submission with this test script which should run on your Beaglebone or (if with appropriately dummied sensor access) on your usual Linux development environment. There will be no manual re-grading on this project. Submissions that do not pass the test script are likely to receive very low scores.

Your README file (and all source files) must include lines of the form:

And, if slip days are allowed on this project, and you want to use some, this too must be included in the README file: If, for instance, you wanted to use two slip-days, you would add the following line:

GRADING:

Points for this project will be awarded:

value feature
Packaging and build (10% total)
3% un-tars expected contents
3% clean build of correct program w/default action (no warnings)
2% Makefile has working clean, dist targets
2% reasonableness of README contents
Unencrypted (50% total)
20% establishes TCP session, and presents ID
10% reports temperatures
10% correct command processing
10% command and data logging
Encrypted Server Sessions (40% total)
20% establishes TLS session, presents ID
10% reports temperatures
10% correct command processing