TAS
A tiny framework for easily manipulate the tty and create fake binaries.
How it works?
The framework has three main functions, tas_execv, tas_forkpty, and tas_tty_loop.
tas_execv: It is a function similar to execv, but it doesn’t re-execute the current binary, something very useful for creating fake binaries.
tas_forkpty: Is the same as forkpty, but it fills a custom structure, check forkpty man page for more details.
tas_tty_loop: here is where the manipulation of the tty happen, you can set a hook function for the input and output, so it is possible to store the keys typed by the user or manipulate the terminal output. (see leet-shell).
This is a superficial overview, check the codes in tas/fakebins/fun folders to understand how it really works.