Comments (9)
Hi
I had the same error as yours and my directory structure was like yours. But after I tried following steps, it seems to work well now:
- move /firmadyne into /firmware-analysis-toolkit
- navigate to the Firmadyne folder and execute "sudo ./download.sh" (seems like I missed this step when setting up Firmadyne)
- move fat.py and reset.py into Firmadyne folder
- modify the firmadyne_path (in fat.py) and FIRMWARE_DIR (in firmadyne.config) to the current path of Firmadyne.
from firmware-analysis-toolkit.
Copied fat.py and reset.py to /fat/firmadyne folder and issuing the command from there.
cd /fat/firmadyne
python fat.py latlon.bin
The previous error has gone away but another pops up.
[?] Enter the name or absolute path of the firmware you want to analyse : latlon.bin
[?] Enter the brand of the firmware : qa
[+] Now going to extract the firmware. Hold on..
[+] Firmware : latlon.bin
[+] Brand : qa
[+] Database image ID : 2
[+] Identifying architecture
[+] Architecture : ./images/2.tar.gz: Cannot open: No such file or directory
Traceback (most recent call last):
File "fat.py", line 122, in <module>
main()
File "fat.py", line 114, in main
arch = identify_arch(image_id)
File "fat.py", line 62, in identify_arch
child.expect("Password for user firmadyne: ")
File "/usr/local/lib/python2.7/dist-packages/pexpect/spawnbase.py", line 341, in expect
timeout, searchwindowsize, async_)
File "/usr/local/lib/python2.7/dist-packages/pexpect/spawnbase.py", line 369, in expect_list
return exp.expect_loop(timeout)
File "/usr/local/lib/python2.7/dist-packages/pexpect/expect.py", line 117, in expect_loop
return self.eof(e)
File "/usr/local/lib/python2.7/dist-packages/pexpect/expect.py", line 63, in eof
raise EOF(msg)
pexpect.exceptions.EOF: End Of File (EOF). Exception style platform.
<pexpect.pty_spawn.spawn object at 0x7f875b7da650>
command: /fat/firmadyne/scripts/getArch.sh
args: ['/fat/firmadyne/scripts/getArch.sh', './images/2.tar.gz']
buffer (last 100 chars): ''
before (last 100 chars): 'mages/2.tar.gz: Cannot open: No such file or directory\r\ntar: Error is not recoverable: exiting now\r\n'
after: <class 'pexpect.exceptions.EOF'>
match: None
match_index: None
exitstatus: None
flag_eof: True
pid: 328
child_fd: 5
closed: False
timeout: 30
delimiter: <class 'pexpect.exceptions.EOF'>
logfile: None
logfile_read: None
logfile_send: None
maxread: 2000
ignorecase: False
searchwindowsize: None
delaybeforesend: 0.05
delayafterclose: 0.1
delayafterterminate: 0.1
searcher: searcher_re:
0: re.compile('Password for user firmadyne: ')
I guess it is the issue with firmadyne password !
from firmware-analysis-toolkit.
You have to edit fat.py
and reset.py
and provide the correct root password if not already done so.
firmware-analysis-toolkit/fat.py
Lines 13 to 14 in fa5d8f4
from firmware-analysis-toolkit.
Hi
Thanks for the reply !
I have the firmadyne user in the postgresql database with the password 'firmadyne'
I have also executed the following query to make sure the user 'firmadyne' exists in the database.
postgres=# sudo -u postgres createuser firmadyne
postgres=# alter user firmadyne with encrypted password 'firmadyne'
postgres=# grant all privileges on database firmadyne to firmadyne
postgres-# \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+-----------+----------+---------+---------+-----------------------
firmadyne | firmadyne | UTF8 | C.UTF-8 | C.UTF-8 |
firmware | firmadyne | UTF8 | C.UTF-8 | C.UTF-8 |
But the error still persists.
from firmware-analysis-toolkit.
Hi, looks like you're missing a step somewhere.
You can refer to this blog post on how to setup FAT https://blog.attify.com/getting-started-with-firmware-emulation/
from firmware-analysis-toolkit.
Hi
I was testing with a wrong bin file from https://www.ncl.ucar.edu/Applications/Data/ and when i changed the binary file from http://files.dlink.com.au/products/DIR-850L/REV_B/Firmware/Firmware_v2.20b03/ the FAT works producing outputs but at the end the kernel got panic and system needs a restart.
[ 1.872000] No filesystem could mount root, tried: ext3 ext2 ext4 cramfs squashfs vfat iso9660 romfs udf
[ 1.880000] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,1)
root_pass is defined in fat.py
Out.txt
from firmware-analysis-toolkit.
Hi, just checked on the DIR850LB1_FW210WWb03.bin
file. Its working well.
$ ./fat.py DIR850LB1_FW210WWb03.bin
__ _
/ _| | |
| |_ __ _ | |_
| _| / _` | | __|
| | | (_| | | |_
|_| \__,_| \__|
Welcome to the Firmware Analysis Toolkit - v0.2
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 : DIR850LB1_FW210WWb03.bin
[?] Enter the brand of the firmware : dlink
[+] Now going to extract the firmware. Hold on..
[+] Firmware : DIR850LB1_FW210WWb03.bin
[+] Brand : dlink
[+] Database image ID : 2
[+] Identifying architecture
[+] Architecture : mipseb
[+] Storing filesystem in database
[+] Building QEMU disk image
[+] Setting up the network connection, please standby
[+] Network interfaces : [('br0', '192.168.0.1'), ('br1', '192.168.7.1')]
[+] Running the firmware finally
[+] command line : sudo /home/ec/tools/firmadyne/scratch/2/run.sh
[*] Press ENTER to run the firmware...
The web server is reachable as well.
from firmware-analysis-toolkit.
Hi
I am running FAT inside docker. Want to know if the No filesystem could mount root
as mentioned in my last post is okay. Also i don't see any network interfaces as well during initialization.
[?] Enter the name or absolute path of the firmware you want to analyse : DIR850LB1_FW210WWb03.bin
[?] Enter the brand of the firmware : dlink
[+] Now going to extract the firmware. Hold on..
[+] Firmware : DIR850LB1_FW210WWb03.bin
[+] Brand : dlink
[+] Database image ID : 2
[+] Identifying architecture
[+] Architecture : mipseb
[+] Storing filesystem in database
[+] Building QEMU disk image
[+] Setting up the network connection, please standby
**[+] Network interfaces : []**
[+] Running the firmware finally
[+] command line : sudo /fat/firmware-analysis-toolkit/firmadyne//scratch/2/run.sh
[*] Press ENTER to run the firmware...
The base image of FAT is based on Ubuntu 16.04
from firmware-analysis-toolkit.
No, it shouldn't happen. Same for the network interface.
I've tested the image on Ubuntu 18.04. Sometimes using a different version of qemu does magically makes such issue disappear. Firmware emulation is quite an experimental thing and you are bound to run into such problems every now and then.
from firmware-analysis-toolkit.
Related Issues (20)
- The browser page appears blank HOT 2
- Location of dependency file has changed breaking setup script. HOT 1
- setup.sh fails on fresh kali install due to lsb-core package missing on OS HOT 4
- Can't install FAT HOT 2
- no route to host HOT 2
- setup.sh: Consider not patching firmadyne to change interpreter which is standard already HOT 2
- Upstream - Firmadyne: 'warning: fgrep is obsolescent; using grep -F' HOT 2
- Given No IP HOT 4
- WARNING: Could not open /proc/net/vlan/config. Maybe you need to load the 8021q module, or maybe you are not using PROCFS?? HOT 6
- [ 210.320000] firmadyne: ioctl: 0x4 HOT 2
- Mounting var to jffs2. [FAILED] HOT 1
- fat.py and permission error HOT 4
- Error while extracting RAX30 firmware HOT 12
- EXT2-fs error (device sda1) HOT 2
- did not get past idenitifying architecture
- error while boot with a new kernel file
- ./setup.sh failed to execute HOT 2
- /etc/rc.common: eval: 1: cannot create /proc/sys/kernel/hostname: Directory nonexistent
- [help wanted] Cant ping from the Emulated to client HOT 3
- No IP show while emulating Tp-Link Archer AX50 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from firmware-analysis-toolkit.