Course details
Binary Code Analysis
Guarantor
Language of instruction
Completion
Time span
- 14 hrs lectures
- 12 hrs pc labs
- 13 hrs projects
Assessment points
- 40 pts mid-term test (written part)
- 60 pts projects
Department
Recommended prerequisites
- Operating Systems (IOS)
- Machine Level Programming (ISU)
Fundamental literature
- Ljubuncic, I.: Linux Kernel Crash Book, 2011.
Syllabus of lectures
- Computer architectures in general, registers, implicit and explicit stack operations. The x86 and x86_64 computer architectures, common instructions. System V ABI on x86_64 architecture, red zone.
- Compilation, linking, and running code. Examples of compiler optimizations, stack optimizations (leaf and tail calls, function inlining), linker script, understanding of the Unix binary file (ELF, objdump).
- Linux crash dump analysis, DWARF debug symbols, using the crash(8) tool.
- Linux crash dump analysis, understanding kernel Oops, kernel flags, sysrq.
- Kernel process and memory management, task_struct, vmas, SLAB allocator.
- Interrupt processing, postponing work, bottom halves, softirqs and tasklets, work queues.
- Live kernel tracing (SystemTap, ftrace), locks, deadlocks and hangs and their analysis and reconstruction.
Syllabus of computer exercises
- Decomposition of an ELF binary file, decoding its sections, and code disassembling.
- Using the crash(1) tool on Linux.
- Crash dump analysis of a Linux system on the IA-32 architecture.
- Crash dump analysis of a Linux system on the AMD64 architecture.
- System tracing using SystemTap and ftrace.
- Tracing and analysis of system deadlocks.