Lion Cipher Lab
Read ARM64 assembly by cross-compiling your own program, and map what you know from x86-64
- Foundations
- Intermediate
- ~60 min
- Free · no account required
Why it matters
ARM64 is no longer exotic. It runs most phones, Apple laptops, a growing share of cloud servers, and a huge range of routers, cameras and other embedded devices. Analysts increasingly receive a program or a firmware image and cannot assume it is for an x86 PC. The good news is that the reading skills transfer: find the arguments, find the branches and loops, find the calls. You only need a new cheat sheet for the registers and instructions. Cross-compiling your own program is the safest way to build that cheat sheet.
What you'll learn
- installing a cross-compiler and producing ARM64 code on an x86 machine
- listing the ARM64 argument, return, link and frame registers
- reading fixed-width A64 instructions: mov, add, mul, cmp, conditional branches, bl and ret
- explaining the link register and why an ARM64 function call does not push a return address
- running the program under user-mode emulation, or reading it without running at all
- recognising that the same C produces different assembly per architecture and per optimisation level
Steps in this lab
- Why a second architecture, and how this lab works
- Install the cross-compiler and build for ARM64
- Make the cheat sheet: registers
- Read scale: arithmetic and return
- Read biggest: how an if looks on ARM64
- Read sum_to and the call: loops, bl and the link register
- Disassemble the real program
- Run it under emulation, or skip running
- Turn the optimiser on and compare architectures
- Clean up
Open the full interactive lab →