
Hello everyone, and thank you for joining my course.
My name is Swapnil, and I will be your guide on this exciting journey. I hold a master's degree in Computer Science and have over 8 years of experience teaching cybersecurity courses. Teaching is my passion, and I am excited to share my knowledge with you.
Now, let's discuss who can benefit from this course. Whether you're an Ethical Hacker, a Pentester, a Malware Analyst, a Computer Science student, or simply someone eager to expand your knowledge, this course is designed for you.
To get the most out of this course, you'll need just two key skills:
A basic understanding of the C programming language.
Familiarity with the Linux command line. You should be comfortable using Linux terminal commands.
With these skills, you'll be well-equipped to dive into this course.
I promise you an engaging and insightful learning experience that will challenge and inspire you.
"Hello, everyone and welcome to the next part of this tutorial.
In this course, we're diving into a very important skill that every ethical hacker should consider adding to their skillset which is “ ARM assembly programming” .
Now, you might be wondering, 'Why ARM assembly programming ?' Well, let's find out why?"
"First off, ARM processors are the backbone of countless embedded systems. From smartphones and IoT devices to various consumer electronics, ARM is everywhere. By learning ARM assembly, you'll gain the ability to analyze and secure these vital systems effectively."
"Next, let's talk about reverse engineering. Many malicious actors are increasingly targeting ARM-based devices. With a solid understanding of ARM assembly, you can reverse-engineer malware, analyze its behavior, and develop robust countermeasures to safeguard these systems."
"Writing exploits is another area where ARM assembly knowledge shines. Developing exploits often demands a deep understanding of the target architecture. By mastering ARM assembly, you can create and test exploits on ARM platforms, identifying vulnerabilities before the bad guys do."
"Many devices run firmware specifically written for ARM processors. Analyzing and debugging firmware at the assembly level can significantly enhance your vulnerability assessments and security evaluations, making your skills invaluable."
"Finally, having cross-platform knowledge is a game-changer. By adding ARM assembly to your skill set alongside x86/x64 assembly, you broaden your skill set. This cross-platform expertise is crucial in a field where threats can target a wide range of architectures."
So there you have it!
Learning ARM assembly programming equips you with the tools to understand embedded systems, reverse-engineer malware, develop exploits, analyze firmware, and enhance your cross-platform knowledge. Dive into ARM assembly, and take your ethical hacking skills to the next level.
So, that's all for now. I'll see you in the next part. Until then, stay curious and keep exploring!
Hello everyone and welcome to the next part of this tutorial. In this part we will look at how a computer system works.
If you want to learn ARM assembly then first you should know how a computer system works internally.
So lets see how a computer system works.
So basically a computer system has three components. The first component is I/O devices which includes keyboard,mouse and monitor which handles input output signals in the computer system.
The second component is memory which stores the input data given by I/O devices. The third important component is CPU which processes the input data given by I/O devices which are coming through the memory component.
So basically these three components are connected by buses which are responsible for transmitting data in these three components.
So when any user submits data to the computer, first it goes into the memory unit through the input/output devices where this data is stored, then this data is transferred to the CPU for processing. After data processing by the CPU this data is transferred into memory where it stores the processed data and then this data is transmitted to the input output devices which are received by the user.
So this is the mechanism by which a computer system works.
In order to understand ARM assembly language we have to understand the basic ARM CPU internal workings inside the computer.
So in the next video we will deep dive into the ARM CPU internal workings.
If you have any questions regarding this concept feel free to ask in the comment section i will surely help you.
So, that's all for now. I'll see you in the next part. Until then, stay curious and keep exploring!
Hello everyone and welcome to the next part of this tutorial. In this part we are going to see how an ARM CPU works internally. So let's begin.
Let's take a simple example to understand the internal working of an ARM CPU.
Suppose a computer user wants to add two numbers, so he writes a program in c which adds two numbers. After writing the program code he uses a compiler to compile this code.
In the compilation process first the code is assembled into an object file which is the assembly code of our program and then it goes into the linking process where the assembly code is converted into machine code which is our final binary file.
So data of this binary file is stored in the secondary memory in the binary form at a particular memory address.
Now when the user executes this file from the secondary memory, before any execution ,first this binary data is loaded into our primary memory RAM at a particular address.
Now this loaded data in our RAM is going to be loaded in our CPU for execution.
So the first line of our binary data is fetched from the primary memory and loaded into the control unit in the CPU using Program Counter Register which points to the memory address location of our binary data of our program.
Now this binary data inside the control unit is decoded into a meaningful instruction.
Now the decoded instruction is loaded into the Arithmetic Logic Unit for execution.
You can see this instruction is moving the number 5 in register1, so the 5 is moved into this register. Here registers are the memory area to store data in the CPU. Don't worry we will deep dive into the registers in the upcoming videos. For now just think of it as a memory space in the CPU to store data.
So the first line of instruction is executed from our binary file.
Like the same way the next instruction is fetched by the PC register from the primary memory which is loaded into the control unit where this instruction is decoded.
This decoded instruction is loaded into ALU and you can see here in this instruction it is storing 4 into register2 , so the value 4 is stored in register2 here.
Now the third line instruction is going to be fetched from the primary memory using the PC register into the control unit where this instruction is decoded.
This decoded instruction is loaded into the ALU and you can see here this instruction is adding the values of r1 and r2 and storing the result in r3.
Now this add program has successfully executed inside the CPU in which it has added two numbers and stored the result in the CPU register.
So this is how a CPU works internally inside the computer system.
So, that's all for now.
If you have any questions regarding this concept feel free to ask in the comment section i will surely help you.
I'll see you in the next part. Until then, stay curious and keep exploring!
Learn the fundamentals of ARM CPU registers in this comprehensive tutorial. Explore the purpose and usage of general-purpose registers like x0-x30, scratch registers, special registers, and more with simple C code examples. Understand how these registers operate within an ARM CPU to enhance your programming knowledge. Perfect for beginners and enthusiasts looking to deepen their understanding of ARM architecture. Stay curious and keep learning!
Hello everyone and welcome to the next part of this tutorial. In this part we will look into pstate register which is also called the flag register of the arm CPU.
Let's understand what the flag is and how it works in CPU.
When a computer user gives any arithmetic or logical operations to the computer. first it goes into ram memory which is further transferred into the cpu for processing and execution. After calculation of this user input, the CPU gives a status of that operation. This status is given by a register called pstate register. Generally you can call it flag register also. So whenever the CPU gets any input of arithmetical and logical operations this flag register gives the status of that result.
Now this is the structure of the flag register which is 32 bits in size, where each bit is indicating a flag bit 0 or 1, 1 means flag is on and 0 means flag is off.
Let's understand some common flags in this flag register one by one with some examples.
For these examples , We are going to use 8 bit register here so that we can understand the concepts easily. These concepts will be applicable on 32 bit and 64 bit registers as well.
Let's start by negative flag.
Suppose the user gives add arithmetic operation of these two signed numbers which are -5 and 3. Lets add these two numbers here. First these numbers are converted into machine code which will be in binary form and then addition operation is done here.
Now we are getting -2 as a result here. You can see here there is a minus sign in the result , now in this case the negative flag will be set due to this minus sign in the result. So whenever there is a sign in the arithmetic and logical operation , the negative flag will be set. So this was negative flag.
Lets move on to zero flag.
Lets change our numbers to 5 and –5. when we perform arithmetic operation on these two numbers we are getting result as 0 here. So when the result of any arithmetic and logical operation is zero then this zero flag will be set. So this was zero flag.
Lets move on to carry flag.
Suppose the user gives add arithmetic operation of these two unsigned numbers which are 128 + 128. Again these numbers are converted into machine code which will be in binary form and then addition operation is done here.
First this 0 and 0 will be 0 , then 0 and 0 will be 0 like the same way up to here. Now in the last addition this 1 plus 1 will be 0 and carry will be 1 here. So in this case the Carry flag will be set here because there is a carry left in this addition operation. So this was carry flag.
Let's move on to the overflow flag.
Overflow flag will be set when the arithmetic and logical operation result causes an overflow in the register.
Lets understand this by a simple example here. An 8 bit register has the capacity of storing 127 signed number in count. But if we try to store more then 127 in this register it will set an overflow flag to indicate there is an overflow in the register.
For this example lets take two input as 127 and 1 and try to store these two number in this 8 bit register here this register cause an overflow. Because of this, overflow flag will be set here, indicating , there is an overflow in the register. So thats the overflow flag working
As you can see, there are additional flag bits present after the initial four flags. These additional flags are reserved for use by the operating system, meaning they play a role in system-level operations rather than user-level applications.
The first four flags, however, are specifically intended for use by user programs. This is why I've focused on explaining these four flags here, as they are relevant to the functionality and behavior of user-level applications.
So thats all about flags of the arm CPU.
if you have any questions regarding this concept let me know in the comment section i will surely help you.
I will see you in the next part, Until then, stay curious and keep exploring!
Hello everyone, and welcome to the next part of this tutorial. In this section, we will explore the memory layout of a program in the Linux operating system.
When a program runs on Linux, its data is organized into several different sections of memory. Understanding how data is allocated and managed in these sections is very important for understanding arm assembly programming and debugging. Let’s take a closer look.
The basic memory layout of a typical program in a Linux operating system contains 6 sections,:
The first section is Text Section (.text):
Which contains the executable instructions of the program. It is often read-only to prevent modification of the code during execution.
The 2nd section is Data Section (.data):
The .data section stores global and static variables that are initialized with specific values before the program begins execution.
The 3rd section is BSS Section (.bss):
The Block Started by Symbol (BSS) segment holds global and static variables that are not initialized by the programmer. These variables are set to zero or null by default.
The 4th section is Heap:
The heap is used for dynamic memory allocation, which occurs when the program requests memory at runtime (e.g., using malloc in C).
The 5th section is Stack:
The stack section stores temporary data such as function parameters, return addresses, and local variables. It grows and shrinks as functions are called and return.
In the 6th section Command-Line Arguments and Environment Variables are stored:
Example: Simple C Program
To better understand how data is stored in these sections, let's take an example of a simple C program:
#include <stdio.h>
#include <stdlib.h>
int a = 5; // Initialized global variable
int b; // Uninitialized global variable
void main(int argc, char *argv[]) {
int x = 5; // Local variable on the stack
int y = 6; // Local variable on the stack
int *heap_var = (int *)malloc(sizeof(int)); // Dynamic allocation on the heap
*heap_var = 100;
}
Breakdown of the Program's Memory Layout
Now in this program, integer a and b are the global variables. So
integer a will be stored in the .data section since it is initialized with 5.
integer b will be stored in the .bss section because it is uninitialized.
In the main function x and y are the local variables and
These will be stored in the stack section as they are local to the main function and temporary in nature.
Now this integer heap_var pointer variable
is allocated memory on the heap, which will be stored in the heap section here.
Now the main function arguments which are argument count and arg vector are typically stored above the stack memory, facilitating interaction with the program through the command-line inputs.
All the Executable Instructions:
for the main function and other executable parts of the program will be loaded in the .text section.
Conclusion
So that's all for this part of the tutorial! If you have any questions about the memory layout of a program in Linux, feel free to ask in the comments section. I'll be happy to help.
I will see you in the next part, until then, stay curious and keep exploring!
Hello everyone and welcome to the next part of this tutorial. In this part I am going to show you how we configure our lab machine for this tutorial.
For the lab machine,
I am using Kubuntu 24.04 LTS Version ( https://cdimage.ubuntu.com/kubuntu/releases/24.04.3/release/kubuntu-24.04.3-desktop-amd64.iso ) of Linux Operating System which is installed in my virtual box software.
You have to use the same version of Linux machine in order to follow this course.
Hello everyone, and welcome to the next part of this tutorial. In this segment, I'll guide you through the basic structure of an assembly program.
First, let's take a look at our lab machine terminal.
We'll start by creating our assembly source file using the Vim text editor. Let's name this file assembly.s, where .s is the standard extension for assembly source files.
Step 1: Creating the Data Section
Let's begin by defining the data section. We'll use the .section directive:
.section .data
The .section directive is used to create different memory sections in our program. The .data section typically holds initialized data or constants.
Step 2: Creating the BSS Section
Next, we'll create the BSS (Block Started by Symbol) section:
.section .bss
This section is used to declare variables that are not initialized by the programmer and are initialized to zero by the system at runtime.
Step 3: Creating the Text Section
Finally, let's define the text section, where our code will reside:
.section .text
Step 4: Specifying the Program Entry Point
Within the text section, we need to specify the entry point of our program using the .global directive. In this example, we'll use _start as our entry label:
.global _start
The _start label marks the location in the program where execution begins.
This simple structure is the foundation of an assembly program. We've defined three key sections: .data, .bss, and .text, but haven't added any specific data or instructions yet. This example is designed to help you grasp the basic layout of an assembly program.
In upcoming tutorials, we'll build upon this structure and start creating functional assembly programs.
Compiling and Linking
Let's save our file and exit the editor. Next, we'll assemble the file using the ARM 64-bit assembler:
aarch64-linux-gnu-as assembly.s -o assembly.o
Here, the -o option specifies the name of the output object file.
Once the object file is generated, we'll link it using the ARM 64-bit linker:
aarch64-linux-gnu-ld assembly.o -o assembly
In this command, the object file is used as input, and the -o option specifies the name of the final binary output file.
Verifying the Output
Finally, let's verify our binary file using the file command:
file assembly
You should see output confirming that this is an ARM 64-bit executable file.
Conclusion
That's all for now! In this video, we explored the basic structure of an assembly program and learned how to assemble and link our source file. If you have any questions, feel free to ask in the comments—I'm here to help.
Until next time, goodbye!
In this video we will understand the concept of system calls in Linux operating system practically.
Master the fundamentals and advanced concepts of ARM 64-bit assembly and reverse engineering with this hands-on course designed for ethical hackers, penetration testers, and cybersecurity professionals. As ARM architecture dominates modern mobile devices, IoT hardware, and embedded systems, understanding ARM64 internals is essential for anyone pursuing security research or malware analysis. This course provides a clear, structured path to help you learn how ARM processors work, how assembly code executes, and how to reverse engineer real ARM64 binaries.
You’ll begin with the essentials of ARM architecture, including registers, instruction sets, and differences from x86. Next, you’ll dive into assembly language basics, mastering syntax, addressing modes, memory layout, stack operations, and calling conventions. You’ll then apply these skills to understand advanced programming techniques, such as function calls, branching, conditional execution, and interacting with system resources.
The course includes a strong practical focus. You’ll reverse engineer ARM executables, analyze control flow, reconstruct program logic, write shellcode, and explore how vulnerabilities appear at the assembly level. You’ll also learn how ARM-based malware behaves, helping you apply low-level knowledge to ethical hacking and security research.
Whether you're beginning with ARM64 or expanding your reverse engineering expertise, this course will elevate your cybersecurity skills. Enroll now to unlock the power of ARM 64-bit assembly.