{"id":11859,"date":"2018-08-29T19:58:07","date_gmt":"2018-08-29T15:58:07","guid":{"rendered":"https:\/\/me-en.kaspersky.com\/blog\/?p=11859"},"modified":"2019-11-15T15:22:52","modified_gmt":"2019-11-15T11:22:52","slug":"residual-certificates-mitm-dos","status":"publish","type":"post","link":"https:\/\/me-en.kaspersky.com\/blog\/residual-certificates-mitm-dos\/11859\/","title":{"rendered":"MitM and DoS attacks on domains through the use of residual certificates"},"content":{"rendered":"<p>HTTPS certificates are one of the pillars of Internet security. But it is not all roses with them. We have already discussed the ways the existing system <a target=\"_blank\" href=\"https:\/\/www.kaspersky.com\/blog\/https-does-not-mean-safe\/20725\/\" rel=\"noopener noreferrer nofollow\">often fails to guarantee security to users<\/a>. Now let us focus on what can go wrong for the website owners.<\/p>\n<h3>Two valid certificates for the same domain<\/h3>\n<p>Domain registration and HTTPS certification are often controlled by different organizations, so the validity periods for domains and certificates will not necessarily be the same. That leads to situations in which the former and the current owners hold <em><em>valid<\/em><\/em> certificates for the same domain at the same time.<\/p>\n<p>What can go wrong in a situation like that, and how widespread is the problem in real life? At <a target=\"_blank\" href=\"https:\/\/www.kaspersky.com\/blog\/tag\/def-con\/\" rel=\"noopener noreferrer nofollow\">DEF CON 26<\/a>, researchers Ian Foster and Dylan Ayrey presented their study of <a target=\"_blank\" href=\"https:\/\/insecure.design\/\" rel=\"noopener noreferrer nofollow\">the problem<\/a>. According to them, there are even more complications than seen at first glance \u2014 and it\u2019s a surprisingly widespread problem.<\/p>\n<p>The most obvious problem is just what you might expect to happen if someone else holds a valid certificate for your domain: a \u201c<a target=\"_blank\" href=\"https:\/\/encyclopedia.kaspersky.com\/glossary\/man-in-the-middle-attack\/?utm_source=kdaily&amp;utm_medium=blog&amp;utm_campaign=termin-explanation\" rel=\"noopener noreferrer\">Man-in-the-Middle<\/a>\u201d attack on the users of your website.<\/p>\n<p>Foster and Ayrey used the <a target=\"_blank\" href=\"https:\/\/www.certificate-transparency.org\/\" rel=\"noopener noreferrer nofollow\">Certificate Transparency<\/a> project\u2019s certificates database to identify 1.5 million certificate cross-ownership problems \u2014 which amounts to almost 0.5% of all Internet sites. In one quarter of these cases, the older certificate is still valid, which leaves 375 thousand domains vulnerable to the Man-in-the-Middle.<a href=\"https:\/\/media.kasperskydaily.com\/wp-content\/uploads\/sites\/37\/2018\/08\/29194452\/residual-certificates-mitm-dos-mitm.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/media.kasperskydaily.com\/wp-content\/uploads\/sites\/37\/2018\/08\/29194452\/residual-certificates-mitm-dos-mitm.jpg\" alt=\"\" width=\"1460\" height=\"800\" class=\"aligncenter size-full wp-image-11852\"><\/a><\/p>\n<p>But that\u2019s not all. It is quite common to make one certificate for multiple domains \u2014 easily dozens or even hundreds of them. For example, Foster and Ayrey were able to detect a certificate covering 700 domains at the same time, and as the researchers say, this list includes several very popular domains.<\/p>\n<p>Not surprisingly, some of those 700 domains are currently up for grabs; therefore, anyone can get one of them registered and get an HTTPS certificate for it. Now the question is, does the new domain owner have the right to revoke the previous certificate to protect his website from a Man-in-the-Middle attack?<\/p>\n<h3>Can the certificate be revoked?<\/h3>\n<p>Certificates can, in fact, be revoked. The <a target=\"_blank\" href=\"https:\/\/cabforum.org\/wp-content\/uploads\/CA-Browser-Forum-BR-1.5.7-29-Apr-2018.pdf\" rel=\"noopener noreferrer nofollow\">certification centers\u2019 operating procedure<\/a> provides for certificate revocation if \u201cany of the information appearing in the Certificate is inaccurate or misleading.\u201d Such revocation has to take place within 24 hours of receipt of the notification.<\/p>\n<p>Foster and Ayrey took a look at how that works in real life, and they found that the procedure varies greatly for different certification centers. Thus, Let\u2019s Encrypt employs automated tools that help revoke a certificate very quickly \u2014 almost in real time. At other certification centers, you will have to communicate with actual people, so it won\u2019t be so fast. Sometimes, getting a certificate revoked takes perseverance and much more than the specified 24 hours of waiting time. In the worst cases, you may even fail to have a certificate revoked. For example, the researchers\u2019 correspondence with Comodo ended with a suggestion to \u201cforget about this SSL and order a new SSL.\u201d<a href=\"https:\/\/media.kasperskydaily.com\/wp-content\/uploads\/sites\/37\/2018\/08\/29194502\/residual-certificates-mitm-dos-comodo.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/media.kasperskydaily.com\/wp-content\/uploads\/sites\/37\/2018\/08\/29194502\/residual-certificates-mitm-dos-comodo.jpg\" alt=\"\" width=\"1460\" height=\"800\" class=\"aligncenter size-full wp-image-11854\"><\/a><\/p>\n<p>One way or another, you will have a residual certificate revoked more likely than not. The news is both good and bad. On the one hand, the new domain owner will in most cases be able to protect himself from a Man-in-the-Middle attack that uses the residual certificate vulnerability. On the other hand, it means someone else may purchase a free domain from among those covered by a \u201cshared\u201d certificate and have it revoked, thereby strongly handicapping the use of the associated websites.<\/p>\n<p>How widespread is this problem? Even more so than the previous one: 7 million domains \u2014 more than 2% of the Internet! \u2014 share their certificates with domains whose registrations have already expired. 41% of the previous certificates are still valid. Therefore, several million domains are currently exposed to <a target=\"_blank\" href=\"https:\/\/encyclopedia.kaspersky.com\/glossary\/dos-denial-of-service-attack\/?utm_source=kdaily&amp;utm_medium=blog&amp;utm_campaign=termin-explanation\" rel=\"noopener noreferrer\">DoS attacks<\/a> that use the certificate revocation vulnerability.<a href=\"https:\/\/media.kasperskydaily.com\/wp-content\/uploads\/sites\/37\/2018\/08\/29194511\/residual-certificates-mitm-dos-dos.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/media.kasperskydaily.com\/wp-content\/uploads\/sites\/37\/2018\/08\/29194511\/residual-certificates-mitm-dos-dos.jpg\" alt=\"\" width=\"1460\" height=\"800\" class=\"aligncenter size-full wp-image-11856\"><\/a><\/p>\n<p>Let us get back to the abovementioned 700-domains certificate. To demonstrate how immediate the problem is, the researchers purchased one of the free domains covered by this certificate. So now, in theory, they have an opportunity to launch a DoS attack on hundreds of active websites.<\/p>\n<h3>How to get protected<\/h3>\n<p>A total of 375,000 domains are vulnerable to MitM attacks and several million more to DoS attacks through the use of residual certificates. Your domains, too, may be on the list. With the report having been presented at the biggest hacking conference, you may rest assured \u2014 someone is already looking for vulnerable domains, even as you are reading this article. But how can website owners protect themselves? Foster and Ayrey suggest these steps:<\/p>\n<ul>\n<li>Use an Expect-CT HTTP header with \u201cenforce\u201d directive to be sure that only the certificates listed in Certificate Transparency database are trusted for your domain.<\/li>\n<li>Use the Certificate Transparency database to check if your domains have valid certificates issued to previous owners. You can do this using Facebook\u2019s <a target=\"_blank\" href=\"https:\/\/developers.facebook.com\/tools\/ct\/\" rel=\"noopener noreferrer nofollow\">Certificate Transparency Monitoring<\/a> tool. To simplify the task, the researchers have offered a <a target=\"_blank\" href=\"https:\/\/github.com\/dxa4481\/bygonessl\" rel=\"noopener noreferrer nofollow\">tool of their own design<\/a> that anyone can use to search for domains exposed to the described vulnerabilities.<\/li>\n<\/ul>\n<p>We can add a few more tips:<\/p>\n<ul>\n<li>Take a full inventory of your corporate websites to see if there are any residual certificates for your domains. If you find any, try contacting the certification center and ask them to revoke such certificates.<\/li>\n<li>Do not get one certificate for multiple domains, especially if it is a common practice in your company to create great numbers of websites and associated domains without strict operability monitoring. If the registration for such an \u201cabandoned\u201d domain expires and someone else takes it over, all they will have to do to take down your corporate website is have the certificate revoked.<\/li>\n<li>Consider the compromised certificate situation in advance. You\u2019ll have to revoke it urgently, and, according to the study, some certification centers are too slow to respond \u2014 so it might be a good idea to deal with the faster ones.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Due to certification centers specifics, it is not rare for other people to hold a valid HTTPS certificate for your domain. What can go wrong?<\/p>\n","protected":false},"author":421,"featured_media":11850,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1318,1917,1486],"tags":[740,423,1636,1837,741,1874,1899,650,1159,560,1757],"class_list":{"0":"post-11859","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-business","8":"category-smb","9":"category-threats","10":"tag-black-hat","11":"tag-blackhat","12":"tag-browsers","13":"tag-certificates","14":"tag-def-con","15":"tag-def-con-26","16":"tag-dos","17":"tag-https","18":"tag-mitm","19":"tag-ssl","20":"tag-tls"},"hreflang":[{"hreflang":"en-ae","url":"https:\/\/me-en.kaspersky.com\/blog\/residual-certificates-mitm-dos\/11859\/"},{"hreflang":"en-in","url":"https:\/\/www.kaspersky.co.in\/blog\/residual-certificates-mitm-dos\/14166\/"},{"hreflang":"en-us","url":"https:\/\/usa.kaspersky.com\/blog\/residual-certificates-mitm-dos\/16144\/"},{"hreflang":"en-gb","url":"https:\/\/www.kaspersky.co.uk\/blog\/residual-certificates-mitm-dos\/14381\/"},{"hreflang":"es-mx","url":"https:\/\/latam.kaspersky.com\/blog\/residual-certificates-mitm-dos\/13356\/"},{"hreflang":"es","url":"https:\/\/www.kaspersky.es\/blog\/residual-certificates-mitm-dos\/16840\/"},{"hreflang":"it","url":"https:\/\/www.kaspersky.it\/blog\/residual-certificates-mitm-dos\/16218\/"},{"hreflang":"ru","url":"https:\/\/www.kaspersky.ru\/blog\/residual-certificates-mitm-dos\/21202\/"},{"hreflang":"x-default","url":"https:\/\/www.kaspersky.com\/blog\/residual-certificates-mitm-dos\/23661\/"},{"hreflang":"pt-br","url":"https:\/\/www.kaspersky.com.br\/blog\/residual-certificates-mitm-dos\/11333\/"},{"hreflang":"pl","url":"https:\/\/plblog.kaspersky.com\/residual-certificates-mitm-dos\/9696\/"},{"hreflang":"de","url":"https:\/\/www.kaspersky.de\/blog\/residual-certificates-mitm-dos\/17574\/"},{"hreflang":"ja","url":"https:\/\/blog.kaspersky.co.jp\/residual-certificates-mitm-dos\/21420\/"},{"hreflang":"ru-kz","url":"https:\/\/blog.kaspersky.kz\/residual-certificates-mitm-dos\/17265\/"},{"hreflang":"en-au","url":"https:\/\/www.kaspersky.com.au\/blog\/residual-certificates-mitm-dos\/21028\/"},{"hreflang":"en-za","url":"https:\/\/www.kaspersky.co.za\/blog\/residual-certificates-mitm-dos\/21028\/"}],"acf":[],"banners":"","maintag":{"url":"https:\/\/me-en.kaspersky.com\/blog\/tag\/def-con\/","name":"def con"},"_links":{"self":[{"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts\/11859","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\/421"}],"replies":[{"embeddable":true,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/comments?post=11859"}],"version-history":[{"count":5,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts\/11859\/revisions"}],"predecessor-version":[{"id":14615,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts\/11859\/revisions\/14615"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/media\/11850"}],"wp:attachment":[{"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/media?parent=11859"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/categories?post=11859"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/tags?post=11859"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}