Share E-Book
Scan to open this page

Scan with your phone to open this page

Author: Kim Austin

Rating No ratings yet

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.

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

AI guide
【One-Line Pitch】 A hands-on path from Armv8-A assembly fundamentals to kernel, firmware, and TrustZone binary analysis, aimed at engineers who want to read and debug Arm systems without source code. Best for embedded, kernel, and security practitioners with some C and Linux background. 【Book Arc】 - **Opening (~0%–10%)**: Frames the whole journey and the author's kernel-engineering background, then lays the Armv8-A groundwork — general-purpose and special registers, exception levels EL0–EL3, and the AAPCS calling convention. - **Early (~10%–32%)**: Builds the binary-analysis vocabulary: data processing, memory access, and flow control instructions, plus the ELF format (headers, sections, program headers) and why ELF literacy underpins debugging and crash analysis. - **Middle (~32%–50%)**: Moves from instruction-level reading to reconstructing C from assembly — bit shifts, logical operations, comparisons, branches, and conditional codes — using worked examples like state-bit checks and buffer overflow cases. - **Late (~50%–80%)**: Shifts into the reverse-engineering process itself: setting up an Arm practice environment (Raspberry Pi or QEMU), static and dynamic analysis tooling, and kernel-binary targets such as kernel modules, vmlinux, and vmcore. - **Ending (~80%–100%)**: Covers advanced dynamic analysis (KDUMP, the Crash utility, uftrace) and security, including TrustZone and hardware-level hardening for Arm devices. 【Key Takeaways】 - **Exception levels are the spine of Armv8-A analysis** (Opening): EL0–EL3, per-level stack pointers, and SVC/HVC/SMC transitions explain how user, kernel, hypervisor, and secure worlds interact — essential before reading any system binary. - **Calling conventions decode function boundaries** (Early): AAPCS rules for argument passing and return addresses let you recognize where one function ends and another begins in stripped code. - **ELF structure is the map for every binary you analyze** (Early): Header fields, section types (SHT_PROGBITS, SHT_SYMTAB, SHT_RELA), and program headers tell you where code, symbols, and relocations live — and enable repairing corrupted core dumps. - **Assembly-to-C reconstruction is a learnable skill** (Middle): Bit-shift, logical, and comparison instructions map predictably onto C expressions, so patterns like `state &= ~FLAG` become readable once you know the idioms. - **Branches and conditional codes reveal program logic** (Middle): B, BL, and TST/CMP with PSTATE condition flags expose control flow, which is how you recover if/else and function calls from raw instructions. - **Kernel binaries need specialized tooling** (Late): vmlinux, kernel modules, and vmcore demand different approaches than user-space binaries; KDUMP and the Crash utility are the entry points. - **Dynamic analysis complements static reading** (Late): uftrace and debugger-driven workflows catch runtime behavior that static disassembly alone misses. - **TrustZone extends analysis into hardware security** (Ending): Understanding secure-world boundaries is necessary to assess how Arm devices are hardened at the hardware level. 【Reading Tips】 - Deep-read the Armv8-A fundamentals and ELF chapters — everything later assumes fluency with registers, exception levels, and binary layout. - Skim the instruction-by-instruction walkthroughs once you grasp the patterns; return to them as reference while analyzing real binaries. - Set up the practice environment (Raspberry Pi or QEMU) early and reproduce the book's examples rather than reading passively. - Treat the kernel and TrustZone sections as the payoff: budget extra time for vmcore/Crash and uftrace, which are the least familiar tools for most readers. - Keep a running notes file mapping assembly idioms to C equivalents; this becomes your personal reverse-engineering cheat sheet. 【Coverage Limits】 The excerpts cover the book's structure, Armv8-A fundamentals, ELF, instruction categories, and high-level mentions of kernel/TrustZone tooling, but do not include detailed content from the TrustZone or advanced security chapters, nor full worked examples from the kernel-binary analysis sections.
Page 9
ply Generic Kernel Image (GKI) support to the Exynos kernel. His expertise spans kernel bring-up, memory management, platform integration, and upstream contr...
View in text
Excerpt 2
terms, which have the same meaning. Register used for AAPCS As discussed in the previous section, we know that general-purpose registers are used to store in...
View in text
Excerpt 3
ted in the related header file: // include/uapi/linux/elf.h #define DT_NULL 0 #define DT_NEEDED 1 #define DT_PLTRELSZ 2 #define DT_PLTGOT 3 #define DT_HASH 4...
View in text
Excerpt 4
nstruction with offset addressing mode As shown in Figure 4.3, the <Xn> register holds the base address in memory. Therefore, <Xn> is referred to as the base...
View in text
Excerpt 5
t you do in reverse engineering. By learning about reverse engineering, you will improve your debugging skills and learn how to resolve more difficult proble...
View in text
Excerpt 6
the Linux kernel operates. The virtual addresses accessed in EL1 are translated using the page table linked to the TTBR1_EL1 register. Kernel space virtual a...
View in text
Excerpt 7
Static Analysis Why is it important to analyze *.ko files? As a product developer or DevOps engineer, you may frequently need to gather and install multiple...
View in text
Excerpt 8
: Decimal • o: Octal • t: Binary • c: Character • s: String • i: Instructions (disassembled) • size: The unit size that GDB reads from memory. • address: Spe...
View in text
Tags
AI categories
CybersecurityProgramming LanguageOS
Publish Year: 2025
Language: English
File Format: PDF
File Size: 7.7 MB
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Generating text preview…