Part 34 - x64 C++ 1 Code [Part 1]

For a complete table of contents of all the lessons please click below as it will give you a brief of each lesson in addition to the topics it will cover. https://github.com/mytechnotalent/Reverse-Engineering-Tutorial

Today we start our RE with the C++ language. The vast majority of malware is written in C++ and walking through simple code examples over the coming months and breaking them down in a debugger will give you a real hands-on approach to learning true RE.

We will use Kali Linux going forward with Radare 2. You can get VirtualBox and download the Kali Linux x64 Appliance to follow along.

Let’s start with the C++ 1 code example:

Part 34 - x64 C++ 1 Code [Part 1] - 图1

Here we simply create a main function and use the C++ output stream library to output the text “Hello World” with a new line at the end to the terminal. Let’s compile and link:

Part 34 - x64 C++ 1 Code [Part 1] - 图2

Let’s run in the terminal:

Part 34 - x64 C++ 1 Code [Part 1] - 图3

As we can see “Hello World” successfully echoed to the terminal.

Next week we will introduce Radare 2 and debug the code and examine what it looks like in x64 Assembly.