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)

Using objcopy

I wanted to briefly touch on a tool called objcopy because it's a useful tool, even if we may not use it on every analysis we perform. This tool allows us to make a copy of a binary file, and if we choose, allows us to convert that binary file into one of many binary formats, including the ELF format. Additionally, if the need arises, we can use objcopy to strip symbols from a binary as we copy it. The primary use of objcopy that I've encountered is when we need to convert a binary into a raw format for use with the sc tool I mentioned in the previous chapter. Also, in case we've forgotten, sc comes installed by default in Kali Linux and works right out of the box. I have yet to find a way to get sc working properly on 32-bit Ubuntu Linux. Nonetheless, objcopy allows us to strip the ELF format from a binary and copy the raw format into another file...