Lion Cipher Lab

Find and shut an open SMTP relay in your own lab

Why it matters

An open relay is one of the oldest and most consequential misconfigurations on the internet, and it is still worth checking for on an engagement because when it is present the impact is immediate and total. A mail server (an MTA — Mail Transfer Agent) exists to accept mail and forward it toward its destination. A CLOSED server only does that for its own users or its own domains: it relays for people it trusts, and refuses to be a forwarding service for strangers. An OPEN RELAY has lost that distinction — it will accept mail from anyone, claiming to be from anyone, addressed to anyone, and…

What you'll learn

Steps in this lab

  1. What an open relay is — and the one rule before you touch it
  2. The SMTP conversation a pentester actually has
  3. Stand up the deliberately-open relay: one Postfix container, your machine only
  4. The exploit: prove it relays, from Python
  5. Shut it: the two settings that close the relay
  6. Measure the fix: the same test, the opposite result
  7. Honest negatives: what a closed relay does NOT prove
  8. Do it better — recognise, report, prevent, and clean up

Open the full interactive lab →