How to Use binwalk (BSWJ)

In this “How to Use binwalk (BSWJ)” course, cybersecurity expert Joe Perry takes you on another “Breaking Stuff with Joe” (BSWJ) adventure by showing you how to use the analysis tool binwalk to find executable code and embedded files inside binary files. Such images can be used to crack IoT devices.
0
4
M
Time
intermediate
difficulty
0
ceu/cpe

Course Content

Course Description

Why use Binwalk?

Welcome to Breaking Stuff with Joe, where we explore some of the most crucial cybersecurity tools available for use in Kali Linux. In this section, we will be discussing binwalk, an analysis tool for finding executable code and embedded files inside binary files. More specifically, it is often used to find and extract firmware images from binary files. These images can be used to crack IoT devices or any device that relies on code that is embedded into hardware.

*Cybrary has a lot more to offer than this Binwalk tutorial. Signup for a free account to learn other things, like this!*

Where does Binwalk come from?

Binwalk was developed as an open source program for extracting embedded files out of firmware images. The program was developed by Craig Heffner, a Principal Reserve Engineer for ReFirm Labs. ReFirm Labs is a cybersecurity company that specializes in preventing firmware hacks, discovering firmware exploits, and providing open-source software for firmware hacking.

How to use Binwalk?

In order to properly utilize binwalk, we must first understand what firmware is. In short, firmware is software that is designed for hardware. As the name implies, it is something between hardware and software. Firmware is physically contained within the device’s hardware, and it is designed to be updated by online networks or physical media. For example, a DSLR camera contains firmware within its physical chips (hardware) for taking photos, storing them, rendering menus, interpreting physical button inputs, and navigating stored memory. In order to maintain compatibility with photo software on host computers, firmware updates can be provided over the internet and USB connections.

Installing binwalk is a non-issue; it comes pre-built within installations of Kali Linux. As per usual, consulting the manual page of the program will provide additional info on its function and optional flags. This is done using the manual command as such:

man binwalk

Alternatively, we can use the help option flag to discover more information:

binwalk –h

These flags in particular will be useful when extracting embedded files from binary files:

-B: this flag searches for common file signatures in the firmware image -e: this flag extracts all embedded files in the firmware image -S: this flag searches for a text string within the firmware image -M: this flag recursively scans the files within extracted files

Once understood, this tool is relatively simple and straightforward. In order to understand the function of binwalk, let’s take a look an example extraction of a firmware binary: Say you want to analyze or reverse engineer a firmware update file for a car’s GPS navigation system. Assume the firmware file name is “GPSNavSystem1123.bin”. We want to identify common file signatures in the firmware image, or addresses within the code that indicate well-known use-cases. In this scenario, our console command would look like this:

binwalk –B GPSNavSystem1123.bin

Once executed, the command will return a table of decimal addresses in the code along with their hexadecimal counterpart. Next to the addresses will be a short description of the code’s function. Hackers can then use these addresses to identify and tinker with the program’s code. For example, a hex editor can be used to remove essential lines of code and cause the firmware update to render the device unusable.

Teaching Assistant George Mcpherson and Vikramajeet Khatri

(Disclaimer: Breaking Stuff with Joe is a Cybrary series that will be running indefinitely. You will not earn CEU/CPE hours by watching any individual 'Breaking Stuff with Joe' episode. However, you can still earn a certificate of completion for each episode completed.)

This course is part of a Career Path:
No items found.

Instructed by

Instructor
Joe Perry

I’m a graduate of the Joint Cyber Analysis Course, the Advanced Cyber Training Program, and the Computer Network Operations Development Program. I’ve offered consultation to organizations of sizes from 10 employees to tens of thousands of employees, and I’ve contributed to dozens of security curricula and training programs.

In my rare free time, I write tabletop and live action games, and manage events and gaming conventions. In the even more rare downtime between those events, I enjoy reading and rowing. In 2019 I’m working on a personal project to read 100 new books by the end of the year.

