Hackthebox Linux Fundamentals
Find out the machine hardware name.
Using “uname -m” to find the machine hardname. See more options with “uname — help” command.
What is the path to htb-student’s home directory?
To find htb-student’s home directory, ‘pwd’ (present working directory) command is used. Other alternative command can be used as well.
What is the path to the htb-student’s mail?
‘env’ command give the full path of file and directory. In previous question, this command can be used as well.
Which shell is specified for the htb-student user?
Same command as be question gives the output of this question as well.
Which kernel version is installed on the system? (Format: 1.22.3)
As said in the 1st question, ‘uname -r’ command give the version of the kernel.
What is the name of the network interface that MTU is set to 1500?
‘ifconfig’ command shows all the interface and here name of the network interface that MTU is set to 1500 is ‘ens192’.
What is the name of the hidden “history” file in the htb-user’s home directory?
Simply doing ls -la shows all the directories and files in the folder. Here the hidden “history” file is .bash_history. ‘.’ indicates the hidden files and directories.
What is the index number of the “sudoers” file in the “/etc” directory?
To find the index number of any file, simply add a flag ‘-i’ to the list and then file name or path of the file. As shown below:
What is the name of the last modified file in the “/var/backups” directory?
What is the inode number of the “shadow.bak” file in the “/var/backups” directory?
What is the name of the config file that has been created after 2020–03–03 and is smaller than 28k but larger than 25k?
How many files exist on the system that have the “.bak” extension?
Submit the full path of the “xxd” binary.
How many files exist on the system that have the “.log” file extension?
How many total packages are installed on the target system?
How many services are listening on the target system on all interfaces? (Not on localhost and IPv4 only)
Determine what user the ProFTPd server is running under. Submit the username as the answer.
Use the “systemctl” command to list all units of services and submit the unit name with the description “Load AppArmor profiles managed internally by snapd” as the answer.
What is the type of the service of the “syslog.service”?