Lab Setup - iOT - Security Assessment Flow | Educational Purpose
iOT Security Assessment
Step 1: Install on your linux machine:
Tools Pre-requisite:
1. hexdump
hexdump is a Unix command-line tool that displays the raw byte content of a file in hexadecimal (hex) and sometimes ASCII format. It’s commonly used for analyzing binary files, firmware, memory dumps, or even debugging data structures.
2. binwalk + squashfs
Binwalk is a powerful forensic and reverse engineering tool used primarily for analyzing and extracting firmware images. It's widely used in embedded device security testing, firmware analysis, and reverse engineering.
3. firmadyne
1. hexdump
hexdump is a Unix command-line tool that displays the raw byte content of a file in hexadecimal (hex) and sometimes ASCII format. It’s commonly used for analyzing binary files, firmware, memory dumps, or even debugging data structures.
2. binwalk + squashfs
Binwalk is a powerful forensic and reverse engineering tool used primarily for analyzing and extracting firmware images. It's widely used in embedded device security testing, firmware analysis, and reverse engineering.
3. firmadyne
Firmadyne is an automated firmware emulation and dynamic analysis framework designed to help security researchers emulate, instrument, and analyze Linux-based firmware images, especially for embedded devices like routers, IP cameras, and smart home devices.
Step 2: Get the device and extract the firmware file.
Let's assume we have a Netgear IOT device model number is WNAP 320, extracted firmware.bin file to perform security assessment.
Static Analysis:
Tools used: Hexdump & BinWalk
Step 3: Identify the firmware format binaries before start perform testing.
Tool used hexdump:
Step 4: To confirm that the firmware is built by the SquashFS file system, used by the binwalk tool.
Dynamic Analysis:
Tools Used: Firmadyne:
Commands:
nano firmadyne.config > Modify User Access Name
sudo python3 sources/extractor/extractor.py -b Netgear -sql 127.0.0.1 -np -nk "WNAP320 Firmware Version 2.0.3.zip" images
sudo bash scripts/getArch.sh images/1.tar.gz
sudo python3 sources/extractor/extractor.py -b Netgear -sql 127.0.0.1 -np -nk "WNAP320 Firmware Version 2.0.3.zip" images
Command Parts Breakdown:
Part | Explanation |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Part | Meaning |
---|---|
|
|
|
|
|
|
|
|
sudo python3 scripts/tar2db.py -i 1 -f images/1.tar.gz
Part | Meaning |
---|---|
|
|
|
|
|
|
|
|
|
|
sudo bash scripts/makeImage.sh 1
Part | Meaning |
---|---|
|
|
|
|
|
|
|
|
Part | Description |
---|---|
|
|
|
|
|
|
|
|
Part | Description |
---|---|
|
|
|
|
|
|
Comments
Post a Comment