Three small projects that move from raw 32-bit x86 system calls, through user-space process tracing, to a Linux character-device kernel module.
01-assembly-syscalls is a NASM program with a custom _start entry point.
It creates a directory and file, applies Unix permissions, obtains the current
time through int 0x80, and writes the UTC time to the file.
cd 01-assembly-syscalls
make
cat portfolio_demo/runtime.dat
make clean02-ptrace-debugger implements a compact interactive debugger for 32-bit x86
Linux programs. It supports breakpoints, sticky breakpoints, single stepping,
continuing, reading and writing memory, and changing the instruction pointer.
cd 02-ptrace-debugger
make
./dbg ./targetDebugger commands:
| Command | Action |
|---|---|
b ADDRESS |
Set a one-shot breakpoint |
bs ADDRESS |
Set a sticky breakpoint |
br |
Remove the breakpoint |
s |
Step one instruction; step over a direct call |
c |
Continue execution |
p ADDRESS |
Print one machine word |
set ADDRESS VALUE |
Replace one machine word |
eip ADDRESS |
Change the instruction pointer |
q |
Terminate the child and quit |
Use nm -n target or objdump -d -M intel target to find symbol and
instruction offsets. The debugger prints the PIE base address and accepts
either offsets or absolute addresses.
03-kernel-char-device creates /dev/joke. Commands written to the device
manage a bounded in-kernel list of strings. The module can select, delete, and
Caesar-encode entries using the Slovenian alphabet.
cd 03-kernel-char-device
make build
sudo make load
echo 'add_joke | "1234" | "Hello from kernel space"' | sudo tee /dev/joke
echo 'set_joke | 1' | sudo tee /dev/joke
cat /dev/joke
sudo make unload
make clean- 32-bit x86 development support (
gcc-multiliband 32-bit libc headers) - NASM
- GNU Make
- Linux kernel headers matching the running kernel
The assembly and debugger exercises intentionally target 32-bit x86. The kernel module should be built and loaded only in a disposable Linux virtual machine. Loading third-party kernel code can crash or compromise a host.
These programs were developed as university systems-programming coursework and reorganized as a self-contained portfolio collection. Generated binaries, submission archives, and instructor demonstration files are intentionally not included.