Provider
Cybrary Logo
Certification Body
Certificate of Completion

Complete this entire course to earn a How to Use binwalk (BSWJ) Certificate of Completion

Course
This is some text inside of a div block.

How to Use binwalk (BSWJ)

Course

In this “How to Use binwalk (BSWJ)” course, cybersecurity expert Joe Perry takes you on another “Breaking Stuff with Joe” (BSWJ) adventure by showing you how to use the analysis tool binwalk to find executable code and embedded files inside binary files. Such images can be used to crack IoT devices.
Path Releasing Q2 2025
Full access included with 
Insider Pro
 and 
Teams

0

H

4

M
Time

intermediate

i
This is some text inside of a div block.
Experience Level

0

i

This is some text inside of a div block.
CEU's

1

Enrollees

Heading

H

Heading

M
Time

Heading

i
This is some text inside of a div block.
Experience Level

Heading

i

This is some text inside of a div block.
CEU's

Heading

Enrollees

Learners at 96% of Fortune 1000 companies trust Cybrary

About this course

In this “How to Use binwalk (BSWJ)” course, cybersecurity expert Joe Perry takes you on another “Breaking Stuff with Joe” (BSWJ) adventure by showing you how to use the analysis tool binwalk to find executable code and embedded files inside binary files. Such images can be used to crack IoT devices.
Read More

Course Description

Why use Binwalk?

Welcome to Breaking Stuff with Joe, where we explore some of the most crucial cybersecurity tools available for use in Kali Linux. In this section, we will be discussing binwalk, an analysis tool for finding executable code and embedded files inside binary files. More specifically, it is often used to find and extract firmware images from binary files. These images can be used to crack IoT devices or any device that relies on code that is embedded into hardware.

*Cybrary has a lot more to offer than this Binwalk tutorial. Signup for a free account to learn other things, like this!*

Where does Binwalk come from?

Binwalk was developed as an open source program for extracting embedded files out of firmware images. The program was developed by Craig Heffner, a Principal Reserve Engineer for ReFirm Labs. ReFirm Labs is a cybersecurity company that specializes in preventing firmware hacks, discovering firmware exploits, and providing open-source software for firmware hacking.

How to use Binwalk?

In order to properly utilize binwalk, we must first understand what firmware is. In short, firmware is software that is designed for hardware. As the name implies, it is something between hardware and software. Firmware is physically contained within the device’s hardware, and it is designed to be updated by online networks or physical media. For example, a DSLR camera contains firmware within its physical chips (hardware) for taking photos, storing them, rendering menus, interpreting physical button inputs, and navigating stored memory. In order to maintain compatibility with photo software on host computers, firmware updates can be provided over the internet and USB connections.

Installing binwalk is a non-issue; it comes pre-built within installations of Kali Linux. As per usual, consulting the manual page of the program will provide additional info on its function and optional flags. This is done using the manual command as such:

man binwalk

Alternatively, we can use the help option flag to discover more information:

binwalk –h

These flags in particular will be useful when extracting embedded files from binary files:

-B: this flag searches for common file signatures in the firmware image -e: this flag extracts all embedded files in the firmware image -S: this flag searches for a text string within the firmware image -M: this flag recursively scans the files within extracted files

Once understood, this tool is relatively simple and straightforward. In order to understand the function of binwalk, let’s take a look an example extraction of a firmware binary: Say you want to analyze or reverse engineer a firmware update file for a car’s GPS navigation system. Assume the firmware file name is “GPSNavSystem1123.bin”. We want to identify common file signatures in the firmware image, or addresses within the code that indicate well-known use-cases. In this scenario, our console command would look like this:

binwalk –B GPSNavSystem1123.bin

Once executed, the command will return a table of decimal addresses in the code along with their hexadecimal counterpart. Next to the addresses will be a short description of the code’s function. Hackers can then use these addresses to identify and tinker with the program’s code. For example, a hex editor can be used to remove essential lines of code and cause the firmware update to render the device unusable.

