Skip to main content

Enumeration

Run Nmap Scan

View Website

Untitled

Directory Bruteforcing (Run Gobuster)

Finding Hidden Server Information from X-Backend-Server

Untitled

Updating Server Information

We are going to include the hostname information to /etc/hosts

Office.Paper

Untitled Looking at the bottom, the web application is made up of Wordpress

Reading Posts

Untitled Here Nick said to remove the secret content, which I believe is the private post in Wordpress.

Looking for Wordpress Exploit

Using CVE-2019-17671 Exploit

We found some interesting wordpress vulnerability that we might exploit.
Proof of Concept for Wordpress up to 5.2.3 viewing unauthenticated posts CVE-2019-17671 According to the website we can route to this link to view all the post including the private one.

Viewing all the Post using the exploit

Untitled Here is the private invitation link for the chat system.

Adding the Hostname to /etc/hosts

Exploitation

Rocket.chat

Untitled

Login to the chat with the registered credentials

Untitled

Logging into the chat

Untitled Click the Directory Icon Untitled Click “# General”

Viewing the Chat

Untitled Untitled Here the user “kellylikescupcakes” tells that we can send DM to the bot, which we can use to exploit

DM to the Recyclops Bot

Trying Command Injection

Untitled Unfortunately, Recyclops Bot didn’t let me use the OS command

Viewing various files within the Default Directory

Untitled Untitled We didn’t find any important information here

Viewing /etc/passwd

Untitled Untitled Here we know that recyclops bot is running with the permission of the user, as we know that there is no user named “recyclops”.

Finding the Credentials

Untitled Some of the important files are not allowed to be viewed. However, bot_restart.sh are! Untitled Here, to check if the error occurred in the bot, it is going to log to /home/dwight/hubot/.hubot.log

Checking Hubot Directory

Untitled Enumerating files, I found the credentials of the user Untitled

Exploit using SSH

Privilege Escalation

Enumerating Exploit Information

Checking Kernel Information

It’s using RHEL8 with Linux Kernel 4.18.0

Linpeas Exploit Information

Process Information

Polkitd is running in root privilege and the system is using RHEL8 which is vulnerable to Polkit Privilege Escalation

Exploit using CVE-2021-3560

https://github.com/secnigma/CVE-2021-3560-Polkit-Privilege-Esclation

Viewing Credentials Generated for Exploitation

Untitled According to the github code,

Exploit

It takes few executions to exploit. The user disappears frequently, but eventually it will work!

Reference