Tmux #
Tmux is a terminal multiplexer. It allows multiple terminal sessions to be accessed simultaneously in a single window.
The most interesting feature is that Tmux decouples the programs we run from the main terminal, protecting them from accidentally disconecting. This means that if our terminal crashes or we close it by mistake, the session is still running in the background and we can then later reattach to it.
Out of the box, however, Tmux can be a little difficult to use; it’s configuration might be a little clunky and it wouldnt display any information in it’s bar. This is why Malbian ships it’s own configuration for Tmux and it looks like this:
The Status bar #
Malbian’s bar display different information. On the left-hand side we have the display of the Session, Host-name and LAN ip addres of our Malbian box.
The center part of the bar would show our Windows. It will display the selected window with a special icon and color. To change the name of our window, we can use PREFIX + $
. We can alo zoom in a pane with PREFIX + z
and the bar would diplay an icon to tell us that we are zoomed in.
Finally, the right-hand side will display a leaf icon that would change color when we enter our prefix key, our internet status, host connectivity, vpn status and our target.
This information is useful to make sure we don’t have internet connectivity while analyzing malware, assuring that we can’t reach our main host, vpn status if any and the setting of a target that most of the time is just the FlareVM Ip address. This is useful so we don’t have to constantly check for this information.
Note: Change’s might be need to be done to the IP addres in ~/.local/bin/homestatus to target your router.
To set a target we can run the command settarget "<IP or domain>"
in the terminal. For example:
To clear the target, we can just simply run the command clstarget
in our terminal.
Shortcuts & Configurations #
Malbian’s tmux configuration can be found in ~/.config/tmux/tmux.conf in this configuration file you will encounter all the different shortcuts that have been added/changed and you can undo the changes or make your own.
Common Shortcuts:
PREFIX: Control + s
New-Window: PREFIX + enter
Split-Window (V) - PREFIX + -
Split-Window (H) - PREFIX + '
Swap-Window (L) - PREFIX + {
Swap-Window (R) - PREFIX + }
Previous-Window: PREFIX + ,
Next-Window: PREFIX + .
Kill-Window: PREFIX + W
Kill-Pane: PREFIX + w
Display-Panes: PREFIX + #
Select-Pane: Control + arrows
Select-Pane: PREFIX + h,j,k,l
Select-Next-Pane: PREFIX + n
Select-Previous-Pane: PREFIX + p
Rotate-Pane (CCW): PREFIX + Control + n
Rotate-Pane (CW): PREFIX + Control + p