Windows 10 推出的WSL 功能可以協助我們直接使用binwalk 分析Windows 內的文件
文章更新時間:2020年3月11日
一、WSL 准備
1、打開控制面板→程序和功能→啟動或關閉Windows 功能,打開“適用於Linux 的Windows 子系統”,隨后需要重啟
2、打開Windows 10 自帶的應用商店(Microsoft Store),搜索Linux,找到自己喜歡的Linux 發行版,安裝
3、以Ubuntu 為例,安裝成功后,在開始菜單內找到Ubuntu 並打開
4、稍等片刻后,提示輸入Unix 用戶名,輸入用戶名,按回車鍵
5、提示輸入Unix 密碼,輸入合適的密碼,按回車鍵
在輸入密碼的過程中,密碼不會顯示在屏幕上
6、再次輸入一遍密碼確認無誤,按回車鍵
二、Linux 換源
1、備份現有的源
sudo mv /etc/apt/sources.list /etc/apt/sources.listbackup sudo rm /etc/apt/sources.list sudo touch /etc/apt/sources.list
操作時需要輸入一次剛才設置的Unix 密碼
2、更換國內源
以清華大學TUNA為例:打開https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/ 復制灰色文本框內的內容
# 默認注釋了源碼鏡像以提高 apt update 速度,如有需要可自行取消注釋
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
# 預發布軟件源,不建議啟用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
回到WSL窗口,輸入命令:
使用記事本將剛才復制的清華大學源粘貼到sources.list 內,保存
回到WSL窗口,輸入命令:
sudo apt update
等待操作完成。
三、安裝binwalk
輸入命令:
sudo apt install binwalk
等待操作完成
四、使用binwalk
在Windows 內打開任意一個文件夾,其中包含我們需要使用binwalk分析的文件(例如 test.jpg),按下Shift鍵,同時右擊鼠標,在右鍵菜單中選擇“在此處打開Linux Shell”
輸入命令:
binwalk test.jpg