Snoopy
Recon
HTTP (80)

mm is Mattermost portal, but without creds no luck.
Get users from /about.html
LFI
Index page has download script http://snoopy.htb/download?file=announcement.pdf
LFI is confirmed
The chat application allows sending Password Reset to emails, but because mail server is disabled this won't work. If we could hijack this that would be great 🤔

Application seems to be living inside the /var/www/html, but I can't read index.php 🤔
No credentials, but it mentions that SMTP is being used. php-email-form.php doesn't exist, but if we write to it we can probably get RCE? 💭
DNS (53)
DNS is open for some reason, but ANY returned no responses. But using axfr returned more domains 📝

SMTP
allow-transfer is interesting in configuration.
nsupdate - Dynamic DNS update utility
We get a connection, but it hangs so it must be expecting real SMTP server's answer.
Run SMTP with python built-in module on port 25:
Chat

Town Square talks about adding dedicated channel for new DevSecOps tool, if we go to Find Channel and search for subdomains found in DNS we end up on Server Provisioning

When submitting the request form we get a callback at port 2222 with Paramiko, SSH.

SSH Honeypot
Automatic
sshesame: An easy to set up and use SSH honeypot, a fake SSH server that lets anyone in and logs their activity
Manual
So basically pam_exec module can be used to log usernames and input in the SSH, essentially making it a honeypot. BUT this requires usernames to exist on the system, invalid usernames are logged, but their input no.
Post Exploitation: Sniffing Logon Passwords with PAM
SSH (cbrown)
Didn't work out.
Get git version
https://github.com/aquasecurity/trivy/issues/3458 -> https://github.blog/open-source/git/git-security-vulnerabilities-announced-2/ -> https://github.blog/open-source/git/git-security-vulnerabilities-announced-3/ -> Avoid running git apply / git am on input from untrusted sources (CVE-2023-23946).
https://cvefeed.io/vuln/detail/CVE-2023-23946CVE-2023-23946-POC
Generate SSH keys
Create malicious patch which will write to authorized_keys and will enable us to login into SSH. (Refer to PoC)
Create a symlink which is directory we want to write to and apply
SSH (sbrown)
User.txt
Privilege Escalation (root)
CVE-2023-20052: ClamAV XXE VulnerabilityCVE-2023-20052 PoC
We need to create a *.DMG file, but fuck that! I don't want to wait for docker and I don't want to install those tools.
Download something like 7zip.DMG
We need to replace with:
Nothing 🤔
💀 the hardest fucking part was finding valid DMG files......... This took way too long..... Should have just used fucking Docker and have been done with it.
Valid DMG: https://www.macintoshrepository.org/32918-7zx-7-zip-for-mac-os-x-
Get SSH key:
Root.txt
Last updated