attifyos
attifyos copied to clipboard
FAT not emulating firmware
Hi Adi,
I have a problem when emulating a firmware, i receive this error, i did reset.sh as advised in another post but problem still exist
sudo python fat.py
Welcome to the Firmware Analysis Toolkit - v0.1
Offensive IoT Exploitation Training - http://offensiveiotexploitation.com
By Attify - https://attify.com | @attifyme
Enter the name or absolute path of the firmware you want to analyse : /home/oit/Desktop/TE/HG8245HV300R018C00SPC108_common_all.bin Enter the brand of the firmware : huawei /home/oit/Desktop/TE/HG8245HV300R018C00SPC108_common_all.bin Now going to extract the firmware. Hold on.. /home/oit/tools/fat//sources/extractor/extractor.py -b huawei -sql 127.0.0.1 -np -nk "/home/oit/Desktop/TE/HG8245HV300R018C00SPC108_common_all.bin" images test The database ID is 1 Getting image type Password for user firmadyne: Found image type of armel Putting information to database Tar2DB Creating Image Executing command
sudo /home/oit/tools/fat//scripts/makeImage.sh 1 Password for user firmadyne: Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel with disk identifier 0xa5dd6c4f. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) Building a new DOS disklabel with disk identifier 0x5ceea72e. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) mke2fs 1.42.9 (4-Feb-2014) mknod: /dev/null: File exists mknod: /dev/zero: File exists mknod: /dev/tty: File exists mknod: /dev/console: File exists Please check the makeImage function Everything is done for the image id 1 Setting up the network connection Password for user firmadyne: qemu: terminating on signal 2 from pid 6589 Querying database for architecture... armel Running firmware 1: terminating after 60 secs... Inferring network... Interfaces: [] Done!
Running the firmware finally :
sudo: /home/oit/tools/fat//scratch/1/run.sh: command not found
Traceback (most recent call last):
File "fat.py", line 113, in
Also this is output of binwalk DECIMAL HEXADECIMAL DESCRIPTION
67019 0x105CB Squashfs filesystem, little endian, version 4.0, compression:xz, size: 5979560 bytes, 1259 inodes, blocksize: 1048576 bytes, created: 2017-08-08 04:10:50 6047179 0x5C45CB uImage header, header size: 64 bytes, header CRC: 0xD3292F09, created: 2017-08-08 04:10:13, image size: 1438876 bytes, Data Address: 0x81208000, Entry Point: 0x81208000, data CRC: 0xFC9BD3F6, OS: Linux, CPU: ARM, image type: OS Kernel Image, compression type: lzma, image name: "Linux-2.6.30" 6047243 0x5C460B LZMA compressed data, properties: 0x5D, dictionary size: 8388608 bytes, uncompressed size: 3857792 bytes