Brute It

Date: 10, June, 2021

Author: Dhilip Sanjay S


Reconnaissance

  • Run Nmap Scan

$ nmap -sC -sV 10.10.151.107 -oN nmap.out
Starting Nmap 7.91 ( https://nmap.org ) at 2021-06-10 14:20 IST
Nmap scan report for 10.10.151.107
Host is up (0.17s latency).
Not shown: 998 closed ports
PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 7.6p1 Ubuntu 4ubuntu0.3 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey: 
|   2048 4b:0e:bf:14:fa:54:b3:5c:44:15:ed:b2:5d:a0:ac:8f (RSA)
|   256 d0:3a:81:55:13:5e:87:0c:e8:52:1e:cf:44:e0:3a:54 (ECDSA)
|_  256 da:ce:79:e0:45:eb:17:25:ef:62:ac:98:f0:cf:bb:04 (ED25519)
80/tcp open  http    Apache httpd 2.4.29 ((Ubuntu))
|_http-server-header: Apache/2.4.29 (Ubuntu)
|_http-title: Apache2 Ubuntu Default Page: It works
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

How many ports are open?

  • Answer: 2

What version of SSH is running?

  • Answer: OpenSSH 7.6p1

What version of Apache is running?

  • Answer: 2.4.29

Which Linux distribution is running?

  • Answer: Ubuntu

What is the hidden directory?

  • Answer: /admin

  • Steps to Reproduce:


Getting a shell

Admin Login Page

What is the user:password of the admin panel?

  • Answer: admin:xavier

  • Steps to Reproduce:

    • Using Hydra to bruteforce the password:

Admin Panel

What is John's RSA Private Key passphrase?

  • Answer: rockinroll

  • Steps to Reproduce:

    • Copy the RSA private key and change the file permission to 600

    • Use ssh2john for bruteforcing with john.


user.txt

  • Answer: THM{REDACTED}

  • Steps to Reproduce:


Web flag

  • Answer: THM{brut3_f0rce_is_e4sy}

  • Steps to Reproduce:

    • Once you login with the admin credentials, you can find the Web Flag.


Privilege Escalation

Find a form to escalate your privileges.

  • cat can be used to escalate the privilege.


What is the root's password?

  • Answer: football

  • Steps to Reproduce:

  • sudo cat the /etc/shadow file to get the hash of root user:

  • Crack the hash using john or hashcat:


root.txt

  • Answer: THM{REDACTED}

  • Steps to Reproduce:


Last updated