Zrovna jsem cetl nadherny navod na FW analyzu IoT zarizeni apod.:
http://resources.infosecinstitute.com/firmware-analysis-for-iot-devices/Ve zkratce pomoci 'binwalk' si najdes filesystem (squashfs):
# binwalk XW.v5.6.5.29033.160515.2108.bin
DECIMAL HEXADECIMAL DESCRIPTION
--------------------------------------------------------------------------------
0 0x0 Ubiquiti firmware header, header size: 264 bytes, ~CRC32: 0x8EF801B1, version: "XW.ar934x.v5.6.5.29033.160515.2108"
268 0x10C Ubiquiti partition header, header size: 56 bytes, name: "u-boot", base address: 0x9F000000, data size: 228524 bytes
151956 0x25194 U-Boot version string, "U-Boot 1.1.4-s958 (Jun 10 2015 - 10:56:20)"
228856 0x37DF8 Ubiquiti partition header, header size: 56 bytes, name: "kernel", base address: 0x9F050000, data size: 955903 bytes
228912 0x37E30 uImage header, header size: 64 bytes, header CRC: 0x6BBB011A, created: Sun May 15 20:09:39 2016, image size: 955839 bytes, Data Address: 0x80002000, Entry Point: 0x80002000, data CRC: 0x4958DD23, OS: Linux, CPU: MIPS, image type: OS Kernel Image, compression type: lzma, image name: "MIPS Ubiquiti Linux-2.6.32.68"
228976 0x37E70 LZMA compressed data, properties: 0x5D, dictionary size: 8388608 bytes, uncompressed size: 2799616 bytes
1184823 0x121437 Ubiquiti partition header, header size: 56 bytes, name: "rootfs", base address: 0x9F150000, data size: 6029312 bytes
1184879 0x12146F Squashfs filesystem, little endian, version 4.0, compression:lzma, size: 5893816 bytes, 1190 inodes, blocksize: 131072 bytes, created: Sun May 15 20:09:41 2016
7214255 0x6E14AF gzip compressed data, from Unix, last modified: Sun May 15 20:08:24 2016
7241849 0x6E8079 Ubiquiti end header, header size: 12 bytes, cumulative ~CRC32: 0x6E29FA94
Vykopirujes si dany filesystem do souboru:
# dd if=XW.v5.6.5.29033.160515.2108.bin of=ubnt.squashfs bs=1 skip=1184879 count=5893816
A pak uz ho jen staci extrahovat (jako root kvuli zachovani opravneni a blokovych souboru):
# unsquashfs ubnt.squashfs
Pokud by ti nefungoval systemovy 'unsquashfs', pak pouzi 'sasquatch':
https://github.com/devttys0/sasquatchDokupy to das zase obracenym postupem. Vysvetlovat presne jak to mas udelat by bylo delsi nez to udelat, tak zkratka pripojis to co bylo pred squashfs a to co bylo po squashfs. Problem muze byt, ze se ti to nepodari zpet dostat do stejneho formatu, nebo ze se nektere casti v tom FW posunou a muzes si tim bricknout cele UBNT.
UBNT nepouzivam, takze jestli neznas postup na unbrick, tak bych se do toho nepoustel!