This document discusses shellcode and system calls. It provides an overview of protection rings, syscalls, assembler, and other topics needed to understand writing shellcode. It then demonstrates how to write simple shellcode that uses the exit syscall to terminate a program. More complex shellcode is discussed that uses fork and execve syscalls to spawn a shell process upon execution, allowing an attacker to gain an interactive shell. The key steps of writing shellcode are outlined.