Filter Contents

Hack The Box Academy Module: Linux Fundamentals

The section Filter Contents belongs to Linux Fundamentals module.

Don't know how to connect to HTB VPN? Click here.

How many services are listening on the target system on all interfaces? (Not on localhost and IPv4 only)

Open a terminal and use netstat to find the listening services on all interfaces:

netstat -tln | grep -v tcp6 | grep -v "127.0.0." | grep LISTEN | wc -l

Determine what user the ProFTPd server is running under. Submit the username as the answer.

To check the username, use the ps command:

ps aux | grep proftpd

The first word of the output is the username.

Use cURL from your Pwnbox (not the target machine) to obtain the source code of the "https://www.inlanefreight.com" website and filter all unique paths ("https://www.inlanefreight.com/directory" or "/another/directory") of that domain. Submit the number of these paths as the answer.

Use the curl command to get the code then filter it via tr and grep:

curl https://www.inlanefreight.com | tr " " "\n" | grep -Eo "https://www.inlanefreight.com[^\"']*" | sort -u | wc -l

The -E flag for grep used to tell that it is going to use Enhanced RegEx.

Join HTB Academy (Get 20 Cubes Free)

Join Now