-
Initial NoSQL injection attempts using standard form data were unsuccessful. I then changed the Content-Type to application/json and sent a JSON-formatted request:
{
"username":"admin",
"password":"admin"
}
-
Although authentication failed, the application accepted the request format.
-
By injecting malformed NoSQL payloads, I triggered error messages that leaked a filesystem path: /home/jaeger, confirming the existence of a system user named jaeger.
-
I continued testing NoSQL injection payloads and successfully bypassed authentication using the following payload in the username field (with any password):
-
After authentication, the application displayed a product list and a user search feature.
-
Searching for users revealed that:
- The
admin user existed, but its MD5 hash could not be cracked.
- By abusing the same NoSQL injection logic, I was able to enumerate all users.
-
This revealed a user named josh along with an MD5 password hash.
-
I cracked the hash using Hashcat:
hashcat -m 0 6ebXXXXXXXXXXX995 /usr/share/wordlist/rockyou.txt
- This recovered the plaintext password for the user josh.
mattermost.shoppy.htb
-
To identify the Mattermost version, I accessed the following endpoint:
http://mattermost.shoppy.htb/api/v4/config/client?format=old
-
This confirmed the version as Mattermost 7.1.2.
-
Using Josh’s credentials, I logged into the Mattermost instance. While reviewing the available channels, I found sensitive credentials for the user jaeger posted in the Deploy machine channel.
-
Since jaeger was a valid system user, I attempted SSH authentication:
- This granted shell access and allowed me to retrieve the user flag.