On 17 November 2026 a mid-sized Egyptian manufacturer that runs its email on our platform told us that staff could not sign in. Within the day we had found a password-spraying campaign that had been running for a month, a finance mailbox quietly being used to send German-language bank phishing, and the phishing email that started it. This is what we saw, what worked, one mistake we made, and the controls we now run for every customer at no extra infrastructure cost.
TL;DR
- The attacker sprayed passwords through residential proxies: 86% of the 615 addresses were US home and mobile connections, and 614 of them made exactly one attempt. Classic "N failures per IP" rate limiting never fires.
- The spray did not get in. A credential-phishing email did: a "reconfirm your mailbox" message that one user clicked (he confirmed it afterwards). Within 13 hours his mailbox was being polled from Nigeria.
- A second mailbox was used to send 17 messages impersonating ING Bank to people in Germany: first test messages to the attacker's own inboxes, then real targets in alphabetical order.
- What stopped it: rotating every password, terminating sessions, a geo-aware "first failure from abroad = ban" rule, and blocking 637 addresses. All of it runs on the existing mail server with open-source tools.
How the attack unfolded
The early traffic is the tell: hundreds of attempts against firstname.lastname@ combinations that never existed. The attacker was building addresses from public employee names, the same way a sales tool would. Once a real address responded differently, the campaign moved to it.
Why classic rate limiting saw nothing
Most mail servers protect logins with a rule like "ban an IP after 5 failures in 10 minutes". Against this campaign that rule is useless:
- One attempt per IP. 614 of 615 addresses tried once and never came back.
- Slow and steady. Roughly one attempt every four minutes, around the clock: well below any per-account lockout threshold.
- Residential addresses. Blocking "datacenter IP ranges" does not help when the traffic comes from home routers and phones rented through proxy networks.
The signal that does work is where the attempt comes from relative to who normally uses the mailbox. This company's staff connect from Egypt. A failed login from Ohio is not a typo.
How they actually got in: one click
The mailbox that was taken over had received, the evening before, an email titled [Ticket ID: #CFD-…] Employee's Urgent reconfirmation needed for <user>@<company>, sent from a compromised server in Vietnam. Its button led to a fake login page. The user later confirmed he had opened it. Thirteen hours later the first login from Nigeria succeeded at the first attempt, with the correct password. A typo in the username followed by a correction 13 seconds later suggests a human operator, not a script.
Searching the other mailboxes turned up the same lure going back to July: "password expires today", "email reconfirmation needed urgently!!!". Phishing, not the spray, was the entry point.
What the attacker did with a finance mailbox
A second mailbox, belonging to the finance function, was logged into from rotating US residential IPs, each login from a new address with no failed attempt first: the signature of someone who already holds the password. It was then used to send mail through our server from an IP in Turkey:
- Testing (5–16 Nov): nine small messages to two random-looking inboxes at a German webmail provider, almost certainly the attacker's own, to confirm the account could send without being filtered.
- Campaign (16–17 Nov): eight larger messages to named individuals in alphabetical order (t…, to…, tom…, tor…, tri…, tu…, u…), with the sender name "ING Supportbearbeitung" and subjects such as "Ihr Konto wartet auf Sie" ("Your account is waiting for you"). Five were delivered, three bounced.
The attacker paced messages about 13 minutes apart to stay under volume alarms, and the bounce reports were removed from the mailbox. Nothing was sent to the company's own customers or suppliers.
Response
A scheduled credential rotation on the migrated mailboxes cut the attacker off. The last phishing message left at 05:21.
Staff report they cannot sign in. Log review begins.
Automatic banning enabled for repeated failures (fail2ban on Dovecot and Postfix SASL).
637 addresses blocked permanently on mail ports (firewalld ipset). New rule: a single failed login from outside Egypt on this domain is banned for 30 days.
New passwords for all 26 mailboxes, every session terminated. Passwords delivered through a single-use link that opens only after a WhatsApp code to the account owner.
Self-service password change page published so each employee replaces the temporary password immediately.
Every other domain on the platform scanned for the same pattern. One more mailbox at a different customer showed valid-password logins from US residential IPs; its sources were blocked the same afternoon.
The mistake we made, and the lesson
When staff could not sign in, we briefly rolled the passwords back to keep the business running while we investigated. Those were the passwords the attacker held. Our firewall had already blocked the Turkish sender, so nothing more went out, but for a few hours the door was open again.
Lesson: never roll credentials back before you have checked for compromise. If people are locked out, deliver new credentials quickly instead.
A second, subtler one: our first whitelist (to avoid banning real users) included every address that had logged in successfully. That list also contained the attacker. We now whitelist only domestic addresses with a successful login in the last 14 days.
The controls, in detail
1. First failure from abroad = ban
fail2ban supports an ignorecommand: a script that decides per IP whether to skip banning. Ours returns "skip" only when the address is in Egypt (GeoLite2 country database) or on the known-good list. Combined with maxretry = 1, one wrong password from another country is enough.
[customer-spray]
enabled = true
filter = customer-spray # Dovecot "auth failed" + Postfix SASL failures for one domain
logpath = /var/log/maillog
maxretry = 1
findtime = 1d
bantime = 30d
ignorecommand = /usr/local/sbin/f2b-ignore-home-country <ip>
#!/bin/bash
# exit 0 = do not ban: the address is in the home country, or logged in successfully before
ip="$1"
grep -qw -- "$ip" /etc/fail2ban/jail.d/zz-goodips.local && exit 0
cc=$(mmdblookup --file /usr/share/GeoIP/GeoLite2-Country.mmdb --ip "$ip" country iso_code \
| grep -oE '"[A-Z]{2}"' | tr -d '"')
[ "$cc" = "EG" ] && exit 0
exit 1
2. Block what already got in
Addresses that logged in successfully from abroad never trigger a failure-based rule. We pulled them from the logs and put them, with the spray sources, into one ipset dropped on IMAP, POP3 and submission ports, leaving port 25 open so legitimate inbound mail still arrives.
3. Credentials that open once
New passwords should never sit in a chat thread or an email. We built a small handoff link: the bundle is encrypted at rest, opens only after a WhatsApp code sent to the one phone number it was issued for, and is erased the moment it is read.
4. Hunt across every tenant
The useful question after one incident is "who else?". Comparing each mailbox's successful-login countries with where its users normally are takes seconds on a single server and found a second affected mailbox at another customer the same day.
Results
- No phishing has left the platform since 05:21 on 17 November.
- The mail server is not listed on Spamhaus, SpamCop or Barracuda.
- Extra infrastructure cost: zero. Everything runs on the existing mail server with open-source tools.
Checklist for your own mail server
- Know where your users log in from, and alert on successful logins from elsewhere, not only failures.
- Add a geo-aware rule: one failure from an unexpected country should be enough to ban.
- Do not whitelist "anyone who logged in successfully". Attackers log in successfully too.
- Train staff on one rule: never type the email password into a page opened from a link in an email.
- Give users a real place to change their password, and rotate on a schedule.
- After any incident, scan every tenant for the same pattern the same day.
Indicators
| Type | Value | Context |
|---|---|---|
| IP | 176.53.159.177 | Sent the ING-themed phishing through a compromised mailbox (TR) |
| Host | mail.digiwall.vn (223.27.104.11) | Delivered the "Employee's Urgent reconfirmation needed" lure |
subsectorcolony6@web.de, unwittingchase3@web.de | Attacker test inboxes | |
| Subject | [Ticket ID: #CFD-…] Employee's Urgent reconfirmation needed for … | Credential-phishing lure |