Recon

└─$ sudo nmap -Pn -sCV --open -p- -min-rate 10000 -oN Nmap/Initial-Codo -vvv Codo 

Using Nmap we started our initial recon

Output

# Nmap 7.94SVN scan initiated Sun Jun 30 21:52:40 2024 as: nmap -Pn -sCV --open -p- -min-rate 10000 -oN Nmap/Initial-Codo -vvv Codo
Nmap scan report for Codo (192.168.223.23)
Host is up, received user-set (0.090s latency).
Scanned at 2024-06-30 21:52:40 EDT for 26s
Not shown: 65533 filtered tcp ports (no-response)
Bug in http-generator: no string output.
Some closed ports may be reported as filtered due to --defeat-rst-ratelimit
PORT   STATE SERVICE REASON         VERSION
22/tcp open  ssh     syn-ack ttl 61 OpenSSH 8.2p1 Ubuntu 4ubuntu0.7 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey: 
|   3072 62:36:1a:5c:d3:e3:7b:e1:70:f8:a3:b3:1c:4c:24:38 (RSA)
| ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDFR/u8yZrrxkDWw/8gy/fNFksvT+QIL8O/6eD8zVxwKwgBURa9uRtOC8Dk6P+ktLwXJ9oSUitZeXVWjijbehpZBVHvywEOj9nc0bmk0+M/DGGbr1etS7cDvRzRATUtMPxQfYhzXqHlZe6Q2GfA0c75uybUXxOha8CTdK0Iv/maUUaiaPv3LGebQ4CpNaXNQfYVpCdsxLn5MxFi+tfenn/4CinBPn1Ahnx499V1G0ANTaKLsEETjqaMd5jnmml2wH1GmKfKf/6FevWv0Q9Ylsi3x/ipkDpcQAMRQ/aw5NuSSDrGTdo0wRuuoEf5Ybenp9haPVxUAPHbEcMI2hdcP5B3Cd03qimMhHEkFXE8sTUxRKHG+hg7cF8On1EXZsH1fsVyrFAAoHRrap5CsubmNXT93EcK7lc65DbKgeqls643x0p/4WOUiLXFstm6X4JCdEyhvWmnYtL3qDKMuQbCwrCJGeDjoaZTjHXbpjSxSnvtO04RT84x2t8MThyeYO3kSyM=
|   256 ee:25:fc:23:66:05:c0:c1:ec:47:c6:bb:00:c7:4f:53 (ECDSA)
| ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBNBWjceIJ9NSOLk8zk68zCychWoLxrcrsuJYy2C1pvpfOhVBrr8QBhYbJxzzGJ7DpuMT/DXiCwuLXdu0zeR4/Dk=
|   256 83:5c:51:ac:32:e5:3a:21:7c:f6:c2:cd:93:68:58:d8 (ED25519)
|_ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG3LJwn9us7wxvkL0E6EEgOPG3P0fa0fRVuJuXeASZvs
80/tcp open  http    syn-ack ttl 61 Apache httpd 2.4.41 ((Ubuntu))
|_http-server-header: Apache/2.4.41 (Ubuntu)
| http-methods: 
|_  Supported Methods: GET HEAD POST OPTIONS
| http-cookie-flags: 
|   /: 
|     PHPSESSID: 
|_      httponly flag not set
|_http-title: All topics | CODOLOGIC
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

Read data files from: /usr/bin/../share/nmap
Service detection performed. Please report any incorrect results at <https://nmap.org/submit/> .
# Nmap done at Sun Jun 30 21:53:06 2024 -- 1 IP address (1 host up) scanned in 26.21 seconds

we can see from the output that it has only 2 ports open 22 and 80


Enumeration

since port 80 is open we will use dirsearch to brute-force directories on the webserver

sudo dirsearch -u <http://Codo> -w /path/to/wordlist

Output

[22:00:08] 301 -  296B  - /admin  ->  <http://codo/admin/>                    
[22:00:21] 301 -  296B  - /cache  ->  <http://codo/cache/>                    
[22:02:19] 403 -  269B  - /server-status                                    
[22:02:24] 301 -  296B  - /sites  ->  <http://codo/sites/>                    
[22:02:35] 301 -  294B  - /sys  ->  <http://codo/sys/>

while dirsearch is running we will do some manual enumeration.

Screenshots

Untitled

Untitled

Tried the password Combo of