
Hello!
Today we would like to share our list of materials on reverse engineering (RE). This list is very extensive, because our research department is primarily concerned with the tasks of RE. In our opinion, the selection of materials on the topic is good for the start, while it may be relevant for a long time.
We have been sending this list of links, resources, books for five years to people who would like to get into our research department, but they don’t yet pass by the level of knowledge or are just starting their way in the field of information security. Naturally, this list, like most of the materials / collections, will need updating and updating in some time.
Funny fact: we were shown how some companies send out our list of materials from themselves, but only in a very old edition. And after this publication, they will finally be able to use its updated version with a clear conscience;)
So, go to the list of materials!
- Topics
a. Reverse
b. Search for vulnerabilities (fuzzing)
c. Vulnerability Exploitation
d. Malicious code analysis - Instruments
a. IDA Pro
b. Radare2
c. WinDBG (Ollydbg / Immunity Debugger / x64dbg)
d. Gdb
e. DBI
f. SMT
g. Python to automate
h. BAF (Binary Analysis Frameworks) - Architecture
a. x86-x86_64
b. ARM - OS
a. Windows
b. Linux
c. Mac OS (OSX) / iOS
d. Android - File formats
a. PE
b. ELF
c. Mach-o - Programming
a. C / C ++
b. Assembler - Practice
a. War games
1. Topics
In this section, we will look at the main areas of RE application. Let's start directly from the reverse development process itself, move on to finding vulnerabilities and developing exploits, and, of course, let's get to malware analysis.
1.a Reverse engineering
- Chris Kaspersky’s “The Art of Disassembling ” is not new, but a very good and up-to-date book from Chris with good systematization of knowledge and excellent material;
- " Practical Reverse Engineering: x86, x64, ARM, Windows Kernel, Reversing Tools, and Obfuscation " - a "new" book from several well-known information security specialists covering some new moments and topics that are missing from Chris's book;
- Reversal for Beginners by Denis Yuryevich is a completely free book, already translated into many languages ​​of the world. Here, probably, the most remarkable thing is the presence of interesting tasks after each chapter, while for several architectures at once;
- " Practical RE tips " - an excellent webinar in English from Gynvael Coldwind, containing many useful tips and scripts about RE;
- The resource " OPENSECURITYTRAINING.INFO " contains good educational lectures and videos on RE in English;
- " Digging Through the Firmware " is a good series of Practical Reverse Engineering articles - useful articles for those who are just about to dive into the world of device firmware reversal;
- " Training: Security of BIOS / UEFI System Firmware from Attacker and Defender Perspectives " - if you want to plunge into the world of firmware security, UEFI BIOS, then you definitely need to familiarize yourself with these slides that were previously in paid training at leading security conferences;
- CRYPTO101 - a little introduction to cryptography, without which it can not do.
1.b Vulnerability Scan
1.c Examples of exploitation of found vulnerabilities
- " Exploit Writing Tutorials by Corelan Team " ( translation ) - a famous series of posts on writing exploits and shellcodes, starting with the basics;
- " Exploit Development Community " ( partial translation ) - a series of articles on writing a combat exploit for IE 10 and 11 versions;
- " Modern Binary Exploitation " - materials from the RPISEC team from the training course they conducted at the Rensselaer Polytechnic Institute;
- " Web-archive of the blog company Vupen " - submerged blog with examples of exploiting complex vulnerabilities in VirualBox, XEN, Firefox, IE10, Windows Kernel, Adobe Flash, Adobe Reader;
- " Project Zero " - a blog from the Google research team, where their experts often share interesting stories on the exploitation of various cool vulnerabilities;
- " Browser mitigations against memory corruption vulnerabilities " - protection technologies used in popular browsers:
- " SoK: Eternal War in Memory " is an excellent document that shows the attack model and describes various mechanisms to prevent exploitation at different stages for different types of vulnerabilities associated with memory corruption;
- " Writing Exploits for Win32 Systems from Scratch " - a detailed article on writing an exploit from scratch for a vulnerability in the SLMAIL program;
- Phrack - the famous hacker magazine Phrack. We recommend reading, first of all, the articles of the category "The Art of Exploitation";
- " The Shellcoder's Handbook: Discovering and Exploiting Security Holes " is a legendary book on shellcode writing.
1.d Malware Analysis
2. Necessary tools
Below are the popular tools used in RE.
2.a IDA Pro
2.b Radare2
2.c WinDBG (Ollydbg / Immunity Debugger / x64dbg)
Without knowledge of the principles of the debugger and the ability to use it, too, can not do. Below we look at the debuggers for Windows, and in the next paragraph we will pay attention to the famous GDB. So, let's go:
2.d gdb
2.e DBI
Programmable debugging is today an essential approach in the arsenal of any reverser. And DBI is one of the tools. More details:
2.f SMT
What is SMT solver? In short, an SMT solver is a program that can solve logical formulas.
The basic idea of ​​using SMT in the field of software security is to translate a program code or algorithm into a logical formula, and then use a SMT solver to check one or another property of this code.
In other words, SMT provides a mathematical tool for semantic code analysis.
SMT solvers have been used in our field for quite some time. They are well established for the following tasks:
- search for bugs (static analysis / fuzzing);
- deobfuscation;
- "home" cryptanalysis;
- character execution (as an "engine");
- There are also some successes in the field of automatic exploit generation (for example, ROP generation).
During this time, SMT lost the aura of mystery, more or less working tools for “ordinary” people appeared.
Below are sources that will help to plunge into the topic:
2.g Python for Automation
Today, without basic knowledge of Python, it will be very difficult, because this programming language is considered the most popular means for automating various tasks in the field of information security (and not only). In addition, it is used in various utilities (for example, all the above utilities allow you to add functionality with the help of this PL):
2.h BAF (Binary Analysis Frameworks)
For a bit more advanced, we recommend paying attention to whole frameworks, which in their composition use the previously mentioned mechanisms and analysis tools for solving more complex problems. So, here they are:
Some interesting frameworks / tools:
3. Architecture
We will cover only a few popular architectures. At the end of the article in the section with additional materials you will find information on many others (MIPS, PowerPC, etc.).
3.a x86-x86_64
3.b ARM
4. OS
Knowledge of the principles of work of popular Operating Systems.
4.a Windows
- " Windows Internals " - the fundamental book for understanding the work of Windows.
The following points, although mainly related to the exploitation of vulnerabilities in this OS, but allow you to learn more about the insides of Windows:
4.b Linux
- " Linux insides " is an analogue of the Windows Internals book, but only for OS such as Linux.
As in the case of Windows, the following topics are related to the development of exploits:
4.c Mac OS (OSX) / iOS
4.d Android
- " Android Hacker's Handbook " - probably the most popular book dedicated to the safety of the Android OS;
- " Android Internals :: Power User's View " - a book that tells about the internal mechanisms of this OS. Due to recent leaks, the material appeared in the public domain, about which the author himself writes on his website and provides the opportunity to download the previous version.
This section provides links explaining the details of popular executable file formats.
5.a PE
5.b ELF
5.c mach-o
The famous researcher corkami makes very useful and interesting "posters" with the scheme of various file formats, including those mentioned above. We recommend using them as a cheat sheet. A utility Kaitai Sctruct will help in the analysis.
6. Programming
One of our friends once said that a good reverser is 80% a good programmer. The ability to program and understand what is being done and why simplifies the process of researching someone else's program. Therefore, without programming in the reverse nowhere. And of course, the automation of routine tasks, as you probably already understood, is a very useful thing;)
6.a C / C ++
6.b ASM
7. Practice
This section provides links to virtual machines and online resources to practice.
7.a War Games
And finally, a few links with a large number of materials on the above topics: