Part 3 - “Hello World”

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/hacking\_c-\_arm64

Today we are going to start at the beginning and take a very simple C++ program that does nothing more than use the stream insertion operator to send a string literal to the stdout and then use the end line manipulator to flush the output buffer.

Let’s start by creating a file 0x01_asm64_helloworld.cpp and type the following into it.

  1. #include <iostream>
  2. int main()
  3. {
  4. std::cout << "Hello World!" << std::endl;
  5. return 0;
  6. }

Let’s compile and link.

  1. g++ -o 0x01_asm64_helloworld 0x01_asm64_helloworld.cpp

Let’s run.

  1. ./0x01_asm64_helloworld

We see the simple result.

  1. Hello World!

These lessons are deliberately intended to be SHORT an SIMPLE. I know a number of you are more advanced however I really want to make this course as beginner friendly as possible.

In our next lesson we will debug this very simple binary using our dev build of Radare2.