Bad Byte

Tl;dr

An easy machine from tryhackme that covers basic port scanning, cracking ssh passwords, ssh port forwading

e10efbdae42b02a75d412d843705cb56

Reconnaissance

  • I've used rustscan for the scan

Questions

  • How many ports are open?

2

  • What service is running on the lowest open port?

ssh

  • What non-standard port is open?

30024

  • What service is running on the non-standard port?

ftp

Foothold

  • Rustscan detected that anonymous login was enabled in FTP

  • Geting all the files [ mget* ]

  • Get username and password

Questions

  • What username do we find during the enumeration process?

errorcauser

  • What is the passphrase for the RSA private key?

cupcake

Port Forwarding

  • Create a SSH port forward

  • Now run proxychains and nmap to get internal ports information

  • Now connect the internal ports via ssh

Questions

  • What main TCP ports are listening on localhost?

80,3306

  • What protocols are used for these ports?

http,mysql

Web Exploitation

  • Scan port 80

  • Enumeration

  • ABOUT DUPLICATOR VULN : https://www.exploit-db.com/exploits/50420

  • Duplicator is basically LFI

127.0.0.1/wp-admin/admin-ajax.php?action=duplicator_download&file=../../../../../../../../etc/passwd

User shell

Questions

  • What CMS is running on the machine?

wordpress

  • What is the CVE number for directory traversal vulnerability?

CVE-2020-11738

  • What is the CVE number for remote code execution vulnerability?

CVE-2020-25213

  • What is the name of user that was running CMS?

cth

-What is the user flag?

THM{227906201d17d9c45aa93d0122ea1af7}

Privilege Escalation

  • The old password was stored in cat /var/log/bash.log : [ G00dP@$sw0rd2020 ]

Questions

  • What is the user's old password?

G00dP@$sw0rd2020

  • What is the root flag?

THM{ad485b44f63393b6a9225974909da5fa}

Last updated