Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Reverse Engineering Armv8-A Systems
Reverse Engineering Armv8-A Systems

Reverse Engineering Armv8-A Systems: A practical guide to kernel, firmware, and TrustZone analysis

Arrow left icon
Profile Icon Austin Kim
Arrow right icon
Mex$737.99 Mex$820.99
eBook Aug 2025 446 pages 1st Edition
eBook
Mex$737.99 Mex$820.99
Paperback
Mex$1025.99
Subscription
Free Trial
Arrow left icon
Profile Icon Austin Kim
Arrow right icon
Mex$737.99 Mex$820.99
eBook Aug 2025 446 pages 1st Edition
eBook
Mex$737.99 Mex$820.99
Paperback
Mex$1025.99
Subscription
Free Trial
eBook
Mex$737.99 Mex$820.99
Paperback
Mex$1025.99
Subscription
Free Trial

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Reverse Engineering Armv8-A Systems

Learning Fundamentals of Arm Architecture

Founded as a joint venture in 1990, Arm® Holdings has become one of the dominant forces in the IT industry. Arm processors are used everywhere, from smartphones and tablets to servers and IoT devices. Arm processors are also the most dominant players in the automotive industry. With its vast ecosystem, a lot of chipsets are based on Arm processors. Arm’s position in the semiconductor market is strong.

This first chapter covers the following topics:

  • Introduction to the Arm architecture
  • Registers
  • Procedure Call Standard for the Arm Architecture (AAPCS)
  • Exception levels
  • Exceptions

In this chapter, we will primarily focus on the Armv8-A architecture because it is the most popular architecture. Smartphones, MacBooks, and automotive systems are all based on the Armv8-A architecture.

Armv8-A offers more features, including the Instruction Set Architecture (ISA), Application Binary Interface...

Technical requirements

Introduction to the Arm architecture

An Arm processor is a semiconductor composed of transistors in terms of hardware. From a software engineer’s point of view, how can we control the Arm processor? There are a number of Arm processors available in the market but software developers are often in situations where they need to configure Arm processors in different ways depending on the requirements of the project.

What is the Arm architecture?

The Arm architecture is how the Arm company describes the Arm processor from a software point of view. The key elements of the Arm architecture include registers, assembly instructions, exceptions, and TrustZone®, which software developers need to understand.

Let’s take a look at the following screenshot:

Figure 1.1: TRACE32 debugger window

Figure 1.1 shows the key elements of the Arm architecture. [1] Assembly Instruction shows the assembly instructions that the Arm processor can decode and execute...

Registers

Whenever you read an assembly code, you will notice that there are registers that are used as the input or output of instructions. If you do not understand how registers are used, it is difficult to analyze the assembly routine. Therefore, it is important to learn how the registers are used.

In this section, you will learn how registers in Armv8-A are organized, as follows:

  • General-purpose registers
  • Special registers
  • System registers

At the end of this section, you will learn about the key set of registers when performing reverse engineering. First, let’s explore the general-purpose registers.

General-purpose registers

When you begin to learn about registers, the first registers you’ll encounter are the general-purpose registers. Let’s look at the list of general-purpose registers in Armv8-A and learn how each register is used:

X0

...

Procedure Call Standard for the Arm Architecture (AAPCS)

Program code consists of multiple functions. On your system, a lot of libraries generated by different compilers are integrated to run multiple functions for the application as well as drivers.

This section covers AAPCS, which specifies the standard across function calls.

Background

Let’s begin this section by taking a look at the following example code:

01 int add_func(int x, int y)
02 {
03     int result = x + y;
04     printf("x:%d, y:%d \n", x, y);
05     
06     return result;
07 }

If you write the preceding add_func function, you may expect it to execute as follows:

  • Any function can call the add_func function
  • After the task of the add_func function is completed, it returns to the instruction that called the add_func function

Also, the add_func function can be called from the assembly routine. For this, we need a standard to manage interactions between functions...

Exception levels

One of the most important features of Armv8-A is exception levels (ELs), as exception handling and registers are organized based on exception level.

Exception levels and privilege levels

What is an exception level? When you look into the Linux kernel or RTOS code, you will notice that several system registers are suffixed with EL1 or EL2:

01 MSR TTBR0_EL1, X1
02 ADD X0, X0, #0x800
03 MSR VBAR_EL2, X1

The preceding example shows that TTBR0_EL1 is suffixed with EL1 in line 01, and VBAR_EL2 is suffixed with EL2 in line 03.

In practice, an exception level is written as ELn or ELx, where the n or x characters are suffixed to EL and the value of n or x can range from 0 to 3. EL0 is called exception level zero and EL1 is called exception level one.

When you hear about exception levels for the first time, you may assume the exception level is related to the exception, as the name implies. However, exception levels correspond to privilege levels rather...

Exceptions

In general, CPU architecture supports exceptions. For example, intel x86, MIPS, Armv7, and RISC-V define exceptions.

Key principles of exceptions

When the Arm core generates an exception, it will pause the execution of the software and perform the following actions:

  • The program counter (PC) is branched into an exception vector address.
  • The exception level can be changed.

