🟒paper

Recon & Enum

Port scan

PORT    STATE SERVICE  VERSION
22/tcp  open  ssh      OpenSSH 8.0 (protocol 2.0)
80/tcp  open  http     Apache httpd 2.4.37 ((centos) OpenSSL/1.1.1k mod_fcgid/2.3.9)
443/tcp open  ssl/http Apache httpd 2.4.37 ((centos) OpenSSL/1.1.1k mod_fcgid/2.3.9)

Directory scan

/.html                (Status: 403) [Size: 199]
/manual               (Status: 301) [Size: 235] [--> http://10.10.11.143/manual/]
/.html                (Status: 403) [Size: 199]

Website (80) and (443)

Both port has same HTTP Server Test Page , also cant found something useful in /maual directory

Burp Suite Enumeration

Although both port show same page {HTTP Server Test Page} , here i found something different :- while checking the response for both ports , i found that the home page is forbidden on both ports other thing i noticed that if u intercept the request for port it give you an extra header in response "X-Backend-Server" , it reveals the site name

HTTP/1.1 403 Forbidden
Date: Fri, 05 May 2023 13:43:30 GMT
Server: Apache/2.4.37 (centos) OpenSSL/1.1.1k mod_fcgid/2.3.9
X-Backend-Server: office.paper
Last-Modified: Sun, 27 Jun 2021 23:47:13 GMT
ETag: "30c0b-5c5c7fdeec240"
Accept-Ranges: bytes
Content-Length: 199691
Connection: close
Content-Type: text/html; charset=UTF-8

Subdomain enumeration

now we can add both domains , in /etc/hosts and enumerate more

http://office.paper

the https website showing the same HTTP Server Test Page , so we moved to port 80 website THE website looks like that and their are articles on the web page as well as , their is word-press running on website ..... we will enumerate it later on

After looking sometime and browsing a little i found something weird , but eye catching

http://chat.office.paper

On the page , their is login page running with rocket.chat but if look closely their is also something noticable under the LOGIN BUTTON it says "Registration can only be done using the secret registration URL!"

Vulnerability in wordpress

wp-scan

we got 48 vulnerability , but based on above research i though this work best for us :-

Explanation

As per of above research their is mail from nick which says "Michael, you should remove the secret content from your drafts ASAP, as they are not that secure as you think!" so it indicates that- michael stores secret content in his drafts we also find a wordpress vulnerability which allow us to view draft {unauthenticated}

POC

we got the secret url ,

shell as dwight

On the website , their is only chats between some people what makes it exiting ? their is a discusion about a bot who is made by "dwight" and can perform some actions and run some commands ,

i try to read user flag , but no success.....says permission denied After enumerating a bit , i found a ".env" file in " /home/dwight/hubot/ " which contains password :- Queenofblad3s!23

I thought this bot is made by "dwight" , so its worth to give ssh a shot and BOOM.....got the shell

privesc dwight => root

linpeas.sh

i found the machine is vulnerable to CVE-2021-3650

exploit :-

explanation :-

we got the shell as root

Last updated