Binwalk is a firmware reverse engineering tool. In fact, scanning the target, allows you to examine and dissect the firmware. Binwalk can be installed and run on Linux, OSX, FreeBSD, Windows operating systems. If you want to use all the features of Binwalk, it is recommended that you install it on Linux. In this article, we are going to teach How to Install and Use Binwalk on Windows. You can visit the packages available in Eldernode to purchase a Windows VPS server.
Table of Contents
Tutorial Install and Use Binwalk on Windows step by step
Binwalk is a redirect program for passing arguments along with the Binwalk execution command. For example, if you enter “binwalk file.bin” as a command via cmd, this program will run it as “python Binwalk file.bin“. So it makes it easy to implement. In the next section, we will teach you how to install Binwalk on Windows. Stay with us.
Install Binwalk on Windows
To install Binwalk on Windows, you need to download and install Python in the first step. The next step is to install the python-lzma module. After successfully completing the above steps, you should now download the Binwalk zip from the Binwalk repo on GitHub.
Then you need to extract the downloaded file and open it. Now open CMD.
Enter the following command in the CMD environment. By executing this command, Binwalk will be installed.
python setup.py install
In the next step, you need to download binwalk.py script. Note that this file will be placed in a separate folder on the desktop.
It should note that you must open CMD in the above folder. Then enter the following command. By entering the following command in CMD, pyinstaller is installed.
pip install pyinstaller
To create an executable (.exe) from binwalk.py you must enter the following command:
pyinstaller --onefile binwalk.py
You can find the executable file by going to the current folder. Then you need to copy it to “C:\Windows\System32“.
After you have successfully completed the previous steps, you can now remove the folder you created on the desktop.
How to Use Binwalk on Windows
In this section, we are going to show you an example of how to use the Binwalk tool. If you follow the steps below, you will be fully acquainted with how to use Binwalk. As you can see in the image below, we have an image file called brain.jpg.
To analyze this image with Binwalk, you must use the following command:
binwalk brain.jpg
By executing the above command, you will see the following output:
As you can see, this is not an ordinary image. This image contains a ZIP archive that has a file called flag.txt. You can extract the following files from the image using the following command:
binwalk -e brain.jpg
It should be noted that Binwalk extracts the content of the image and puts it in a folder called _brain.jpg.extracted.
Conclusion
Binwalk is fast analytics and reverses engineering tool for extracting firmware images. In this article, we tried to introduce you to How to Install and Use Binwalk on Windows. It should be noted that if you want to install Binwalk in Ubuntu and Kali Linux distributions, you can refer to our articles.
I get a syntax error on the last installation step. Please help.
Syntax error in C:\Users\System Owner\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\Scripts\binwalk.py
File “C:\Users\System Owner\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\Scripts\binwalk.py”, line 73
winbinwalk/binwalk.py at master · jowinjohnchemban/winbinwalk · GitHub
^
SyntaxError: invalid character ‘·’ (U+00B7)
1. Install Python 2.7 for Windows
2. Install python-lzma module
3. Download binwalk zip from binwalk repo at GitHub
4. Extract and Open the directory and Open cmd there.
5. Enter “python setup.py install”.
6. Download the binwalk.py script and keep it in a isolated folder at Desktop.
7. Open cmd in the above folder and enter “pip install pyinstaller”, pyinstaller get installed.
8. Enter “pyinstaller –onefile binwalk.py”
9. Navigate to dist folder inside current folder where you can find the executable file, Copy it to “C:\Windows\System32”
10. Remove the previously created folder at Desktop.
11. Open cmd from the directory with the file to decrypt and run it as usual.