% Abstract This thesis presents methods for intercepting and manipulating function calls in Linux systems, with a focus on supporting automated testing of student programs in the Operating Systems course. The central contribution is the development of \texttt{intercept.so}, a shared object preloaded via the \texttt{LD\_PRELOAD} mechanism, which enables function call interception at runtime without requiring modifications to the program or its source code. The library records detailed information about function calls, including arguments, return values, and call locations, allowing precise reconstruction and analysis of program execution. Furthermore, it introduces controlled manipulation of intercepted calls---modifying arguments, forcing failures, or mocking return values---through a simple communication protocol, enabling robust automated tests of error handling and resource management. Performance evaluations show minimal overhead in practical scenarios, making the approach suitable for educational use. Compared to existing tools such as \texttt{strace} or \texttt{ltrace}, this solution offers greater flexibility by combining interception with manipulation capabilities. Overall, the approach provides a flexible and transparent foundation for automated testing of low-level C programs, improving reliability while imposing negligible runtime overhead.