{"id":22704,"date":"2024-04-27T00:36:27","date_gmt":"2024-04-26T20:36:27","guid":{"rendered":"https:\/\/me-en.kaspersky.com\/blog\/domain-hijacking-subdomailing\/22704\/"},"modified":"2024-04-27T00:36:44","modified_gmt":"2024-04-26T20:36:44","slug":"domain-hijacking-subdomailing","status":"publish","type":"post","link":"https:\/\/me-en.kaspersky.com\/blog\/domain-hijacking-subdomailing\/22704\/","title":{"rendered":"How spammers exploit hijacked corporate domains"},"content":{"rendered":"<p>You\u2019ve probably received more than a few spam or phishing emails from addresses belonging to seemingly reputable organizations. This may have left you wondering how attackers manage this feat, and perhaps even concerned if anyone out there sends malicious emails under your own company\u2019s name.<\/p>\n<p>The good news is that several technologies exist to combat emails sent on someone else\u2019s behalf: Sender Policy Framework (SPF); DomainKeys Identified Mail (DKIM); and Domain-based Message Authentication, Reporting, and Conformance (DMARC). The not-so-good news is that attackers occasionally discover ways to bypass these safeguards. This post looks at one such technique that spammers use to send emails from the addresses of real organizations: domain hijacking.<\/p>\n<h2>SubdoMailing campaign and corporate domain hijacking<\/h2>\n<p>\nResearchers at Guardio Labs have <a href=\"https:\/\/www.bleepingcomputer.com\/news\/security\/hijacked-subdomains-of-major-brands-used-in-massive-spam-campaign\/\" target=\"_blank\" rel=\"nofollow noopener\">uncovered<\/a> a large-scale spam campaign that they\u2019ve dubbed SubdoMailing. This campaign, ongoing since at least 2022, involves over 8000 domains and 13,000 subdomains previously owned by legitimate companies, along with nearly 22,000 unique IP addresses. The researchers estimate the average volume of spam at around five million emails daily.<\/p>\n<p>The SubdoMailing operators are constantly on the lookout for suitable expired corporate domains, and once they find some they re-register them \u2014 typically capturing several dozen legitimate domains daily. The record stands at 72 hijacked domains in a single day \u2014 back in June 2023.<\/p>\n<p>To avoid landing on spam lists, the attackers rotate them constantly. Each domain is used for spam distribution for 1\u20132 days before going dormant for an extended period while the spammers switch to the next. After a couple of days, this one too is temporarily retired, and another takes its place.<\/p>\n<h2>Hijacking domains with a custom CNAME<\/h2>\n<p>\nSo, how exactly do threat actors go about exploiting hijacked domains? One method involves targeting domains with a custom canonical name (CNAME) record. A CNAME is a type of DNS record used to redirect one domain name to another.<\/p>\n<p>The simplest example of a CNAME record is the \u201cwww\u201d subdomain, which usually redirects to the main domain, like this:<\/p>\n<ul>\n<li><code>company.com \u2192 company.com<\/code><\/li>\n<\/ul>\n<p>However, more complex scenarios exist where a CNAME record redirects a subdomain to a completely separate domain. For example, this could be a promotional website hosted on a different domain but integrated into the company\u2019s overall web resource structure with a CNAME record.<\/p>\n<ul>\n<li><code>company.com \u2192 company2020promo.com<\/code><\/li>\n<\/ul>\n<p>Large companies with extensive web resources may have multiple CNAME records and corresponding domains. The problem is that administrators cannot always keep track of is all. As such, a situation can arise where a domain has expired but its CNAME record lives on. These are the kind of domains that the cybercriminals behind the SubdoMailing campaign are eager to harvest.<\/p>\n<p>They hunt for abandoned domains that still have active CNAME records referencing the large companies that once owned them. Let\u2019s take <code>company2020promo.com<\/code> from our example. Say the company abandoned this domain after a promotional campaign several years ago, but the administrators forgot to remove the CNAME record. This allows threat actors to register the domain to themselves and automatically gain control over the <code>promo.company.com<\/code> subdomain.<\/p>\n<p>That done, they gain the ability to authorize mail servers located at IP addresses they own to send emails from the <code>promo.company.com<\/code> subdomain \u2014 effectively inheriting the reputation of the primary domain, <code>company.com<\/code>.<\/p>\n<h2>Exploiting SPF records<\/h2>\n<p>\nThe second tactic employed by the SubdoMailing attackers involves exploiting SPF records. SPF (Sender Policy Framework \u2014 an extension of the SMTP protocol) records list the IP addresses and domains authorized to send emails from a particular domain.<\/p>\n<p>Again, it\u2019s perfectly normal for large organizations to include a multitude of addresses and domains in this list for various purposes. This may include external domains that either do not belong to the company at all, or are used for some specific purpose: temporary projects, mass mailing tools, user survey platforms, and the like. Similar to the CNAME scenario, it may happen that the domain registration has expired, but someone forgot to remove the said domain from the SPF record.<\/p>\n<p>Domains like these are also prized by threat actors. For our example <code>company.com<\/code>, let\u2019s say the SPF record also includes some external domain like <code>customersurveytool.com<\/code>, belonging to a user-survey service.<\/p>\n<p>Now, imagine this service no longer exists, the domain registration has expired, and the administrators forgot to update the SPF record. By registering the abandoned <code>customersurveytool.com<\/code> domain, attackers gain the ability to send emails not just from the subdomain, but from the company\u2019s primary domain, <code>company.com<\/code>.<\/p>\n<h2>Examples of domain hijacking in the SubdoMailing campaign<\/h2>\n<p>\nHow such problems can arise can be illustrated by the <a href=\"https:\/\/thehackernews.com\/2024\/02\/8000-subdomains-of-trusted-brands.html\" target=\"_blank\" rel=\"nofollow noopener\">case<\/a> of <code>msnmarthastewartsweeps.com<\/code>. The Microsoft Network (MSN) portal once collaborated with celebrity chef <a href=\"https:\/\/en.wikipedia.org\/wiki\/Martha_Stewart\" target=\"_blank\" rel=\"nofollow noopener\">Martha Stewart<\/a> on a project promoting MSN Messenger (remember that?) through prize giveaways. The project\u2019s website used the subdomain  <code>marthastewart.msn.com<\/code>, which redirected to the external domain <code>msnmarthastewartsweeps.com<\/code> through a CNAME record.<\/p>\n<div id=\"attachment_51099\" style=\"width: 1156px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/media.kasperskydaily.com\/wp-content\/uploads\/sites\/37\/2024\/04\/27003638\/domain-hijacking-subdomailing-3.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-51099\" src=\"https:\/\/media.kasperskydaily.com\/wp-content\/uploads\/sites\/37\/2024\/04\/27003638\/domain-hijacking-subdomailing-3.png\" alt=\"Screenshot of marthastewart.msn.com from the Internet Archive \" width=\"1146\" height=\"1380\" class=\"size-full wp-image-51099\"><\/a><p id=\"caption-attachment-51099\" class=\"wp-caption-text\">Here\u2019s what marthastewart.msn.com looked like when it was live. <a href=\"https:\/\/web.archive.org\/web\/20010517194309\/http:\/\/www.msnmarthastewartsweeps.com\/\" target=\"_blank\" rel=\"nofollow noopener\">Source<\/a><\/p><\/div>\n<p>As you might guess, the <code>msnmarthastewartsweeps.com<\/code> domain registration eventually expired, but the MSN administrators failed to remove the corresponding CNAME record. In 2022, attackers discovered this domain, registered it, and gained the ability to send emails from <code>marthastewart.msn.com<\/code>, leveraging the reputation of none other than the Microsoft Network for their own purposes.<\/p>\n<h2>How to guard against SubdoMailing<\/h2>\n<p>\nTo prevent domain hijacking and spamming in your company\u2019s name, we recommend the following:\n<\/p>\n<ul>\n<li>Implement <a href=\"https:\/\/www.kaspersky.com\/blog\/how-to-cure-dmarc\/36787\/\" target=\"_blank\" rel=\"noopener nofollow\">SPF, DKIM, and DMARC<\/a>\n<\/li>\n<li>Regularly inventory your company\u2019s web resources, including domains.<\/li>\n<li>Ensure timely renewal of active domain registrations.<\/li>\n<li>Remove outdated DNS records.<\/li>\n<li>Update SPF records by removing unused addresses and domains authorized to send emails on your company\u2019s behalf.<\/li>\n<\/ul>\n<input type=\"hidden\" class=\"category_for_banner\" value=\"kesb-trial\">\n","protected":false},"excerpt":{"rendered":"<p>By hijacking domains with CNAME records and exploiting forgotten SPF records, attackers seize domains and use them for their own purposes. <\/p>\n","protected":false},"author":2726,"featured_media":22707,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1318,1916,1917],"tags":[2340,2341,1913,19,240,2342],"class_list":{"0":"post-22704","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-business","8":"category-enterprise","9":"category-smb","10":"tag-dkim","11":"tag-dmarc","12":"tag-domains","13":"tag-email","14":"tag-spam","15":"tag-spf"},"hreflang":[{"hreflang":"en-ae","url":"https:\/\/me-en.kaspersky.com\/blog\/domain-hijacking-subdomailing\/22704\/"},{"hreflang":"en-in","url":"https:\/\/www.kaspersky.co.in\/blog\/domain-hijacking-subdomailing\/27379\/"},{"hreflang":"en-us","url":"https:\/\/usa.kaspersky.com\/blog\/domain-hijacking-subdomailing\/30066\/"},{"hreflang":"en-gb","url":"https:\/\/www.kaspersky.co.uk\/blog\/domain-hijacking-subdomailing\/27537\/"},{"hreflang":"ru","url":"https:\/\/www.kaspersky.ru\/blog\/domain-hijacking-subdomailing\/37304\/"},{"hreflang":"x-default","url":"https:\/\/www.kaspersky.com\/blog\/domain-hijacking-subdomailing\/51097\/"},{"hreflang":"ru-kz","url":"https:\/\/blog.kaspersky.kz\/domain-hijacking-subdomailing\/27650\/"},{"hreflang":"en-au","url":"https:\/\/www.kaspersky.com.au\/blog\/domain-hijacking-subdomailing\/33535\/"},{"hreflang":"en-za","url":"https:\/\/www.kaspersky.co.za\/blog\/domain-hijacking-subdomailing\/33197\/"}],"acf":[],"banners":"","maintag":{"url":"https:\/\/me-en.kaspersky.com\/blog\/tag\/email\/","name":"email"},"_links":{"self":[{"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts\/22704","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/users\/2726"}],"replies":[{"embeddable":true,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/comments?post=22704"}],"version-history":[{"count":1,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts\/22704\/revisions"}],"predecessor-version":[{"id":22706,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts\/22704\/revisions\/22706"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/media\/22707"}],"wp:attachment":[{"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/media?parent=22704"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/categories?post=22704"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/tags?post=22704"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}