How I found a Vulnerability using binwalk (0day included)
While attempting to teach myself how to use binwalk from this tutorial by Praetorian, I ran into a few problems with the firmware. So I decided, “Fuck it! We’ll do it live!”
Since I’ve been working in the Healthcare industry and would be reverse-engineer medical devices for future assignments, I decided to just get started now.
To completely understand the content of this article, the following lists pre-requisite knowledge:
- General Linux Knowledge
Let’s get Started
I looked for some firmware and came across this article.
Atredis found a few vulnerabilities in two devices, GE Healthcare MAC5500 EEG, and the Silex SDS-500, SD-320AN linux-based WiFi bridges.
They found some OS Injections in the SD-320AN, which I thought was pretty cool. Silex updated their firmware, so these vulnerabilities shouldn’t be present. Atredis also shared a link on the current version of the firmware, so after the patch.
I wanted to know what would happen if I ran binwalk on the updated firmware. (I still didn’t know how binwalk worked).
After running binwalk, I got a layout of a linux filesystem.
From here, I usually just go straight to /etc/passwd
This wasn’t that much help. So then I looked at /etc/shadow
You notice the password for admin?
I thought this was a hash so I plugged it into CrackStation. A great website that has a ton of hashes already there.
“Unrecognized hash format.” So…it’s not a hash.
After a few moments, I thought about just throwing it into a base64 decoder.
Base64 decoded tVMhrdFrEt866 as S!k:
All in all, from grabbing the firmware, to running binwalk (poorly. I’m sure I’m underutilizing it’s potential.), and plugging this encoded string into a hash lookup and decoder, this entire process took me only about 2 hours. I spent more time being afraid of trying things in the wild, than I did actually discovering things. If you ever want to try or get into something, but want to build your skills up first, I suggest, if it’s harmless like this, just do it. You’ll learn. If it has some legal or criminal implications, then maybe you should spend more time in the Information Gathering and Recon phases. But this is harmless. Mostly.