To access material, start machines and answer questions login.
tmux, the terminal multiplexer, is easily one of the most used tools by the Linux community (and not just pentesters!). While not a malicious tool, tmux makes running simultaneous tasks throughout a pentest incredibly easy. In this primer room, we'll walk through the process of installing and using some of the most common key combinations used in tmux. (Note, the installation process in this is geared towards Kali/Ubuntu.)
You can do this room either via the AttackBox/Kali machine provided by TryHackMe or with your own Kali machine! All of the commands for the questions will be done on your machine. The machine attached to this room is purely for scanning/demo purposes. - Dark
Link to the above cheat sheet: Link
Original credit for the cheat sheet goes to Linux Academy
For another excellent resource on learning tmux, check out IppSec's video: Link
-----------------------------
Enjoy the room! For future rooms and write-ups, follow @darkstar7471 on Twitter.
First things first, let's go ahead and install tmux. This can be done on Ubuntu/Kali with the command: apt-get install tmux
Once tmux is installed, let's launch a new session. What command do we use to launch a new session without a custom name?
All tmux commands start with a keyboard button combination. What is the first key in this combination?
How about the second key? Note, these keys must be pressed at the same time and released before pressing the next target key in the combination.
Lets go ahead and detach from our newly created tmux session. What key do we need to add to the combo in order to detach?
Well shoot, we've detached from our session. How do we list all of our sessions?
What did our session name default to when we created one without a set name?
Now that we've found the name of our session, how do we attach to it?
Let's go ahead and make a new window in this session. What key do we add to the combo in order to do this?
Run the following scan against the VM: nmap -sV -vv -sC TARGET_IP
Whew! Plenty of output to work with now! If you work with a relatively small terminal like me, this output might not all fit on screen at once. To fix that, let's enter 'copy mode'. What key do we add to the combo to enter copy mode?
Copy mode is very similar to 'less' and allows up to scroll up and down using the arrow keys. What if we want to go up to the very top?
How about the bottom?
This window we're working in is nice and all but I think we need an upgrade. What key do we add to the combo to split the window vertically?
How about horizontally?
We can now move between these panes using the key combo and arrow keys, try it out!
We can also resize these panes by holding down the key combo and pressing the arrow keys, try it out now!
Say one of these newly minted panes becomes unresponsive or we're just done working in it, what key do we add to the combo to 'kill' the pane?
Last but not least, how do we spawn a named tmux session named 'neat'?
Created by
Room Type
Free Room. Anyone can deploy virtual machines in the room (without being subscribed)!
Users in Room
34,853
Created
2039 days ago
Ready to learn Cyber Security? Create your free account today!
TryHackMe provides free online cyber security training to secure jobs & upskill through a fun, interactive learning environment.
Already have an account? Log in