We can find assembly instructions at the exception vector address. In practice, these instructions are called exception handlers. At the software level, we can say that when an exception occurs, PC jumps to the exception vector address, and the exception handler runs.

Types of exception

Like other CPU architectures, Armv8-A defines exceptions, including synchronous, IRQ, FIQ, and SError exceptions. These four exceptions can be categorized into two types: synchronous exceptions and asynchronous exceptions. A synchronous exception can be generated while the Arm core...

Summary

In this chapter, we learned about the basic concepts of the Armv8-A architecture.

First, we studied Arm architecture and the different types of Arm processors. It is important to understand the Arm processor family and the architecture version when selecting the correct debugging tool.

Next, we learned about registers, including general-purpose registers, special registers, and system registers. We also looked at AAPCS, which is a rule that explains how function calls work. Both the registers and AAPCS are important when you do reverse engineering with binary files.

Then, we covered exception levels and exception handling. These help you understand how software architecture works and give you a better overall picture of the system. This chapter has given you the basic background knowledge you need to start reverse engineering.

In the next chapter, we will learn about ELF, which is important when analyzing various binaries in reverse engineering.

Join our...

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Master key aspects of Armv8-A, including register, exception handling, and TrustZone
  • Build new reversing skills for kernel binaries, such as *.ko and vmlinux, for firmware analysis
  • Understand Armv8-A's latest security features
  • Purchase of the print or Kindle book includes a free PDF eBook

Description

Unlock the secrets hidden in binary code without needing the source! Written by a Linux kernel engineer and author with over 14 years of industry experience, this book lays a solid foundation in reverse engineering and takes you from curious analyst to expert. You’ll master advanced techniques to dissect kernel binaries, including kernel module files, vmlinux, and vmcore, giving you the power to analyze systems at their core. This practical, three-part journey starts with the essentials of reverse engineering, introducing the key features of Armv8-A processors and the ELF file format. The second part walks you through the reverse-engineering process, from Arm environment setup to using static and dynamic analysis tools, including innovative methods for analyzing kernel binaries and the powerful debugging tool uftrace. The final part covers security, exploring TrustZone and the latest security techniques to safeguard Arm devices at the hardware level. By the end of this reverse engineering book, you'll have comprehensive Armv8-A expertise and the practical skills to analyze any binary with confidence while leveraging advanced security features to harden your systems.

Who is this book for?

This book is for professionals and enthusiasts interested in reverse engineering and debugging on Armv8-A-based devices. It is especially useful for system software engineers, security consultants, and ethical hackers expanding their binary analysis expertise. To get the most out of this book, you should have a basic understanding of the C programming language. Familiarity with computer architecture, Linux systems, and security concepts will be a definite advantage.

What you will learn

  • Understand the organization of Arm assembly instructions
  • Disassemble assembly code without using C code
  • Work with reverse engineering tools, such as GDB and binary utility
  • Apply reversing techniques for both user space and kernel binaries
  • Get to grips with static and dynamic binary analysis processes
  • Get a solid understanding of the powerful debugging tool, uftrace
  • Analyze TrustZone and the advanced security features provided by Armv8-A

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Aug 14, 2025
Length: 446 pages
Edition : 1st
Language : English
ISBN-13 : 9781835082584
Category :
Concepts :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Aug 14, 2025
Length: 446 pages
Edition : 1st
Language : English
ISBN-13 : 9781835082584
Category :
Concepts :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just Mex$85 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just Mex$85 each
Feature tick icon Exclusive print discounts

Table of Contents

21 Chapters
Part I: Fundamentals of Armv8-A Architecture Chevron down icon Chevron up icon
Learning Fundamentals of Arm Architecture Chevron down icon Chevron up icon
Understanding the ELF Binary Format Chevron down icon Chevron up icon
Manipulating Data with Arm Data Processing Instructions Chevron down icon Chevron up icon
Reading and Writing with Memory Access Instructions Chevron down icon Chevron up icon
Controlling Execution with Flow Control Instructions Chevron down icon Chevron up icon
Part II: Background Knowledge for Binary Analysis Chevron down icon Chevron up icon
Introducing Reverse Engineering Chevron down icon Chevron up icon
Setting Up a Practice Environment with an Arm Device Chevron down icon Chevron up icon
Unpacking the Kernel with Linux Fundamentals Chevron down icon Chevron up icon
Part III: Unlocking Key Binary Analysis Skills for Reverse Engineering Chevron down icon Chevron up icon
Understanding Basic Static Analysis Chevron down icon Chevron up icon
Going Deeper with Advanced Static Analysis Chevron down icon Chevron up icon
Analyzing Program Behavior with Basic Dynamic Analysis Chevron down icon Chevron up icon
Expert Techniques in Advanced Dynamic Analysis Chevron down icon Chevron up icon
Tracing Execution with uftrace Chevron down icon Chevron up icon
Part IV: Security Features in Armv8-A Systems Chevron down icon Chevron up icon
Securing Execution with Armv8-A TrustZone Chevron down icon Chevron up icon
Building Defenses with Key Security Features of Armv8-A Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.

Modal Close icon
Modal Close icon