IOT
Enumeration
To scan all open ports and services running on them
To enumerate directories and files on the web server.
To enumerate SNMP service.
http
Use curl to send HTTP requests:
Use wget to download files:
Use Nikto for web server scanning:
MQTT
Use Mosquitto to publish and subscribe to topics:
Use MQTTInspector to capture and analyze MQTT traffic:
CoAP
Use CoAPthon3 for sending CoAP requests:
Use Wireshark to capture and analyze CoAP traffic:
Zigbee
Use KillerBee to sniff and inject Zigbee traffic:
Use Wireshark to capture and analyze Zigbee traffic:
Bluetooth Low Energy (BLE)
Use BlueZ to scan and connect to BLE devices:
Use GATTacker to fuzz BLE services:
Use Wireshark to capture and analyze BLE traffic:
Weak Guessable, or Hardcoded Passwords
or
Insecure Network Services
Insecure Ecosystem Interfaces
This command instructs Bettercap to start intercepting traffic between two devices with IP addresses 192.168.0.10 and 192.168.0.20, and to perform a TCP proxy for HTTP and HTTPS traffic. The -X option enables SSL stripping, which downgrades HTTPS connections to HTTP, making the traffic vulnerable to interception and manipulation.
Lack of Secure Update Mechanism
Exploiting Unauthenticated Firmware Updates:
Man-in-the-Middle Attack:
Fuzzing the Update Mechanism:
Use of Insecure or Outdated Components
This command uses the “http_jboss_jmx_invoke” module in Metasploit to scan for a vulnerable JBoss server running on port 8080 of the target device. If the vulnerability is found, the “java/jsp_shell_reverse_tcp” payload is used to establish a reverse shell connection back to the attacker’s machine.
Insufficient Privacy Protection
This command captures all network traffic on the device’s wireless interface (wlan0) and saves it to a file called capture.pcap. The attacker can then use Wireshark or another network analysis tool to examine the captured traffic for sensitive information, such as login credentials or personal data.
or
This command launches BetterCAP on the device’s wireless interface (wlan0) and enables the proxy module, which allows the attacker to intercept and modify network traffic in real-time. The attacker can then use this to capture sensitive information or inject malicious payloads into the network traffic.
Insecure Data Transfer and Storage
In this command, mitmproxy is a popular tool for performing MITM attacks. The –host option tells mitmproxy to intercept traffic to and from the target device, and the -R option specifies the URL of the device’s API endpoint. The –ssl-insecure option disables SSL certificate verification, allowing the attacker to intercept encrypted traffic.
The -s option specifies a custom script, extract_sensitive_data.py, that extracts sensitive data from intercepted traffic. This script could use regular expressions or other techniques to search for and extract sensitive data from intercepted requests and responses.
Insecure Default Settings
Firmware Analysis
If the binary may be encrypted, check the entropy using binwalk with the following command:
Use the following tools and methods to extract filesystem contents:
Firmware Analysis Comparison Toolkit (FACT )
EmbedOS - Embedded security testing operating system based on Ubuntu 18.04 preloaded with firmware security testing tools. The virtual machine can be downloaded and imported as an OVF file into VirtualBox or VMWare. https://github.com/scriptingxss/EmbedOS
EMBA - Embedded Analyzer
firmware analysis toolkit
UART Exploitation
UART is often used for debugging and maintenance purposes on IoT devices, but it can also be used to gain access to the device and execute malicious code.
Methods:
1.Identify UART pins on the device 2.Connect to UART using a USB-to-UART adapter 3.Identify the baud rate and data format 4.Access the device console and execute commands 5.Use reverse engineering techniques to analyze firmware and identify vulnerabilities
JTAG Exploitation
JTAG is a hardware interface used for testing and debugging integrated circuits. It can also be used to gain access to the firmware and execute malicious code.
Methods:
1.Identify JTAG pins on the device 2.Connect to JTAG using a JTAG adapter and OpenOCD software 3.Identify the JTAG chain and select the target device 4.Read and write memory, execute code, and debug firmware using gdb
SWD Exploitation:
SWD is a newer, smaller and faster version of JTAG that is often used in ARM-based IoT devices. It can also be used to gain access to the firmware and execute malicious code.
Methods:
1.Identify SWD pins on the device 2.Connect to SWD using a SWD adapter and OpenOCD software 3.Identify the SWD chain and select the target device 4.Read and write memory, execute code, and debug firmware using gdb
SPI (Serial Peripheral Interface)
1.Determine the SPI configuration (clock, polarity, phase) of the target device using a logic analyzer or oscilloscope.
2.Use a bus pirate or similar tool to sniff SPI traffic between the target device and other devices on the bus.
3.Use a tool like spi-tools or spidev to interact with the SPI bus and send custom commands to the target device.
4.Look for unauthenticated or easily guessable commands that can be sent over the SPI bus to modify device behavior or extract sensitive information.
5.Use fault injection attacks (such as glitching or power analysis) to induce errors in the target device and extract secrets.
I2C (Inter-Integrated Circuit)
1.Determine the I2C address of the target device using a logic analyzer or oscilloscope. Use a tool like i2cdetect or i2c-tools to interact with the I2C bus and send custom commands to the target device.
2.Look for unauthenticated or easily guessable commands that can be sent over the I2C bus to modify device behavior or extract sensitive information.
3.Use a tool like Bus Pirate or Shikra to sniff I2C traffic between the target device and other devices on the bus.
4.Use a software-defined radio (SDR) to perform electromagnetic (EM) side-channel attacks and extract secrets.
Medium Range Radio
Sniffing: Use a software-defined radio (SDR) to capture and analyze radio signals. Popular tools for this include GNU Radio, URH, and Inspectrum.
Jamming: Jamming is a denial-of-service attack that sends a high-power signal to interfere with the target device’s radio signal. The most common tool for jamming is the HackRF One.
Replay attack: This involves capturing a valid signal and replaying it later to mimic a legitimate device.
Packet injection: This involves injecting packets into the radio signal to execute an attack. For this, tools like KillerBee and Scapy can be used.
Directional antenna: A directional antenna can be used to target a specific device or area, making it easier to intercept or jam the signal.
Frequency hopping: Some IoT devices use frequency hopping to avoid interference. However, this can be exploited by capturing and analyzing the hopping patterns to predict where the device will be next.
LPWAN (Low Power Wide Area Network)
Sniffing and Decoding: Sniffing and decoding the LPWAN communication using software-defined radios (SDRs) and tools such as:
Universal Radio Hacker (URH)
HackRF One
RTL-SDR
To start sniffing with HackRF One:
To decode captured signals with URH:
Replay Attacks: Record and replay the captured packets to trigger events on the IoT device or network.
To transmit the recorded signals with HackRF One:
To inject signals into the network with URH:
Jamming Attacks: Generate noise on the LPWAN frequency to disrupt the communication between the IoT device and network.
To transmit noise with HackRF One:
To generate random signals with URH:
Interference Attacks: Generate signals on nearby frequencies to cause interference and affect the quality of the LPWAN communication.
To transmit signals on a nearby frequency with HackRF One:
To generate signals on multiple frequencies with URH:
Last updated