qemu模拟执行固件文件(解决 Invalid ELF image for this architecture 问题)
2016-12-16 18:38
5791 查看
kali下qemu的安装:
使用Docker容器进行操作 https://hub.docker.com/r/asmimproved/qemu-mips/
分析某路由器固件包:
一般固件解压后的文件系统有squashfs和cpio,进入相应的文件夹
老版本的qemu会存在,新版本一般都不存在,参考解决链接:
http://www.devttys0.com/2011/12/qemu-vs-sstrip/ 文件的打开方式不正确,使用了错误的程序执行了ELF文件
针对第2种的解决方法及常识:
apt-get install qemu
使用Docker容器进行操作 https://hub.docker.com/r/asmimproved/qemu-mips/
分析某路由器固件包:
binwalk -Me bcrm.bin # -M 递归解压看情况可加可不加 -e 自动化提取
一般固件解压后的文件系统有squashfs和cpio,进入相应的文件夹
root@kali:~/work/openwrt/_brcm/squashfs-root# qemu-mipsel -L . bin/ls bin/ls: Invalid ELF image for this architecture # qemu-mipsel qemu user模式模拟运行 -L . 设置库路径为当前目录一般报上面的这种错误目前我知道的会有两种情况
老版本的qemu会存在,新版本一般都不存在,参考解决链接:
http://www.devttys0.com/2011/12/qemu-vs-sstrip/ 文件的打开方式不正确,使用了错误的程序执行了ELF文件
针对第2种的解决方法及常识:
# 使用file识别当前文件的格式 # 识别为:ARM格式的ELF文件 root@kali:~/work/openwrt/_brcm/squashfs-root# file bin/busybox bin/busybox: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-uClibc.so.0, stripped # 识别为:MIPS格式的ELF文件 root@kali:~/work/openwrt/_openwrt-we800g-squashfs.bin.extracted/squashfs-root# file bin/busybox bin/busybox: ELF 32-bit LSB executable, MIPS, MIPS32 version 1, dynamically linked, interpreter /lib/ld-uClibc.so.0, corrupted section header size依据上面类型使用不同的qemu程式模拟即可
root@kali:~/work/openwrt/_brcm/squashfs-root# qemu-arm -L . bin/ls bin etc opt proc readonly sbin usr先写这些,后续遇到问题再补充,至于漏洞挖掘的慢慢来。
相关文章推荐
- Imagemagick中解决convert: no decode delegate for this image format 问题
- qemu模拟执行固件文件
- error: invalid deployment target '6.1.0' for architecture 'arm64' (requires '7.0.0' or later)问题的解决方法
- 解决no cpu/abi system image available for this target的问题
- Imagemagick中解决convert: no decode delegate for this image format 问题
- Imagemagick中解决convert: no decode delegate for this image format 问题
- fckeditor编辑器上传文件出现invalid Request问题解决!
- fckeditor编辑器上传文件出现invalid Request问题解决
- fckeditor编辑器上传文件出现invalid Request问题解决!
- JSP文件下载及出现getOutputStream() has already been called for this response的解决方法
- getOutputStream() has already been called for this response问题的解决
- 解决问题:vs 使用命令行参数调试时出现"当前项目设置指定将使用特定的安全权限对该项目进行调试.在此模式下,命令行参数将不会传递给可执行文件."
- Zend Studio For Eclipse 6.0.1 不能编辑smarty的tpl文件问题的解决
- JSP文件下载及出现getOutputStream() has already been called for this response的解决方法(转)
- 关于C#Image.FromFile文件不释放问题的解决
- 俺的gVim配置文件(解决了菜单栏,右键菜单和提示框中文乱码问题)(for windows,linux下应该也没问题)
- 解决this.disabled=true;不能执行服务器端代码的问题(点击后按钮变不可用状态)
- getOutputStream() has already been called for this response问题的解决
- 跟踪 session 的执行,分析跟踪日志文件,解决问题的好方法
- 动态加载JS文件,完美解决跨域、编码、嵌套、队列、兼容性、执行顺序等相关问题。