liyansong2018 / firmware-analysis-plus

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

登录命令行shell的问题 #30

Closed seanachao closed 2 years ago

seanachao commented 2 years ago

在使用d-link DIR-846W进行模拟的过程中,固件仿真运行后,命令行终端显示 rtkmips login:,使用root/password尝试登录,终端反馈login incorrect ,是否还有其他密码?

liyansong2018 commented 2 years ago

这个路由器没有实际测试过,如果你在网上没有查到相关密码,建议直接binwalk解压固件 方法一:打开 /etc/passwd 文件,删除密码,默认无密码,或者修改为自己的密码

# root:x:0:0:root:/root:/bin/bash
root::0:0:root:/root:/bin/bash

方法二:打开 /etc/shadow,使用 openssl 计算新密码,填充该文件

openssl passwd -1 -salt 'abcdefg' '123456'

重新将文件系统打包,或者就简单压缩一下,用 fap 重新模拟即可。

seanachao commented 2 years ago

两种方式都很可行,感谢师傅