Book Image

Binary Analysis Cookbook

By : Michael Born
Book Image

Binary Analysis Cookbook

By: Michael Born

Overview of this book

Binary analysis is the process of examining a binary program to determine information security actions. It is a complex, constantly evolving, and challenging topic that crosses over into several domains of information technology and security. This binary analysis book is designed to help you get started with the basics, before gradually advancing to challenging topics. Using a recipe-based approach, this book guides you through building a lab of virtual machines and installing tools to analyze binaries effectively. You'll begin by learning about the IA32 and ELF32 as well as IA64 and ELF64 specifications. The book will then guide you in developing a methodology and exploring a variety of tools for Linux binary analysis. As you advance, you'll learn how to analyze malicious 32-bit and 64-bit binaries and identify vulnerabilities. You'll even examine obfuscation and anti-analysis techniques, analyze polymorphed malicious binaries, and get a high-level overview of dynamic taint analysis and binary instrumentation concepts. By the end of the book, you'll have gained comprehensive insights into binary analysis concepts and have developed the foundational skills to confidently delve into the realm of binary analysis.
Table of Contents (12 chapters)

Installing VirtualBox on Ubuntu

When installing VirtualBox on Ubuntu, you may be able to get away with using the aptitude package manager for installation. When I was doing some testing while writing these instructions, the current version of VirtualBox in the Ubuntu Xenial repositories was version 5.x. That just won't do for our needs.

Getting ready

In the event you are curious to see what version would get installed via aptitude, you can query aptitude directly via the following Terminal command:

$ apt-cache show virtualbox

The following screenshot shows the output I received when testing on Ubuntu 16.04 LTS Desktop and using Ubuntu 18.04 LTS as my host operating system:

Unfortunately, this won't work for our needs since we want to make sure VirtualBox 6.0 is installed. Therefore, we'll have to navigate through the VirtualBox website to download the appropriate installation package, which, in my case, is for Ubuntu 16.04. You can download VirtualBox 6.0 for Ubuntu from https://download.virtualbox.org/virtualbox/6.0.0/virtualbox-6.0_6.0.0-127566~Ubuntu~xenial_amd64.deb.

If, by chance, you're running Ubuntu 18.04 LTS as your host operating system, download VirtualBox from the following location: https://download.virtualbox.org/virtualbox/6.0.0/virtualbox-6.0_6.0.0-127566~Ubuntu~bionic_amd64.deb.

Once downloaded, we are ready to install VirtualBox on Ubuntu Linux.

How to do it...

Use the following instructions to install VirtualBox on a host that's running Ubuntu as the primary operating system:

  1. Once the appropriate installation file has been downloaded, launch a Terminal and navigate to the location of the downloaded VirtualBox installation package. In my case, that would be ~/Downloads:
For Ubuntu 16.04 LTS

$ cd Downloads/
$ sudo dpkg -i virtualbox-6.0_6.0.0-127566~Ubuntu~xenial_amd64.deb


For Ubuntu 18.04 LTS


$ cd Downloads/
$ sudo dpkg -i virtualbox-6.0_6.0.0-127566~Ubuntu~bionic_amd64.deb
  1. Verify that the installation worked correctly by starting VirtualBox. A simple Terminal command will do the trick:
$ virtualbox
  1. Once VirtualBox has finished loading, navigate to Help | About VirtualBox.
  2. A new window will display, indicating the version of VirtualBox. As long as we see that VirtualBox 6.0 is present and there were no errors during installation, we're ready to install and configure the virtual machines we will use throughout the examples in this book.

How it works...

After downloading the appropriate installation package, we used dpkg, part of Ubuntu's built-in package manager, to install the VirtualBox 6.0 package. This puts us in a great position so that we can move on to installing two different virtual machines: a 32-bit virtual machine and a 64-bit virtual machine. Both are necessary so that we can work through the examples that are presented in later chapters.

There's more...

We're not limited to installing VirtualBox 6.0 on just one operating system. If you want to set up more than one lab, say, on a desktop and a laptop, feel free to jump back to the previous recipes for installing VirtualBox 6.0 on Windows or Mac. If you do so, you'll need to run through the virtual machine creation recipes and need to install the tools, dependencies, and code examples on all of the hosts you'll use for a lab.

See also

For more information about VirtualBox and for alternate installation steps, or for additional information on some of the features that are available, consult the wiki at https://www.virtualbox.org/wiki.