TTY Logging with BPF
From EDURange
See https://github.com/edurange/demo-bpf-tty-logger.
Demonstrates how to capture TTY activity using BPF kernel probes.
Instructions
To run it one needs to have superuser privileges (for kernel access). The probes intercept all TTY activity on the host system - both inside and outside of containers. If the script is printing to a TTY device the prints will also be observed, creating a feedback loop that will quickly consume the kernel buffers. As such the output should be redirected to a file. I recommend redirecting both STDOUT and STDERR as follows:
sudo python3 parrotty.py &> log