Getting you're Hex on!
13th September 2019
Ever had a need to view and edit files in their raw hexadecimal form? If so, this one’s for you, it’s time to get you’re hex on!
Welcome back to Ordinal Walker and today we are looking under the surface of computer files once again, but this time just focusing on their hex form.
Wait hold on, what’s Hexadecimal?
Hexadecimal is an easier way to represent binary data in computer systems. What’s the reason you ask? Hexadecimal representations of data significantly shorten the number of digits, as one hexadecimal digit is equivalent to four binary digits.
Hexadecimal like binary data is also crazy awesome to look at!
What’s a Hex Editor?
A hex editor allows you to examine and edit binary files in their hexadecimal form. Unlike a normal text editor, a hex editor displays the physical contents of a file.
Hex editors can be very useful when you need to edit individual bytes of data, allowing you to manipulate file structures.
Who use Hex Editors?
Ethical hackers, malicious hackers, security researchers conducting reverse engineering, students and software engineers in general…for example when making new file formats.
Using a Hex Editor
So let’s install a hex editor and give this a go…once again, I am using Ubuntu (Disco Dingo).
Little side note, there are loads of hex editors for Linux out there, I’m not going to cover them all here, I’m just going to cover my favourite being Hexedit.
Hexedit is a command line based hexeditor, you might find it is already preinstalled on your machine.
To install Hexedit execute the following command in your terminal:
_> $ sudo apt-get install hexedit
Open a file to view its raw hex file format and you just got you’re hex on ?
_> $ hexedit [the file name]