Lab 2 - Internet of Things

Mini-Lecture

Hardware:

Software:

Why are these devices so insecure?

Control:

Stages:

Does it matter? Now more common in commercial environments and infrastructure: water, electricity, traffic (SCADA).

Addressing vulnerabilities:

Thermostat (TCP)

Sniffing

WPA2-PSK uses per-client and per-session keys, so in order to sniff traffic, it is necessary to capture the 4-way handshake even if you know the passphrase.

Following instructions from the previous lab, kill the DHCP server, determine the AP channel, and enable monitoring mode. Then:

At this point, the victim should be able to see all HTTP traffic from the victim.

MITM

MITM attack. Phone and thermostat on two different networks, with the attacker acting as a proxy between the two.

In this experiment, two subnets were used:

IP aliasing:

ifconfig eth0 192.168.0.254/24

is this equivalent to ifconfig eth0 192.168.0.254 netmask 255.255.255.0?

ifconfig eth1 192.168.1.254/24

- Limitation of aliasing:

> As there is only a single physical interface on the system (eth0) and four virtuals/aliases (eth0:0 through eth0:2) on the same subnet, outbound traffic will use the eth0 IP address as the source unless the application is smart enough to declare an outbound interface.
https://serverfault.com/a/12305

iptables setup:

-A PREROUTING -S 192.168.1.0/24 -p tcp -m multiport --dports 80,443 -j REDIRECT --to-ports 8080

redirect HTTP/HTTPS traffic from the 192.168.1.x subnet to port 8080?


Enable Linux's IP forwarding feature:

```bash
echo 1 > /proc/sys/net/ipv4/ip_forward

Finally, modifying packets: mitmproxy -T --host (-T for transparent proxy), and then mitm -T --host --script script_name.py

Smart Light (UDP)

Ethernet, multiple interface.

Cannot intercept and modify; sends another packet immediately after instead.

IP Webcam

Camera streaming to FTP server through AP, capture packets.

Hardware:

Steps:

In Wireshark:

Capture will likely not be perfect - the attacker can’t exactly ask for a retransmission

Bluetooth Doorlock

Hardware:

The door lock needs to be usable by multiple devices, so the first user sets up a pin (or uses the default) that they can share with others. Although BTLE is encrypted, the encryption can be cracked if the pairing process is captured. Within the encrypted packets, the PIN is sent from the phone to the lock in plaintext when the lock is first set up, allowing an attacker that breaks BTLE encryption to get the pin and unlock the lock with their own device.

Make a pipe through which BTLE packets will be piped through: mkfifo /tmp/pipe

Set up Wireshark:

Then:

https://security.stackexchange.com/questions/100443/security-of-bluetooth-low-energy-ble-link-layer-encryption

Active attack to force 1 byte entropy then brute force https://knobattack.com