liyansong2018 / firmware-analysis-plus

Simulate firmware with one click of firmadyne (使用 firmadyne 一键模拟固件)
MIT License
326 stars 32 forks source link

There was a problem installing firmware-analysis-Plus #37

Closed chang9807 closed 2 years ago

chang9807 commented 2 years ago

您好我使用Kali2022.01进行安装 我确保安装的步骤没有问题 但是 当我用binwalk "./fap.py -q ./2.5.0/ ./testcases/wnap320_V3.7.11.4_firmware.tar " 进行编译,错误结果为 : [+] Firmware: wnap320_V3.7.11.4_firmware.tar [+] Extracting the firmware... [!] Image extraction failed

当我使用重新打包的方法 错误记录为: +] Firmware: test.tar.gz [+] Extracting the firmware... [+] Cleaning previous images and created files by firmadyne [+] All done. Go ahead and run fap.py to continue firmware analysis [+] Image ID: 1 [+] Identifying architecture... Traceback (most recent call last): File "/home/kali/桌面/firmware-analysis-plus/./fap.py", line 185, in main() File "/home/kali/桌面/firmware-analysis-plus/./fap.py", line 178, in main arch = identify_arch(image_id) File "/home/kali/桌面/firmware-analysis-plus/./fap.py", line 95, in identify_arch child.expect_exact(":") File "/usr/lib/python3/dist-packages/pexpect/spawnbase.py", line 421, in expect_exact return exp.expect_loop(timeout) File "/usr/lib/python3/dist-packages/pexpect/expect.py", line 179, in expect_loop return self.eof(e) File "/usr/lib/python3/dist-packages/pexpect/expect.py", line 122, in eof raise exc pexpect.exceptions.EOF: End Of File (EOF). Exception style platform. <pexpect.pty_spawn.spawn object at 0x7f2fbea4dd00> command: /home/kali/桌面/firmware-analysis-plus/firmadyne/scripts/getArch.sh args: ['/home/kali/桌面/firmware-analysis-plus/firmadyne/scripts/getArch.sh', '/home/kali/桌面/firmware-analysis-plus/firmadyne/images/1.tar.gz'] buffer (last 100 chars): b'' before (last 100 chars): '' after: <class 'pexpect.exceptions.EOF'> match: None match_index: None exitstatus: None flag_eof: True pid: 45480 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_string: 0: b':'

我不太清楚是哪里有问题,您可以帮我看一下吗?

liyansong2018 commented 2 years ago

初步判断,是下载的固件无法直接使用 binwalk 解压,确认一下你下载的固件是否可以用 binwalk提取根文件系统。

liyansong2018 commented 2 years ago

kali 2022 自带的 binwalk 貌似还是有点问题,好像很多固件无法提取出文件系统。

liyansong2018 commented 2 years ago

鉴于Kali上的诸多bug,是时候考虑移植到Ubuntu以及docker了。

chang9807 commented 2 years ago

感谢您!

liyansong2018 commented 2 years ago

@chang9807 项目已更新,已经提供了一个临时的解决方案 https://github.com/liyansong2018/firmware-analysis-plus/commit/e4bb94cd30ba72d2b37acdf22e0227134163b76c Ubuntu16.04下,使用Fap的无binwalk模式。 后续会陆续支持binwalk的API。