Other file-types

Nowadays, websites usually convert binary data to printable ASCII text in order for the site developers to easily embed this data along with the HTML scripts. Others simply convert data to something that is not easy for humans to read. In this section, we will aim to decode data that has been hidden from plain understandable form. In Chapter 13 Reversing various File-types, we will deal more with how to reverse other File-Types besides Windows and Linux executables. In the meantime, we will just decode obvious data.

Let us head to our browsers and visit www.google.com, at the time of writing (we stored a copy of the source at https://github.com/PacktPublishing/Mastering-Reverse-Engineering/blob/master/ch10/google_page_source.txt), viewing the source would show us a portion that has a b64 encoded text, as in the following screenshot:  

Using Cyberchef, a tool which can help decode various types of encoded data including base 64, we can deduce this data to something we understand. Just copy and paste the base-64 data into the input box then double-click From Base64. This should display the decoded binary content in the output box, as shown in the following screenshot:

Notice that the output has a PNG written at the beginning. This is most likely a PNG image file. In addition, if we carefully look at the source code, we can see that the type of data was also indicated before the base-64 encoded data, as shown in the following example:

data:image/png;base64

If we click on the disk icon, we can save the output data to a file and name it with a .png extension. That should enable us to view the image, as shown in the following screenshot:

There are other supported encoded types from the Cyberchef tool. If we ever encounter similar encoded text, the internet has all the available tools to help us out.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.218.234.83