Basic Pentesting
Last updated
Last updated
10.10.41.135
Using nmap
, the following ports were discovered:
22 → SSH
(accessible)
80 → HTTP
(web service available)
139 → NetBIOS
445 → SMB
Accessed the website via a browser.
Checked the page source and found a hint about a hidden directory.
Used gobuster to discover hidden directories:
Hidden directory found: development
Enumerating users using enum4linux:
- Found two users on the system
The first user: jan
Brute-forcing SSH password using Hydra:
Discovered password: armando
Service used to access the server: SSH
1. System Enumeration using linPEAS
Transferred linpeas.sh
to the target machine:
Found another user: kay
, but lacked permissions to access their files.
2. Gaining Root Access
Inside kay
's home directory, an RSA private key was found:
Converted the RSA key to a hash format using ssh2john
:
Cracked the password using John the Ripper:
Discovered password: beeswax
3. Switching to Kay’s User Account
Changed the permissions for the RSA key:
Used the key to log in as kay
:
Confirmed user: kay
Found the final flag inside pass.bak
:
Flag: heresareallystrongpasswordthatfollowsthepasswordpolicy$$
The key was password-protected, so it needed to be cracked.