My lecturers have requested that I debug binwalk
in order to understand how it works and develop new features so that it can extract more. I tried to use gdb
to debug binwalk
but it results in the error message "/usr/bin/binwalk": not in executable format: File format not recognized". What other tool can be used to debug it?
I tried to use
gdb
to debugbinwalk
but it results in the error message "/usr/bin/binwalk": not in executable format: File format not recognized".
In order for gdb
to interface with a binary executable, the binary must have one of the following object file formats:
- a.out
- COFF
- ECOFF
- XCOFF
- PE
- ELF
- SOM
The binary must also have intact section information, as gdb
relies on libbfd
. Since binwalk
is written in Python and interpreted by the Python interpreter instead of being compiled in to an executable binary that conforms to one of the aforementioned formats, gdb
cannot be used to dynamically analyze binwalk
.
My lecturers have requested that I debug binwalk in order to understand how it works and develop new features so that it can extract more.
If your primary goal is extending the functionality of binwalk
, then dynamically analyzing it may not be as productive as looking at
- the the source code
as well as documentation on
But if "debugging" binwalk
is the primary focus, then pdb or using a Python IDE will work.
Binwalk is written on Python language. Please try pdb. Python debugger.