Dust Academy Security Labs
- 1 Things to Install
- 1.1 Windows platform
- 1.1.1 FTDI Drivers
- 1.1.2 Serial Terminal
- 1.2 Mac OS or Linux
- 1.1 Windows platform
- 2 Lab 01. Your First Network.
- 3 Lab 02. Navigating the Documentation
- 4 Lab 03. Serial Port Madness
- 5 Lab 04. Network Identifier.
- 6 Lab 05. Common Join Key
- 7 Lab 06. Access Control List
- 8 Lab 07. Changing Join Key from the Manager
Labs on this page are adapted from Dust Academy’s website for ENSTA’s class on IoT security
Things to Install
Windows platform
FTDI Drivers
FTDI is the make of a chip on the SmartMesh IP motes. You need the driver of that chip on your computer. This is normally already installed, so you can probably skip this step. On older Windows computers, this driver isn't included by default.
Download and install the appropriate drivers for your system from https://ftdichip.com/drivers/vcp-drivers/
Serial Terminal
Make sure you have a serial terminal program (PuTTY, TeraTerm, etc) installed on your computer, and that you know how to use it to open/close a serial port.
Mac OS or Linux
f you are using MAC OS or Ubuntu, you don't have to install anything. You can use the built-in package called "screen".
Lab 01. Your First Network.
Make sure the LEDs are enabled on all motes
Plug the manager into your computer and switch on your motes
What is the sequence of LED activity of your motes
Step 1 (looking for the network)
Step 2 (heard the network, busy joining)
Step 3 (fully joined)
Lab 02. Navigating the Documentation
There is a LOT of documentation about SmartMesh IP, including user guides, hardware integration guides, case studies, reference API documentation, etc.
You can find all of it through:
the SmartMesh Pavilion
make sure to check out the SmartMesh Recipes
Navigate the websites above to answer the following questions:
Look for the “SmartMesh Brochure” on the Pavilion. How many motes can your Manager manage (we assume in this lab you are using an eManager - embedded manager)?
Take a look at the SmartMesh SDK's source code (https://github.com/dustcloud/smartmeshsdk ). In what programming language is it written?
Lab 03. Serial Port Madness
Find serial ports
Throughout these labs, you are connecting your SmartMesh IP devices to your computer. Your computer uses the FTDI drivers to communicate with the SmartMesh devices your connected over USB to you computer (most likely installed by default; if not, see Lab 00. Things to Install)
Connect a USB cable between your computer and your manager. Open your Device Manager (if you're on Windows) and write down the serial ports that have appeared.
Connect a second USB cable to your mote.
You should be able to write down the serial port numbers in the table below
| manager | mote |
---|---|---|
first serial port |
|
|
second serial port |
|
|
third serial port |
|
|
fourth serial port |
|
|
Software Version on your Manager
Open a serial terminal, connected to the CLI port of your SmartMesh IP manager.
type in the following commands:
login user show ver
What is the version of the firmware running on your SmartMesh IP manager?
Software Version on your Mote
Open a second serial terminal, connected to the CLI port of your SmartMesh IP mote. Switch on the mote, the welcome banner appears on PuTTY.
What is the version of the firmware running on your SmartMesh IP mote?
Lab 04. Network Identifier.
List the motes connected to your manager
Switch on your manager and all your motes
Wait for all motes to join.
On your manager, type the following commands:
> login user > sm
You can type
sm
(for “show motes”) multiple times, until all nodes are in the operational state, and no new motes are joining.What are the MAC addresses of your manager and motes?
Compare those MAC address to the label printed on your motes. What does the printed label represent?
Verify your manager’s Network Identifier
On your manager, type the follow command:
> login user > minfo
What is the network identifier of your manager (
netid
)?
Change your motes' Network Identifier
Ask your neighbor for the netid of his/her manager
Type the following command on your mote:
Power cycle your mote (switch it off and on)
Make sure you see your mote appear on the neighbor’s manager.
Revert your mote's netid to your manager's netid and power cycle your mote.
Lab 05. Common Join Key
You will configure your manger to accept all nodes using a common join key. Type:
The configured key differs from the key that is provisioned on the mote. We will attempt to join the network without the correct key.
Power cycle your mote (switch it off and on)
How many LEDs stay active on the mote?
What is the debug print that you obtain in the serial console of your mote?
What is the debug print that you obtain the serial console of your manager?
What does this debug print mean?
You will now configure the correct join key on your mote and verify that the mote is able to join the network advertised by your manager. In the serial console of your mote, type:
What is the debug print that you obtain in the serial console of your mote?
Lab 06. Access Control List
We will now attempt a more advanced security configuration of your network called “Access Control List”. ACL means that the manager keeps a table with motes that are allowed to join the network and their corresponding Join Keys.
On your manager, type
What do you get as the response?
By browsing the documentation, find the command needed to add one of your motes to the ACL on your manager. Which command did you use? Which key value have you used?
Power cycle the mote that you just added to the ACL of your manager. Verify that it is able to join the network.
Power cycle the mote that you did not add to the ACL of your manager. What debug output do you get in the serial console of your mote when this mote attempts to join the network?
What debug output do you get in the serial console of your manager?
Based on the output, can you explain what happens with the Join Request packet that is sent by the mote to the manager?
Now, add the second mote on your desk to the ACL of your manager. Verify that both motes have again joined the network advertised by your manager. Consider how much time it would take to configure like this 1000 motes on the deployment site. What is the solution we discussed in class that would speed up this process?
Lab 07. Changing Join Key from the Manager
In this lab, we will find out how to change the join key on the motes that are already part of the network from your manager. Make sure all motes on your desk are in the network advertised by your manager.
You should search the documentation for exchJoinKey
command.
Configure one of your motes from your manager with the following key.
When you type:
Does your manager’s ACL contain the changed key? Copy-paste the output of the command here:
Now, power cycle your mote. Is it able to join the network?