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 Windows

The widespread access of virtualization software makes it an easy choice for setting up a lab, whether for at-home practice or for at-work research purposes. Since we want to use freely available tools and software, VirtualBox was an easy decision when choosing virtualization software. It works on many host operating systems and has come a long way in terms of usability and stability since its earlier versions.

We will use VirtualBox 6.0 to host our Ubuntu 16.04 LTS virtual machines, which we will configure later and use extensively throughout each chapter. This recipe will get you started installing VirtualBox 6.0 on a Windows host. If you're not using Windows as your host operating system, skip ahead to the recipe for either Mac or Linux.

To perform the recipes in this book, and to install the lab and necessary tools, you'll need the following:

  • A laptop or a desktop computer with internet access
  • An Intel processor capable of virtualization
  • As a minimum, 8 GB of system RAM, though 16 GB of RAM is ideal
  • As a minimum, 20 GB of free hard drive space, though 40 GB of free hard drive space is ideal
  • Either Windows, Linux, or Mac

Getting ready

How to do it...

Use the following instructions to install VirtualBox on a host running Windows as the primary operating system:

  1. Once the VirtualBox 6.0 installer has been downloaded, double-click the VirtualBox 6.0 setup executable.
  2. In the new window that displays, click on Next > to begin the installation process.
  3. In the Custom Setup window, you are free to change the installation location to somewhere outside of the default; otherwise, leave the defaults as they are and click Next >.
  4. In the next step, leave the defaults checked, unless you have a specific reason not to, and click Next >.
  5. The next setup window will warn you about temporarily disconnecting your network connection. Choose Yes to continue the installation process.
  6. In the Ready to Install window, click Install.
  7. Once the installation process starts, you may be prompted by Windows' User Account Control to allow installation to continue. When this window appears, click Yes.
  8. You may also get another Windows Security window asking whether you want to trust software from Oracle and install the drivers on the host. Check the box that says Always trust software from "Oracle Corporation" and click Install.
  9. Finally, once the installation process is complete, a new window will appear, asking whether you want to Start Oracle VM VirtualBox 6.0.0 after installation. Check this checkbox and click Finish.
  1. Now that VirtualBox 6.0 is installed, we're ready to install and configure the Ubuntu 16.04 LTS virtual machines. Your Oracle VM VirtualBox Manager window should resemble the following screenshot:

How it works...

We began by downloading the appropriate installer for Windows from the VirtualBox website. Once that finished downloading, we executed the installation script and navigated through the installation prompts, filling out the appropriate installation information or accepted the default installation configuration for our Windows host.

There's more...

With VirtualBox installed on Windows, you are free to adjust some of the advanced features, such as creating a private, host-only network under the VirtualBox preferences menu, adjusting the Default Machine Folder settings for storing virtual machine files, how often VirtualBox checks for updates, tweaking the display settings, or installing any extension packs if you plan to use some of the development features of VirtualBox. There are many more options that can be configured to accommodate the needs of your working environment.

See also

If this is the only host that you're going to install VirtualBox 6.0 on, please feel free to skip ahead to the Ubuntu 16.04 LTS installation for both the 32-bit and 64-bit virtual machines. Otherwise, move on to the appropriate installation instructions for either Mac or Linux.

For more information on VirtualBox 6.0 or for additional installation techniques, you can refer to the wiki at https://www.virtualbox.org/wiki.