HTB — Linux Fundamentals:Navigation
This is a walkthrough of a Linux fundamentals Section in HTB Academy. It is recommended that you do the module in HTB Academy to…
This is a walkthrough of a Linux fundamentals Section(Navigation) in HTB Academy. It is recommended that you do the module in HTB Academy to understand what is happening! (BTW IT’S FREE!)
In this section, we will be using openvpn to connect to the HTB Academy network and then attempting the section. If you are unsure of how to connect to openvpn in HTB Academy, you can check this out:
Now, let’s get on with the section Questions:
First, we have to ssh into the machine:
— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —
First question:
[+0] What is the name of the hidden “history” file in the htb-user’s home directory?
For this, we are supposed to find the hidden “history” file in the home directory of htb-user. This is stated previously in the section. To do this, we will have to use the ls command along with -a.
Hidden directories start with . so -a will list the hidden required file:
Or we could use grep if the home directory has too many files.
— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —
[+1] What is the index number of the “sudoers” file in the “/etc” directory?
For this, we know we can use ls to list the file by doing ls /etc/sudoers/. But we don’t know how we can use ls to list the files along with their index numbers. Let’s use the help option to see how we can list their index numbers:
On scrolling below, I found the argument required:
So, the answer to the question is: