Working with Files and Directories — Linux Fundamentals Module — HTB Walkthrough

The Malware Mender
2 min readJul 10, 2024

--

TIER 0 MODULE: LINUX FUNDAMENTALS

SECTION: Working with Files and Directories

Please open your pwnbox or connect to the vpn, and connect with ssh in order to complete the tasks.

ssh htb-student@<target-ip>
# Enter password 'HTB_@cademy_stdnt!' when asked!

If you are not registered in HTB Academy, then use this link to register now: https://referral.hackthebox.com/mzxKOJt

1. What is the name of the last modified file in the “/var/backups” directory?

First navigate to the /var/backups directory.

cd /var/backups

To see the modified file with respect to time, we use the -t flag with the ls command.

ls -t

First file’s name is the answer.

Answer: apt.extended_states.0

2. What is the inode number of the “shadow.bak” file in the “/var/backups” directory?

Mentioned in the Navigation’s Section writeup, to see the inode or index number of a file/directory, we use ls -i <filename>.

First navigate to the given path

cd /var/backups

Then, list the file with it’s index number

ls -i shadow.bak

Answer: 265293

Still Stuck? Watch Video!

☣️ HAPPY ETHICAL HACKING ☣️

DISCLAIMER: THIS CONTENT DOES NOT BELONG TO ME, I AM JUST WRITING A WALK-THROUGH OF A FREE MODULE OF HACK THE BOX ACADEMY. (WRITING WALKTHROUGHS OF FREE MODULES IS PERMITTED BY HTB ACADEMY)

The Malware Mender Walkthroughs

--

--

The Malware Mender
The Malware Mender

No responses yet