Teaching Assistant George Mcpherson and Vikramajeet Khatri

(Disclaimer: Breaking Stuff with Joe is a Cybrary series that will be running indefinitely. You will not earn CEU/CPE hours by watching any individual 'Breaking Stuff with Joe' episode. However, you can still earn a certificate of completion for each episode completed.)

Train Your Team

Cybrary’s expert-led cybersecurity courses help your team remediate skill gaps and get up-to-date on certifications. Utilize Cybrary to stay ahead of emerging threats and provide team members with clarity on how to learn, grow, and advance their careers within your organization.

Included in a Path

Joe Perry
Senior Technical Instructor at FireEye, Inc
Read Full Bio
Learn

Learn core concepts and get hands-on with key skills.

Practice

Exercise your problem-solving and creative thinking skills with security-centric puzzles

Prove

Assess your knowledge and skills to identify areas for improvement and measure your growth

Get Hands-on Learning

Put your skills to the test in virtual labs, challenges, and simulated environments.

Measure Your Progress

Track your skills development from lesson to lesson using the Cybrary Skills Tracker.

Connect with the Community

Connect with peers and mentors through our supportive community of cybersecurity professionals.

Success from Our Learners

"Becoming a Cybrary Insider Pro was a total game changer. Cybrary was instrumental in helping me break into cybersecurity, despite having no prior IT experience or security-related degree. Their career paths gave me clear direction, the instructors had real-world experience, and the virtual labs let me gain hands-on skills I could confidently put on my resume and speak to in interviews."

Cassandra

Information Security Analyst/Cisco Systems

"I was able to earn both my Security+ and CySA+ in two months. I give all the credit to Cybrary. I’m also proud to announce I recently accepted a job as a Cyber Systems Engineer at BDO... I always try to debunk the idea that you can't get a job without experience or a degree."

Casey

Cyber Systems Engineer/BDO

"Cybrary has helped me improve my hands-on skills and pass my toughest certification exams, enabling me to achieve 13 advanced certifications and successfully launch my own business. I love the practice tests for certification exams, especially, and appreciate the wide-ranging training options that let me find the best fit for my goals"

Angel

Founder,/ IntellChromatics.

"Cybrary really helped me get up to speed and acquire a baseline level of technical knowledge. It offers a far more comprehensive approach than just learning from a book. It actually shows you how to apply cybersecurity processes in a hands-on way"

Don Gates

Principal Systems Engineer/SAIC

"Cybrary’s SOC Analyst career path was the difference maker, and was instrumental in me landing my new job. I was able to show the employer that I had the right knowledge and the hands-on skills to execute the role."

Cory

Cybersecurity analyst/

"I was able to earn my CISSP certification within 60 days of signing up for Cybrary Insider Pro and got hired as a Security Analyst conducting security assessments and penetration testing within 120 days. This certainly wouldn’t have been possible without the support of the Cybrary mentor community."

Mike

Security Engineer and Pentester/

"Becoming a Cybrary Insider Pro was a total game changer. Cybrary was instrumental in helping me break into cybersecurity, despite having no prior IT experience or security-related degree. Their career paths gave me clear direction, the instructors had real-world experience, and the virtual labs let me gain hands-on skills I could confidently put on my resume and speak to in interviews."

Cassandra

Information Security Analyst/Cisco Systems

"I was able to earn both my Security+ and CySA+ in two months. I give all the credit to Cybrary. I’m also proud to announce I recently accepted a job as a Cyber Systems Engineer at BDO... I always try to debunk the idea that you can't get a job without experience or a degree."

Casey

Cyber Systems Engineer/BDO

"Cybrary has helped me improve my hands-on skills and pass my toughest certification exams, enabling me to achieve 13 advanced certifications and successfully launch my own business. I love the practice tests for certification exams, especially, and appreciate the wide-ranging training options that let me find the best fit for my goals"

Angel

Founder,/ IntellChromatics.