File Descriptors and Redirections — Linux Fundamentals Module — HTB Walkthrough

The Malware Mender
1 min readJul 11, 2024

--

TIER 0 MODULE: LINUX FUNDAMENTALS

SECTION: File Descriptors and Redirections

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. How many files exist on the system that have the “.log” file extension?

To find the files we use the find command.

find / -type f -name *.log 2>/dev/null | wc -l

Where wc -l will count the output lines.

Answer: 32

2. How many total packages are installed on the target system?

To perform this task we will take help from apt which is a package manager in Linux.

apt list --installed | grep -c "installed"

The command grep -c counts only the lines which contain the word ‘installed’.

Answer: 737

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