CSE 598 AVR - Fall 2024

Introduction to ARM

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.

15 challenges

General Tips

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()

Helpful Resources

CHALLENGE 01

Level1

— solves

Set a register value.

CHALLENGE 02

Level2

— solves

Set a register to a large value.

CHALLENGE 03

Level3

— solves

Basic arithmetic.

CHALLENGE 04

Level4

— solves

Efficient arithmetic.

CHALLENGE 05

Level5

— solves

Perform a modulo operation.

CHALLENGE 06

Level6

— solves

Perform bitshift operations.

CHALLENGE 07

Level7

— solves

Loading and storing values.

CHALLENGE 08

Level8

— solves

Loading and storing pairs.

CHALLENGE 09

Level9

— solves

Working with the stack.

CHALLENGE 10

Level10

— solves

Swapping register values.

CHALLENGE 11

Level11

— solves

Compute a sum from an array.

CHALLENGE 12

Level12

— solves

Efficiently compute a sum from an array.

CHALLENGE 13

Level13

— solves

The branch instruction.

CHALLENGE 14

Level14

— solves

Write an average function.

CHALLENGE 15

Level15

— solves

Write a fib function.