Tmux is a terminal multiplexer. It is used to split a single terminal in multiple terminal sessions. For instance, if we are connected to a machine via SSH, instead of opening two terminals and connecting to SSH each, we could use tmux to split the current terminal in two.

Pentester Notes ☠️


Each time we use tmux, it creates a socket. We can connect back to this socket to reconnect to the tmux session.

By default, sessions are stored in /tmp. Users can define a custom socket. If the permissions are incorrectly set on it (if they were edited), we may be able to exploit them.

$ sudo tmux -S /my/socket new -s session_name
$ sudo chown root:xxx /my/socket # misconfiguration ⚠️
$ tmux -S /my/socket             # if we are in 'xxx' => root

πŸ‘» To-do πŸ‘»

Stuff that I found, but never read/used yet.