Threat Research

NICER Protocol Deep Dive: Internet Exposure of SMTP

|Last updated on Oct 2, 2020|1 min read
LinkedInFacebookX
NICER Protocol Deep Dive: Internet Exposure of SMTP

Welcome to the NICER Protocol Deep Dive blog series! When we started researching what all was out on the internet way back in January, we had no idea we'd end up with a hefty, 137-page tome of a research report. The sheer length of such a thing might put off folks who might otherwise learn a thing or two about the nature of internet exposure, so we figured, why not break up all the protocol studies into their own reports?

So, here we are! What follows is taken directly from our National / Industry / Cloud Exposure Report (NICER), so if you don't want to wait around for the next installment, you can cheat and read ahead!


[Research] Read the full NICER report today

Get Started

SMTP (25/465/587)

The “Simple” in SMTP is intended to be ironic.

TLDR

  • WHAT IT IS: A usually cleartext, text-based standard for delivering email between networks.
  • HOW MANY: 5,805,012 discovered nodes on port 25 and 4,007,931 on port 587. SMTPS on port 465 comes in with 3,494,067. All together, that's 13,307,010 distinct service nodes. 3,023,486 (52%) have Recog fingerprints (43 total service families)
  • VULNERABILITIES: The natively cleartext nature of email is the primary concern around the security of this protocol. Email is also the most popular method for phishing users into revealing passwords and running malware. Finally, there are at least two serious vulnerabilities in popular mail servers Exim and Microsoft Exchange deployed today.
  • ADVICE: Mail administrators need to be fanatical about applying security patches as they become available, and should implement DMARC anti-spoofing controls yesterday.
  • ALTERNATIVES: Outsourcing email to a cloud provider, such as Google or Microsoft, is often the right choice when comparing the costs of effectively maintaining this critical internet infrastructure.
  • GETTING: Better (25/587)! Fewer crazy people are hosting their own mail.

SMTP discovery details

While SMTP is traditionally cleartext with an optional secure protocol negotiation called STARTTLS, we're seeing more SSL-wrapped SMTP, also known as SMTPS, in the world today. The following charts and tables illustrate the distribution of SMTP over port 25, SMTP on port 587 (which is intended for SMTP-to-SMTP relaying of messages), and SMTPS on port 465.

encrypted-vs-unencrypted.png
CountrySMTP (25)SMTP (587)SMTPS (465)
United States1,467,0771,456,5981,253,805
Germany637,569373,266375,526
Japan589,222382,133222,633
France398,390212,937196,177
Poland306,368289,522284,297
Spain291,84444,43548,694
Russia245,814104,70995,972
United Kingdom193,073121,902122,069
Netherlands189,456129,690115,211
Canada137,342146,323132,133
encrypted-unencrypted-cloud.png
ProviderSMTP (25)SMTP (587)SMTPS (465)
OVHcloud317,584248,695236,772
Amazon95,17532,57931,438
DigitalOcean74,09746,52141,234
Scaleway30,87615,33212,594
QuadraNet29,28218,2008,667
Google29,03050,42250,561
Microsoft14,9455,5762,790
Rackspace8,4592,5111,841
Alibaba5,7293,8633,826
Oracle1,274509345

As far as top-level domains are concerned, we see that the vast majority of SMTP lives in dot-com land—we counted over 100 million MX records in dot-com registrations, with a sharp drop-off in dot-de, dot-net, and dot-org, with about 10 million MX records in each.

SMTP exposure information

There are dozens of SMTP servers to choose from, each with their own idiosyncratic methods of configuration, spam filtering, and security. The top SMTP server we're able to fingerprint is Postfix, with over a million and a half installs, followed by Exim, Exchange, and trusty Sendmail. The table below is the complete list of every SMTP server we positively identified—mail administrators will recognize the vestiges of old, little-used mail servers, such as the venerable Lotus Domino and ZMailer. If these are your mail servers, think long and hard about why you’re still running these as opposed to simply farming this thankless chore out to a dedicated mail service provider.

