First, we need to download the firmware from the vendor webpage. I downloaded the 2015 version:
Next, unzip the firmware file:
Using file command we can get some information from the firmware binary files:
file REMOTE_PACKAGE_2_30.binfile TS-S402_FW_2_00_13.bin
Or not 🤬
Let's using binwalk - our best friend 😎
We can observe a lot of LZMA data, however, we got an interesting gzip compressed file as well. From this point, we can use the -x option to ignore LZMA compression and extract only the gzip file. Something like this:
Accessing the _TS-S402-FW... folder, we can observe two files:
file 2020: POSIX tar archive (GNU)
Ok, 20 file is another compressed file. Let's renaming it and unarchiving it.
mv 20 20.tartar -xvf 20.tar
Yeah dude, it was a strong journey! 😎
mkdir sqshsudo mount rootfs.armeb.squashfs ./sqsh/ -t squash fs -o loop
If you got an error, don't worry about that!
If we look at the hexadecimal, we can see the file format:
cat rootfs.armeb.squashfs | xxd | less