Fowsniff CTF

Date: 17, June, 2021

Author: Dhilip Sanjay S


Click Here to go to the TryHackMe room.

Nmap Scan

$ nmap -sC -sV -p- 10.10.34.85 -oN nmap.out
Starting Nmap 7.91 ( https://nmap.org ) at 2021-06-17 14:07 IST
Nmap scan report for 10.10.34.85
Host is up (0.16s latency).
Not shown: 65531 closed ports
PORT    STATE SERVICE VERSION
22/tcp  open  ssh     OpenSSH 7.2p2 Ubuntu 4ubuntu2.4 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey: 
|   2048 90:35:66:f4:c6:d2:95:12:1b:e8:cd:de:aa:4e:03:23 (RSA)
|   256 53:9d:23:67:34:cf:0a:d5:5a:9a:11:74:bd:fd:de:71 (ECDSA)
|_  256 a2:8f:db:ae:9e:3d:c9:e6:a9:ca:03:b1:d7:1b:66:83 (ED25519)
80/tcp  open  http    Apache httpd 2.4.18 ((Ubuntu))
| http-robots.txt: 1 disallowed entry 
|_/
|_http-server-header: Apache/2.4.18 (Ubuntu)
|_http-title: Fowsniff Corp - Delivering Solutions
110/tcp open  pop3    Dovecot pop3d
|_pop3-capabilities: SASL(PLAIN) TOP PIPELINING CAPA AUTH-RESP-CODE RESP-CODES UIDL USER
143/tcp open  imap    Dovecot imapd
|_imap-capabilities: more OK ID post-login IMAP4rev1 have listed capabilities Pre-login AUTH=PLAINA0001 LOGIN-REFERRALS LITERAL+ IDLE ENABLE SASL-IR
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 594.03 seconds

Information from open ports

Port 80

Fowsniff Home

Public Information

  • Twitter Profile Pwned - https://twitter.com/fowsniffcorp

  • Password dumps - https://pastebin.com/NrAqVeeX

  • Stone is the sysadmin


Cracked hashes


POP3 Login

  • Bruteforce using metasploit:

What was seina's password to the email service?

  • Answer: scoobydoo2


Email Information

Looking through her emails, what was a temporary password set for her?

  • Answer: S1ck3nBluff+secureshell


SSH

In the email, who send it? Using the password from the previous question and the senders username, connect to the machine using SSH.

  • SSH Credentials: baksteen:S1ck3nBluff+secureshell

Once connected, what groups does this user belong to? Are there any interesting files that can be run by that group?

  • Answer: cube.sh

  • Steps to Reproduce:


Root Access

  • The cube.sh is run when the shell opens up as root!

  • We can put a reverse shell in cube.sh to get root access!

  • On reconnecting using ssh, we can get a root shell using netcat:


Last updated