{"id":2096,"date":"2022-02-25T08:00:00","date_gmt":"2022-02-25T07:00:00","guid":{"rendered":"https:\/\/camilion.dms3labs.cat\/2022\/02\/25\/security-and-code-signing-certificates\/"},"modified":"2024-02-14T17:01:46","modified_gmt":"2024-02-14T16:01:46","slug":"security-and-code-signing-certificates","status":"publish","type":"post","link":"https:\/\/camilion.eu\/es\/2022\/02\/25\/security-and-code-signing-certificates\/","title":{"rendered":"Security and Code Signing Certificates"},"content":{"rendered":"<p>There are many things that you get not to worry about when using our products<br \/>\nas opposed to rolling out your own.<\/p>\n<p>One of them is: securely and reliably distributing plugins and keeping them up<br \/>\nto date. This, turns out, is not an easy feat and is full of<br \/>\n<a href=\"https:\/\/camilion.eu\/en\/blog\/2022-security-tls-proxies\/\">tricky details<\/a>.<\/p>\n<p>Code signing certificates are one such tricky detail, here we explain how<br \/>\nwe take care of them, and how an upcoming change might affect you.<\/p>\n<div class=\"toc\">\n<ul>\n<li><a href=\"#what-is-a-code-signing-certificate\">What is a Code Signing Certificate?<\/a><\/li>\n<li><a href=\"#how-this-might-affect-you\">How this might affect you<\/a>\n<ul>\n<li><a href=\"#authenticode-and-smartscreen\">Authenticode and SmartScreen<\/a><\/li>\n<li><a href=\"#why-is-this-important\">Why is this important?<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#our-mitigations-and-short-term-plan\">Our mitigations and short-term plan<\/a><\/li>\n<li><a href=\"#how-you-could-help\">How you could help<\/a><\/li>\n<li><a href=\"#conclusion\">Conclusion<\/a><\/li>\n<\/ul>\n<\/div>\n<h2 id=\"what-is-a-code-signing-certificate\">What is a Code Signing Certificate?<\/h2>\n<blockquote>\n<p><strong>Note:<\/strong><br \/>\nIf you are familiar with the concept, feel free to skip this section, and head<br \/>\nto <a href=\"#how-this-might-affect-you\">How this might affect you<\/a>.<\/p>\n<p>The goal here is to introduce the topic in an accessible fashion.<\/p>\n<\/blockquote>\n<p>Microsoft and other vendors use Code Signing Certificates to ensure<br \/>\n<strong>authenticity<\/strong> and <strong>integrity<\/strong> of the software you use.<br \/>\nThat is, this helps ensure that you are using software from <strong>Publishers you<br \/>\ntrust<\/strong> and that such software has not been modified before reaching you.<\/p>\n<p>But what are these Certificates really? Well, the way they work is that a<br \/>\n<strong>Software Publisher<\/strong> like <a href=\"https:\/\/camilion.eu\/es\/\">Camilion<\/a> applies for a<br \/>\nCode Signing Certificate to a Certification Authority (<strong>CA<\/strong> for short);<br \/>\nthis process has a cost and the CA performs several checks on the company and<br \/>\nthe people people behind it.<\/p>\n<p>When the Certification Authority (<strong>CA<\/strong>) approves the application, they issue<br \/>\nthe Code Signing Certificate,<br \/>\nwhich is composed of a public part and a private part which must be kept secret<br \/>\nat all costs.<\/p>\n<p><a href=\"https:\/\/camilion.eu\/security\/2022_Camilion_CodeSigning.p7b\">Such a certificate<\/a> might look like this on your computer:<\/p>\n<p><img decoding=\"async\" alt=\"Camilion Code Signing Cert 2022\" src=\"https:\/\/camilion.eu\/wp-content\/uploads\/2024\/02\/camilion2022cert.png\" title=\"\"><\/p>\n<p>Note that <code>Issued to<\/code> contains the name of our legal entity (we are an <code>S.L.<\/code>, which is a Society with Limited Liability based in Barcelona) and <code>Issued by<\/code> contains the name of a <strong>Code Signing Certification Authority<\/strong>.<\/p>\n<p>This is used by Windows and other software to establish a so-called <strong>Chain of<br \/>\nTrust<\/strong> (<a href=\"https:\/\/camilion.eu\/security\/2022_Camilion_CodeSigning.p7b\">try it yourself<\/a>!):<\/p>\n<p><img decoding=\"async\" alt=\"Camilion Code Signing Chain of Trust 2022\" src=\"https:\/\/camilion.eu\/wp-content\/uploads\/2024\/02\/camilion2022chain-1.png\" title=\"\"><\/p>\n<p>That is, Windows trusts the top-most certificate (also called a Root CA) and,<br \/>\neach certificate signs (or <em>trusts<\/em>) the next certificate down the chain,<br \/>\nuntil we reach ours.<br \/>\nIf such a Chain of Trust can be established, the &ldquo;<strong>Certificate is OK<\/strong>&rdquo; and will<br \/>\nbe trusted.<\/p>\n<p>Should a publisher misuse their certificate, it will end up being revoked and<br \/>\nthey will have issues getting a new one in the future.<\/p>\n<h2 id=\"how-this-might-affect-you\">How this might affect you<\/h2>\n<p>So far so good, we have our own, valid <a href=\"https:\/\/camilion.eu\/security\/2022_Camilion_CodeSigning.p7b\">Code Signing Certificates<\/a><br \/>\nthat are trusted by Windows.<\/p>\n<h3 id=\"authenticode-and-smartscreen\">Authenticode and SmartScreen<\/h3>\n<p>At least in theory!<br \/>\nIn the case of Microsoft and, particularly Windows and Office products, on top<br \/>\nof the Chain of Trust there are a couple opaque systems called<br \/>\n<strong>Authenticode<\/strong> and <strong>SmartScreen<\/strong>.<\/p>\n<p>They assign <em>reputation<\/em> to a Certificate and\/or a Publisher and it is quite<br \/>\nunclear how this reputation is managed.<\/p>\n<p>The general consensus amongst publishers is that there is some magic usage count<br \/>\nand time period, after which these Microsoft-specific systems start trusting a<br \/>\nnew certificate.<\/p>\n<h3 id=\"why-is-this-important\">Why is this important?<\/h3>\n<p>The longest validity we can get for a Code Signing Certificate is <strong>3 years<\/strong>,<br \/>\nwhich means changes are bound to happen.<\/p>\n<p>For example, our <a href=\"https:\/\/camilion.eu\/security\/2019_Camilion_CodeSigning.p7b\">current Certificate<\/a> expires on March 11th 2022<br \/>\nand will not be valid after that.<\/p>\n<p>We already got a <a href=\"https:\/\/camilion.eu\/security\/2022_Camilion_CodeSigning.p7b\">new Certificate<\/a>, but Authenticode and SmartScreen<br \/>\nmean that that a new Certificate will not immediately be trusted, but instead<br \/>\nits <em>reputation<\/em> will be built up over time.<\/p>\n<p><img decoding=\"async\" alt=\"Camilion Code Signing Cert 2019\" src=\"https:\/\/camilion.eu\/wp-content\/uploads\/2024\/02\/camilion2019cert.png\" title=\"\"><\/p>\n<h2 id=\"our-mitigations-and-short-term-plan\">Our mitigations and short-term plan<\/h2>\n<p>If you use our products already, our <a href=\"https:\/\/camilion.eu\/security\/2022_Camilion_CodeSigning.p7b\">new certificate<\/a>, along with<br \/>\nthat of the intermediate Certification Authorities will be deployed in the next<br \/>\nfew days.<br \/>\nYou won&rsquo;t have to do anything. Software like Autodesk\u00ae <strong>Revit\u00ae<\/strong> or<br \/>\n<strong>AutoCAD\u00ae<\/strong>, <strong>will trust<\/strong> our new certificate.<\/p>\n<p>We will be publishing a new version of our plugins signed by both our<br \/>\n<a href=\"https:\/\/camilion.eu\/security\/2019_Camilion_CodeSigning.p7b\">old<\/a> and <a href=\"https:\/\/camilion.eu\/security\/2022_Camilion_CodeSigning.p7b\">new certificates<\/a>, this will help establish<br \/>\nreputation on the new certificate and also it gives you an extra ease of mind<br \/>\nthat it is still us going forward.<\/p>\n<p><img decoding=\"async\" alt=\"Double signature\" src=\"https:\/\/camilion.eu\/wp-content\/uploads\/2024\/02\/doublesignature.png\" title=\"\"><\/p>\n<p>For some of our software (notably: <a href=\"https:\/\/camilion.eu\/en\/apps\/AttMan\/\">AttMan<\/a>), double signatures are<br \/>\nnot an option due to a limitation in the way their publishing works.<\/p>\n<p>But worry not, we are publishing a new version for all our software where we<br \/>\nmake sure that a Timestamp Server is used.<br \/>\nUsing a Timestamp Server ensures that at the time of the signature, the<br \/>\ncertificate was still valid.<\/p>\n<p>This means two things:<\/p>\n<ul>\n<li>Software like <a href=\"https:\/\/camilion.eu\/en\/apps\/AttMan\/\">AttMan<\/a> can still be used after March 11th 2022 because<br \/>\n  the Timestamp makes the signature valid, even after the certificate expires.<\/li>\n<li>We will not be able to update Software like <a href=\"https:\/\/camilion.eu\/en\/apps\/AttMan\/\">AttMan<\/a> until our new<br \/>\n  certificate has enough <em>reputation<\/em>.<\/li>\n<\/ul>\n<h2 id=\"how-you-could-help\">How you could help<\/h2>\n<p>We are publishing our installer in two flavours:<\/p>\n<ul>\n<li><a href=\"https:\/\/apps.camilion.eu\/bin\/desktop\/installer\/setup.exe\">Doubly signed<\/a>, with the <a href=\"https:\/\/camilion.eu\/security\/2019_Camilion_CodeSigning.p7b\">old<\/a> and the <a href=\"https:\/\/camilion.eu\/security\/2022_Camilion_CodeSigning.p7b\">new certificate<\/a><\/li>\n<li><a href=\"https:\/\/apps.camilion.eu\/bin\/desktop\/installer\/setup-newcert.exe\">Singly signed<\/a>, only with the <a href=\"https:\/\/camilion.eu\/security\/2022_Camilion_CodeSigning.p7b\">new certificate<\/a><\/li>\n<\/ul>\n<p>They are exactly the same, except for the signatures.<br \/>\nBy downloading and executing the installer that is only signed with the new<br \/>\ncertificate <a href=\"https:\/\/apps.camilion.eu\/bin\/desktop\/installer\/setup-newcert.exe\">here<\/a>, and telling SmartScreen that it is<br \/>\ntrustworthy (see also <a href=\"https:\/\/camilion.eu\/en\/blog\/2021-how-to-install-camilion-plugins\/\">this post<\/a>) the time necessary to establish<br \/>\n<em>reputation<\/em> for the new certificate will be shorter.<\/p>\n<p>Trying to avoid any kind of issues for you, we contacted Microsoft.<br \/>\nIf you want, you can read their reply:<\/p>\n<details>\n<blockquote><p>\n\u00abThe warning you experienced indicates that neither the application nor the signing certificate had established reputation with Microsoft Defender SmartScreen services at the time. We can confirm that setup-newcert.exe is clean and since it has an established reputation while attempting to download or run the application it should no longer show any warnings. The signing certificate (ea97faaed47eefd53989bcf692d1286b5a786302) is still in the process of establishing reputation. Once it does, all applications that are signed with that certificate should have a warn-free experience from the start. Thank you for contacting Microsoft.\u00bb\n<\/p><\/blockquote>\n<\/details>\n<h2 id=\"conclusion\">Conclusion<\/h2>\n<p>We have been planning this migration for months now and hope it will affect you<br \/>\nas little as possible.<\/p>\n<p>As you can see it is not an easy topic and certainly not one you want to take<br \/>\ncare of, so why don&rsquo;t you let us do that for you?<\/p>\n<p>Get in touch with us and let us discuss your workflow automation, integrations<br \/>\nor customisations; we are here to help!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are many things that you get not to worry about when using our products<br \/>\nas opposed to rolling out your own.<\/p>\n<p>One of them is: securely and reliably distributing plugins and keeping them up<br \/>\nto date. This, turns out, is not an easy feat and is full of<br \/>\n<a href=\"https:\/\/camilion.eu\/en\/blog\/2022-security-tls-proxies\/\">tricky details<\/a>.<\/p>\n<p>Code signing certificates are one such tricky detail, here we explain how<br \/>\nwe take care of them, and how an upcoming change might affect you.<\/p>\n","protected":false},"author":1,"featured_media":1226,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[192],"tags":[],"dipi_cpt_category":[],"class_list":["post-2096","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howto-es"],"acf":[],"_links":{"self":[{"href":"https:\/\/camilion.eu\/es\/wp-json\/wp\/v2\/posts\/2096","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/camilion.eu\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/camilion.eu\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/camilion.eu\/es\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/camilion.eu\/es\/wp-json\/wp\/v2\/comments?post=2096"}],"version-history":[{"count":3,"href":"https:\/\/camilion.eu\/es\/wp-json\/wp\/v2\/posts\/2096\/revisions"}],"predecessor-version":[{"id":2160,"href":"https:\/\/camilion.eu\/es\/wp-json\/wp\/v2\/posts\/2096\/revisions\/2160"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/camilion.eu\/es\/wp-json\/wp\/v2\/media\/1226"}],"wp:attachment":[{"href":"https:\/\/camilion.eu\/es\/wp-json\/wp\/v2\/media?parent=2096"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/camilion.eu\/es\/wp-json\/wp\/v2\/categories?post=2096"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/camilion.eu\/es\/wp-json\/wp\/v2\/tags?post=2096"},{"taxonomy":"dipi_cpt_category","embeddable":true,"href":"https:\/\/camilion.eu\/es\/wp-json\/wp\/v2\/dipi_cpt_category?post=2096"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}