Mailing
Recon
Add hostname to dns:
HTTP (80)

From instructions we know that user maya exists and default user user:password was created, probably demo and deleted. (Creds don't work for SMTP)
Get IIS Config:
Nothing interesting, but we have LFI.
Find config files of hMailServer:
https://www.hmailserver.com/documentation/v5.4/?page=reference_inifilesettings https://www.hmailserver.com/forum/viewtopic.php?t=14994

Password:
homenetworkingadministrator
Since we are only dealing with SMTP service and nothing else, I tried searching for Microsoft Outlook Remote Code Execution Vulnerability and ended up on CVE-2024-2141_. We know that OS is Windows so that's why Outlook. CVE also needs credentials and we got that too.
Setup responder:
Note: Port 25 didn't work because of TLS, 465 hang and 587 was successful.
Note: URL is responder's IP (us) and as for share literally anything.
Using responder we are able to dump the hash of the user who visited the link, in this case maya.
User.txt
SMTP (25)
Note: > symbol indicates client (me)!
No useful information from raw SMTP interaction.
Privilege Escalation
Windows Defender is active and WinPeas/PrivescCheck.ps1 got blocked, manual enumerating go...
LibreOffice seems out of ordinary Windows installation, usually we have Office applications and considering Outlook was used it's a bit odd.
Installation is really old:
Before going further into random old software let's check permissions on it first using icacls:
Normal users have (GR,GE) perms -> Generic Read/Generic Execute
Searching for CVEs: https://www.cvedetails.com/vulnerability-list/vendor_id-11439/product_id-21008/Libreoffice-Libreoffice.html
Vulnerability Details : CVE-2023-2255
Improper access control in editor components of The Document Foundation LibreOffice allowed an attacker to craft a document that would cause external links to be loaded without prompt. In the affected versions of LibreOffice documents that used "floating frames" linked to external files, would load the contents of those frames without prompting the user for permission to do so. This was inconsistent with the treatment of other linked content in LibreOffice. This issue affects: The Document Foundation LibreOffice 7.4 versions prior to 7.4.7; 7.5 versions prior to 7.5.3.
PoC: CVE-2023-2255
But where to put it? Going back to the root dir I saw interesting directory:
Hmm... some kind of policy was in place (probably) and the user wasn't being created.
Also the group name was incorrect because it's not english:
Recreate the payload:
Method 1
Check UAC Enabled:
We don't have direct access to localadmin directory because UAC is in place. We can utilize RunasCs tool to bypass UAC control and execute any command as admins.
Method 2
Dump the hashes and login via hash into machine:
Since we have Admin access we could probably utilize any actions from: https://www.netexec.wiki/smb-protocol/obtaining-credentials
Last updated