SMTP FamilyCount
Postfix1,679,222
exim759,799
Exchange Server182,263
Sendmail180,812
Mail Server84,262
IIS58,720
Ecelerity Mail Server25,206
MDaemon14,404
Connect10,447
IMail Server5,354
Pro3,462
IBM Domino3,445
Twisted1,999
UTM1,926
WinWebMail1,879
Email Security1,867
ListManager1,785
Lotus Domino1,734
David1,490
PowerMTA1,239
CCProxy675
MailSite305
Post.Office275
VPOP3245
ZMailer205
GroupWise176
Check Point78
WinRoute43
Messaging Server40
VOPMail24
IntraStore22
Internet Mail Server18
NTMail17
Mercury Mail Transport System15
FWTK9
SLMail8
FTGate4
Internet Mail Services4
VM3
Mail-Max2
AppleShare IP Mail Server1
MERCUR1
WebShield1

Finally, let's take a quick look at the Exim mail server. Like most other popular software on the internet, we can find all sorts of versions. Unlike other popular software, Exim versioning moves pretty quickly—the current version of Exim at the time of scanning was v 4.93, and has already incremented to 4.94 by the time of publication. However, the popularity of the latest version (4.93) versus next-to-latest (4.92.x) is in the 100,000 range, and given the intense scrutiny afforded to Exim by national intelligence agencies, this delta can be pretty troubling. It’s so troubling that the American National Security Agency issued an advisory urging Exim administrators to patch and upgrade as soon as possible to avoid exploitation by the “Sandworm team.” Specifically, the vulnerability exploited was CVE-2019-10149, and affects versions 4.87 through 4.91—as of the time of our scans, we found approximately 87,500 such servers exposed to the internet. While this is about a fifth of all Exim servers out there, exposed vulnerabilities in mail servers tend to shoot to the top of any list of “must patch now” vulns.

Attacker’s view

Given the high value attackers tend to assign to SMTP vulnerabilities, it’s no surprise that we see fairly consistent scanning action among threat actors in our SMTP honeypots.

project-heisenberg-smtp.png
DateSMTP PortCountPercentageProvider
2020-02-152551812.92%Sprint (Poland)
2020-02-152551412.82%China Telecom
2020-02-152540910.20%Tele Asia Hosting
2020-02-154654,33799.18%DigitalOcean
2020-02-155874,56899.65%DigitalOcean
2020-02-262532,49573.97%Hostwinds
2020-02-26256,50414.81%Sprint (Poland)
2020-02-26252,7306.21%Tamatiya Eood Hosting
2020-02-2646585169.36%DigitalOcean
2020-02-2646534428.04%Web Hosted Group
2020-02-2658794894.33%DigitalOcean
2020-03-25254,93041.55%Microsoft 365
2020-03-25251,48112.48%Locaweb Hosting
2020-03-25255094.29%Hurricane Electric
2020-03-2546541595.62%DigitalOcean
2020-03-2558740897.14%DigitalOcean
2020-05-09251,18058.13%Vietnam Telecom
2020-05-09251959.61%Zumy Communications
2020-05-09251597.83%China Telecom
2020-05-094656,64194.91%Microsoft 365
2020-05-094653264.66%DigitalOcean
2020-05-0958731695.18%DigitalOcean

Our advice around SMTP

IT and IT security teams should seriously consider converting over to an established email provider such as Microsoft's Office 365 or Google's G Suite. Running your own email remains one of the more truly painful network administration tasks, since outages, patch management, and redundant backups can be tricky even in the best of times, to say nothing of the constant drain of resources in the fight against spam and phishing. Established providers in this space have a proven track record of handling both spam and phishing, as well as achieving remarkable uptimes.

Cloud providers should provide rock-solid documentation on how to set up SMTP services for their customers, starting with SSL-wrapped SMTP as a default configuration. This is one case where we wouldn't be opposed to providers such as Microsoft and Google inserting a little adver-docu-tizing pushing customers over to their hosted mail solutions.

Government cybersecurity agencies should recognize that everyone is challenged by running merely serviceable email infrastructure, and very few organizations are truly excellent at it at any reasonable scale. As far as content-based attacks are concerned, these experts should continue pressing for minimum technical defenses, such as DMARC, and user education in recognizing and avoiding phishing scams.

NEVER MISS A BLOG

Get the latest stories, expertise, and news about security today.

Subscribe

Related blog posts