In this course we focus on low-level system programming principles. The labs are based on interaction with the LINUX operating system, mostly using C, but also some assembly language. Issues covered in the course are:
- Processes, memory models, and interaction with the operating system.
- A programmer’s introduction to C: storage types, pointers, structures.
- The raw machine: basics of (x86) assembly language, linking to functions written in C.
- Direct system calls: a programmer’s interface with system services.
- User’s view of the Linux file system, processes, and access permissions.
- Command interpreters: Unix “shell”.
- “Binary” files: formats, manipulation.
- The ELF format, linking and loading.
Lab goals:
- C primer
- Parsing command-line arguments
- Undestanding character (ASCII) and hexadecimal encodings
- Implementing a debug mode for your program
- Introduction to standard streams (stdin, stdout, stderr)
- Simple stream IO library functions
Lab goals:
- C primer - continued.
- Understanding storage addresses, introduction to pointers.
- Pointers to basic data types, to structures, and to functions.
- Simulating object-like behavior in C.
Lab goals:
- Pointers and dynamically allocated structures and the valgrind utility.
- Understanding data structures: linked lists in C.
- Basic access to "binary" files, with application: simplified virus detection in executable files.
Lab goals:
- To get acquainted with the low-level interface to system calls.
- To understand how programs can work without the standard library.
- Basics of directory listings, through a first attempt at executable file viruses.
- Debugging programs via printouts (the idea of debug mode, continued).
Lab goals:
- get acquainted with command interpreters ("shell") by implementing a simple command interpreter.
- Understand how Unix/Linux fork() and exec() work.
- Intruduction to Linux signals.
Lab goals:
- To enrich the set of capabilities of your shell by implementing input/output redirection and pipelines. The shell will then be able to execute non-trivial commands such as "tail -n 2 in.txt| cat > out.txt", demonstrating the power of these simple concept.
Lab goal:
- Learn awk syntax, records, fileds, line Separator and the overall picture of the awk command.
Lab goals:
- Learn how to manipulate ELF files by writing a simplified version of the readelf program.
- Parsing the ELF file and extract useful information from it.
- Access the data in the section header table, and in the symbol table.
- Learn to use the mmap system call.
Lab goal:
- In this lab, You are requested to write and run Proto program which will attach itself to executable files and infect them.