Introduction to ARM


ARM Dojo

Unlike amd64, ARM assembly (aarch64) is a RISC architecture with a small number of fast instructions. This module provides a short crash-course to get familiar with some of the key differences in aarch64. Drawing directly from the "Assembly Crash Course" module where possible to highlight differences.


Lectures and Reading

The dojo box CPU is amd64 architecture. Working with a non-native architecture has its own unique challenges.

The simplest way to interact with these challenges is with a short pwntools script. A template you can use is shown below.

#!/usr/bin/env python3
from pwn import *
context.arch = 'aarch64'

asm_bytes = asm("""
  PUT YOUR AARCH64 ASSEMBLY HERE
  """)

with process('/challenge/run') as p:
  p.send(asm_bytes)
  p.stdin.close()
  p.interactive()

Challenges

Set a register value.

Set a register to a large value.

Basic arithmetic.

Efficient arithmetic.

Perform a modulo operation.

Perform bitshift operations.

Loading and storing values.

Loading and storing pairs.

Working with the stack.

Swapping register values.

Compute a sum from an array.

Efficiently compute a sum from an array.

The branch instruction.

Write an average function.

Write a fib function.


30-Day Scoreboard:

This scoreboard reflects solves for challenges in this module after the module launched in this dojo.

Rank Hacker Badges Score