Someone is presumably harvesting email addresses from the SMTP traffic to my VPS
6 points| 2b | 2 years ago
Just a week after this change, I received a Logwatch report with incorrect authentication attempts for these new email addresses:
dovecot: auth: passwd-file([email protected]): unknown user : 17 Time(s) dovecot: auth: passwd-file([email protected]): unknown user : 68 Time(s) dovecot: auth: passwd-file([email protected]): unknown user : 16 Time(s) dovecot: auth: passwd-file([email protected]): unknown user : 68 Time(s) dovecot: auth: passwd-file([email protected]): unknown user : 17 Time(s)
1. The VPS is 100% not compromised (besides, why would anyone brute-force a password to something they already have access to?).
2. All software on the VPS is FOSS and is almost always kept up-to-date; the logs are not shared anywhere (e.g., they're not uploaded to a third-party SaaS for analysis).
3. The listed web services do not provide any public profiles that contain these email addresses.
4. All listed services sent confirmation emails upon the change of email address.
5. Services that did not send confirmation messages are not mentioned in the logs with the authentication attempts.
6. I found no evidence that those services have the same ISP, hosting/cloud provider, or even backbone provider (this was analyzed by tracking SMTP client source IP addresses and network traces to them).
7. All this suggests that the email addresses were harvested from the SMTP traffic to my VPS, either at Vultr's infra level or through one of their network providers in the Amsterdam location.
P.S.: My mail server is configured with STARTTLS support, but for some reason, the SMTP clients of those web services chose to use plain SMTP for the confirmation messages.
[+] [-] tuga|2 years ago|reply
[+] [-] 2b|2 years ago|reply
[+] [-] cookiengineer|2 years ago|reply
Is it an open relay? If so, you should deactivate it because your server is spamming then.
Most bots also go through dictionaries and try to send dummy emails to specific account names first, so verifying that the domain is the only one accepting emails helps a lot to mitigate against the noise. Any email not containing an FQDN should be blocked
I'd also recommend to create a local block list (e.g. /etc/hosts.deny for ssh or a postmap file for postfix) so that you can block those actors.
If you don't know how to do that, I included a short howto in my postfix-spamdb [1] project where I maintain spammers targeting my email addresses.
Regarding ssh pw auth, I wouldn't recommend fail2ban because it's a very very buggy software and a lot of RCEs have been discovered in the past, but I would recommend a tool that blocks auths from at least other countries where you are not connecting from. If you want to be safe, use TOR and a hidden domain to connect to your ssh daemon, and make ssh listen only on localhost. Careful though, it's not beginner friendly in case tor can't connect and you need to know what you are doing.
As my startup's EDR agent overlaps with those features I'm biased and not gonna recommend tools here. Don't wanna spam.
For private use there's the sshpwauth block list from dataplane which you can use to generate a good enough block list [2].
[1] https://github.com/cookiengineer/postfix-spamdb
[2] https://dataplane.org/sshpwauth.txt
[+] [-] 2b|2 years ago|reply
[+] [-] elmerfud|2 years ago|reply
[+] [-] DamonHD|2 years ago|reply
[+] [-] 2b|2 years ago|reply
[+] [-] markstos|2 years ago|reply