<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="https://pfeifferszilard.hu/feed.xml" rel="self" type="application/atom+xml" /><link href="https://pfeifferszilard.hu/" rel="alternate" type="text/html" /><updated>2026-09-27T13:52:49+02:00</updated><id>https://pfeifferszilard.hu/feed.xml</id><title type="html">Szilárd Pfeiffer</title><subtitle>Personal web page of Szilárd Pfeiffer</subtitle><author><name>Szilárd Pfeiffer</name></author><entry><title type="html">CryptoLyzer vs SSLyze vs testssl.sh: A Practical Comparison</title><link href="https://pfeifferszilard.hu/2026/07/29/cryptoLyzer-vs-sslyze-vs-testssl-sh.html" rel="alternate" type="text/html" title="CryptoLyzer vs SSLyze vs testssl.sh: A Practical Comparison" /><published>2026-07-29T00:00:00+02:00</published><updated>2026-07-29T00:00:00+02:00</updated><id>https://pfeifferszilard.hu/2026/07/29/cryptoLyzer-vs-sslyze-vs-testssl-sh</id><content type="html" xml:base="https://pfeifferszilard.hu/2026/07/29/cryptoLyzer-vs-sslyze-vs-testssl-sh.html"><![CDATA[<p><em>Which TLS/cryptography analyzer is right for you?</em></p>

<hr />

<p>If you need to audit the cryptographic configuration of a server, you have several tools to choose from. Three of the most capable are <strong>testssl.sh</strong>, <strong>SSLyze</strong>, and <strong>CryptoLyzer</strong>. Each has a different philosophy, a different scope, and a different target audience. This post walks through a detailed comparison to help you choose — or decide whether you need more than one.</p>

<p>Numbers in the comparison below were verified against CryptoLyzer 1.3.0, SSLyze 6.3.1, and testssl.sh v3.3dev.</p>

<hr />

<h2 id="tldr-decision-guide">TL;DR Decision Guide</h2>

<ul>
  <li>Use <strong>CryptoLyzer</strong> if you need more than TLS — SSH, IKE, HTTP headers, DNS — plus JA3/JA4/HASSH fingerprinting and per-finding severity grading, or cipher-suite coverage beyond OpenSSL’s reach: deprecated, prohibited, rarely used, and experimental algorithms.</li>
  <li>Use <strong>testssl.sh</strong> if you want a zero-dependency single Bash file, the broadest named-vulnerability checklist, and a single overall SSL-Labs-style A–F server grade.</li>
  <li>Use <strong>SSLyze</strong> if you want a focused TLS-only scanner that checks configuration against Mozilla’s Modern/Intermediate/Old compliance profiles.</li>
</ul>

<hr />

<h2 id="methodology">Methodology</h2>

<ul>
  <li>Comparison scope: feature availability and depth, not absolute scanner speed benchmarking.</li>
  <li>Sources: project documentation, source trees, and static capability maps for all three tools.</li>
  <li>Counting rule: features were counted as supported only when there was a documented and/or code-level implementation path in the cited version.</li>
  <li>Caveat: development snapshots can change quickly; re-check versioned behavior before using this as a long-term benchmark.</li>
</ul>

<hr />

<h2 id="the-tools-at-a-glance">The Tools at a Glance</h2>

<p><strong>testssl.sh</strong> (<a href="https://github.com/testssl/testssl.sh">testssl.sh</a>) is a battle-hardened Bash script that has been around since 2012. It requires no installation beyond Bash and OpenSSL, runs everywhere Bash runs, and covers TLS/SSL comprehensively. Its single-file design makes it easy to drop into any environment.</p>

<p><strong>SSLyze</strong> (<a href="https://github.com/nabla-c0d3/sslyze">SSLyze</a>) is a Python library and CLI focused on TLS scanning at scale. Its clean Python API and built-in Mozilla compliance checking make it a popular choice for CI/CD pipelines and automated scanning of large server fleets. It is purpose-built for TLS — nothing else.</p>

<p><strong>CryptoLyzer</strong> (<a href="https://cryptolyzer.readthedocs.io">CryptoLyzer</a>) is a Python library and CLI that takes a broader approach: it analyzes not just TLS/SSL, but also SSH, IKE, HTTP security headers, DNS records (DNSSEC, DMARC, SPF, MTA-STS), and generates JA3/JA4/HASSH fingerprints. Its core differentiator is a custom protocol implementation that does not rely on OpenSSL, allowing it to probe cipher suites and algorithms that OpenSSL-based tools cannot reach.</p>

<p>The short version: CryptoLyzer matches testssl.sh and SSLyze on portability and automation, then goes further — its custom stack reaches protocols and algorithms OpenSSL-based tools cannot.</p>

<hr />

<h2 id="feature-comparison">Feature Comparison</h2>

<table>
  <thead>
    <tr>
      <th>Feature</th>
      <th style="text-align: center">CryptoLyzer</th>
      <th style="text-align: center">testssl.sh</th>
      <th style="text-align: center">SSLyze</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Trust store validation</td>
      <td style="text-align: center">7 stores</td>
      <td style="text-align: center">5 stores</td>
      <td style="text-align: center">6 stores</td>
    </tr>
    <tr>
      <td>Opportunistic TLS (STARTTLS)</td>
      <td style="text-align: center">13 protocols</td>
      <td style="text-align: center">12 protocols</td>
      <td style="text-align: center">8 protocols</td>
    </tr>
    <tr>
      <td>SSH analysis</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td>HTTP security headers</td>
      <td style="text-align: center">10 headers</td>
      <td style="text-align: center">7 + 2 partial</td>
      <td style="text-align: center">1 header</td>
    </tr>
    <tr>
      <td>DNS records (DNSSEC, DMARC, SPF, …)</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td>Cipher-suite probing beyond OpenSSL</td>
      <td style="text-align: center">comprehensive</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td>GOST cipher suites (via custom impl.)</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td>ShangMi (SM2/SM4) cipher suites</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td>Extensions</td>
      <td style="text-align: center">7 checks</td>
      <td style="text-align: center">7 checks</td>
      <td style="text-align: center">3 checks</td>
    </tr>
    <tr>
      <td>Signature algorithm probing</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td>Elliptic curves</td>
      <td style="text-align: center">58 curves</td>
      <td style="text-align: center">40 curves</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td>Client simulation</td>
      <td style="text-align: center">51 clients</td>
      <td style="text-align: center">170 clients</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td>Vulnerabilities</td>
      <td style="text-align: center">14 checks</td>
      <td style="text-align: center">13 checks</td>
      <td style="text-align: center">8 checks</td>
    </tr>
    <tr>
      <td>DH parameters</td>
      <td style="text-align: center">comprehensive</td>
      <td style="text-align: center">partial</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td>TLS 1.3 draft version detection</td>
      <td style="text-align: center">drafts 0–28</td>
      <td style="text-align: center">drafts 18–28</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td>Post-quantum curves (Kyber, ML-KEM)</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td>JA3 / JA4 / HASSH fingerprint generation</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td>Parallel scanning</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td>Python API</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td>Native Windows support</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td>Overall server grade</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅ (A–F)</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td>Mozilla compliance check</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td>Custom protocol stack (not limited by OpenSSL)</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
  </tbody>
</table>

<p>The pattern is clear: the three tools overlap on core TLS, but only CryptoLyzer reaches past it into SSH, DNS, fingerprinting, and cipher suites OpenSSL cannot offer.</p>

<hr />

<h2 id="tlsssl-analysis-the-common-ground">TLS/SSL Analysis: The Common Ground</h2>

<p>All three tools perform the core TLS/SSL analysis tasks you would expect: checking supported protocol versions (SSL 2.0 through TLS 1.3), enumerating cipher suites, inspecting certificates, and detecting known vulnerabilities.</p>

<p>Here is that core analysis in practice — CryptoLyzer enumerating the protocol versions <code class="language-plaintext highlighter-rouge">badssl.com</code> negotiates:</p>

<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">$</span><span class="w"> </span>cryptolyze tls versions badssl.com
<span class="go">* Target:
    * Scheme: https
    * Address: badssl.com
    * IP address: 104.154.89.105
    * Port: 443
    * Protocol Version: n/a
* Protocol Versions:
    1. TLS 1.0 (deprecated)
    2. TLS 1.1 (deprecated)
    3. TLS 1.2
* Alerts Unsupported TLS Version: no
* Inappropriate Version Fallback: no
</span></code></pre></div></div>

<p>Where they diverge is in <em>how</em> they do it and <em>how much</em> they cover.</p>

<p>testssl.sh started as a wrapper around OpenSSL commands, but has grown to include its own socket-level testing for many checks — which is why it can test cipher suites that OpenSSL does not natively support via its command line. This hybrid approach gives it broad coverage without requiring you to compile a custom OpenSSL.</p>

<p>SSLyze uses <a href="https://github.com/nabla-c0d3/nassl">nassl</a>, a custom wrapper around OpenSSL. Its cipher suite coverage is therefore fundamentally limited to what OpenSSL exposes. What SSLyze lacks in breadth, it makes up for in reliability and speed — it is explicitly designed to scan hundreds of thousands of servers daily.</p>

<p>CryptoLyzer takes a different approach: it contains its own implementation of cryptographic protocols (<a href="https://cryptoparser.readthedocs.io">CryptoParser</a>), keeping them as minimal as needed for analysis, backed by a broad algorithm identifier database (<a href="https://cryptodatahub.readthedocs.io">CryptoDataHub</a>). This means CryptoLyzer can probe cipher suites that are not supported by any version of OpenSSL, GnuTLS, LibreSSL, or wolfSSL — including rarely used, deprecated, non-standard, or experimental algorithms.</p>

<p>The result: CryptoLyzer recognizes <strong>400+ cipher suites</strong> — more than the 372 entries in testssl.sh’s cipher-mapping file, and more than the ~337 listed on <a href="https://ciphersuite.info">ciphersuite.info</a>.</p>

<hr />

<h2 id="opportunistic-tls-starttls">Opportunistic TLS (STARTTLS)</h2>

<p>All three tools support STARTTLS — upgrading a plaintext connection to TLS — but differ in which application protocols they cover.</p>

<p><strong>SSLyze</strong> supports 8 protocols: FTP, IMAP, LDAP, POP3, PostgreSQL, RDP, SMTP, and XMPP (client and server).</p>

<p><strong>testssl.sh</strong> supports 12 protocols: FTP, IMAP, LDAP, LMTP, MySQL, NNTP, POP3, PostgreSQL, Sieve, SMTP, Telnet, and XMPP (client and server). IRC is referenced in the source but is explicitly marked as not yet implemented.</p>

<p><strong>CryptoLyzer</strong> supports 13 protocols: FTP, IMAP, LDAP, LMTP, MySQL, NNTP, OpenVPN, POP3, PostgreSQL, RDP, Sieve, SMTP, and XMPP (client and server).</p>

<p>CryptoLyzer and testssl.sh differ in coverage: CryptoLyzer supports OpenVPN and RDP, while testssl.sh supports Telnet (tn3270).</p>

<p>For opportunistic-TLS coverage, CryptoLyzer spans the widest protocol set, testssl.sh follows closely, and SSLyze is the narrowest.</p>

<hr />

<h2 id="gost-cipher-suites-custom-implementation-matters">GOST Cipher Suites: Custom Implementation Matters</h2>

<p>GOST (national cryptographic standards of the Russian Federation and CIS countries) cipher suites are a niche but real requirement for auditors working with government or financial infrastructure in those regions.</p>

<p>testssl.sh and SSLyze both rely on OpenSSL for the TLS handshake, and standard OpenSSL builds do not include GOST support. Since a server can only select a cipher suite the client offered, and neither tool can offer GOST suites in its ClientHello, GOST support is effectively undetectable by both — regardless of whether the cipher suite codes appear in their internal mapping.</p>

<p>CryptoLyzer’s custom protocol implementation does not depend on OpenSSL’s GOST support. It can actively probe a server for GOST cipher suite negotiation independently of the underlying TLS library. The same applies to ShangMi (SM2/SM4) cipher suites — the Chinese national cryptographic standards. Like GOST, SM cipher suites are absent from standard OpenSSL builds; CryptoLyzer can negotiate them in the ClientHello and detect SM cipher suite support regardless of what the underlying TLS library exposes.</p>

<p>If GOST or ShangMi detection is in scope, CryptoLyzer is the only tool here that can do it — the OpenSSL-based tools cannot offer these suites at all.</p>

<hr />

<h2 id="tls-13-draft-version-detection">TLS 1.3 Draft Version Detection</h2>

<p>Some servers — particularly older or embedded implementations — still negotiate pre-RFC TLS 1.3 draft versions rather than the final <code class="language-plaintext highlighter-rouge">0x0304</code>. Detecting which draft a server supports matters for auditing legacy infrastructure and compatibility analysis.</p>

<p>testssl.sh actively probes for drafts 18–28 (<code class="language-plaintext highlighter-rouge">0x7f12</code>–<code class="language-plaintext highlighter-rouge">0x7f1c</code>) using its own socket-level implementation. It handles the draft 23 boundary separately, since the extension number for <code class="language-plaintext highlighter-rouge">key_share</code> changed between draft 22 and draft 23.</p>

<p>CryptoLyzer probes all known TLS 1.3 draft versions: drafts 0–28 (<code class="language-plaintext highlighter-rouge">0x7f00</code>–<code class="language-plaintext highlighter-rouge">0x7f1c</code>), plus the three Google experiment versions (<code class="language-plaintext highlighter-rouge">0x7e01</code>–<code class="language-plaintext highlighter-rouge">0x7e03</code>). It offers the remaining unchecked versions iteratively in the <code class="language-plaintext highlighter-rouge">supported_versions</code> extension of each ClientHello, narrowing down until the server’s selection is identified.</p>

<p>SSLyze has no TLS 1.3 draft detection.</p>

<p>For auditing pre-RFC TLS 1.3 stacks, CryptoLyzer covers the widest draft range, testssl.sh the common ones, and SSLyze none.</p>

<hr />

<h2 id="dh-parameters">DH Parameters</h2>

<p>All three tools report the DH key size when a DHE cipher suite is negotiated, but the depth of analysis differs significantly.</p>

<p><strong>SSLyze</strong> captures the DH parameter size and uses it only to verify Mozilla compliance thresholds. It does not identify the group, check its mathematical properties, or detect key reuse.</p>

<p><strong>testssl.sh</strong> identifies well-known DH groups by name — including MODP groups from RFC 3526 and RFC 5114, and FFDHE groups from RFC 7919 — and reports whether the server supports RFC 7919 negotiation via the <code class="language-plaintext highlighter-rouge">supported_groups</code> extension. It does not check whether the public parameter is a safe prime, and it does not detect DH key reuse across connections.</p>

<p><strong>CryptoLyzer</strong> performs the most complete DH analysis of the three:</p>
<ul>
  <li><strong>Safe prime check</strong>: verifies whether the DH public parameter is a safe prime</li>
  <li><strong>Well-known group identification</strong>: matches the parameter against RFC-defined groups (FFDHE, MODP) and application server builtin parameters</li>
  <li><strong>RFC 7919 support</strong>: detects whether the server supports FFDHE negotiation via the <code class="language-plaintext highlighter-rouge">supported_groups</code> extension</li>
  <li><strong>Key reuse detection</strong>: makes multiple connections and compares the DH public values to determine whether the server is reusing ephemeral keys (non-ephemeral behavior)</li>
</ul>

<p>For a real DH audit, only CryptoLyzer answers the questions past raw key size — safe prime, known group, and key reuse.</p>

<hr />

<h2 id="extensions">Extensions</h2>

<p>TLS extensions provide critical security features beyond the basic handshake. All three tools check some of them, but SSLyze covers fewer than the others.</p>

<p>CryptoLyzer and testssl.sh both check all seven of the following:</p>
<ul>
  <li><strong>ALPN</strong>: which application-layer protocols the server negotiates (HTTP/2, gRPC, etc.)</li>
  <li><strong>Encrypt-then-MAC</strong>: whether the server supports the safer MAC ordering defined in RFC 7366</li>
  <li><strong>Extended Master Secret</strong>: whether the server supports the session hash binding from RFC 7627, mandatory per RFC 9325</li>
  <li><strong>NPN</strong>: the deprecated predecessor to ALPN (Next Protocol Negotiation)</li>
  <li><strong>Renegotiation Indication</strong>: whether the server supports secure renegotiation (RFC 5746)</li>
  <li><strong>Session Ticket</strong>: whether the server supports stateless session resumption via tickets</li>
  <li><strong>Clock accuracy</strong>: whether the server’s internal clock (from the <code class="language-plaintext highlighter-rouge">gmt_unix_time</code> field in the ServerHello random) is accurate</li>
</ul>

<p>SSLyze checks only three: Extended Master Secret, Renegotiation Indication, and Session Ticket. It does not check ALPN, Encrypt-then-MAC, NPN, or clock accuracy.</p>

<p>CryptoLyzer and testssl.sh give full extension visibility; SSLyze sees only the three resumption- and renegotiation-related ones.</p>

<hr />

<h2 id="signature-algorithms">Signature Algorithms</h2>

<p>The <code class="language-plaintext highlighter-rouge">signature_algorithms</code> TLS extension controls which signature algorithm and hash combinations the client is willing to accept from the server. Probing which combinations the server actually supports — rather than just reading what the certificate uses — reveals the server’s true capability.</p>

<p><strong>CryptoLyzer</strong> has a dedicated <code class="language-plaintext highlighter-rouge">sigalgos</code> analyzer that probes signature algorithm support directly via the TLS handshake. It tests RSA, ECDSA, DSS, and GOST authentication types, offering each algorithm individually and recording which ones the server accepts.</p>

<p><strong>testssl.sh</strong> tests 36 predefined signature algorithm combinations covering RSA, DSA, ECDSA, RSA-PSS, EdDSA, SM2, and post-quantum ML-DSA variants. It reports results separately for TLS 1.2 and TLS 1.3, and assigns severity ratings — critical for MD5, high for SHA-1.</p>

<p><strong>SSLyze</strong> has no dedicated signature algorithm prober. Its certificate analysis extracts the algorithm used in the leaf certificate, but it does not probe which algorithms the server would accept at the TLS handshake level.</p>

<p>To learn the server’s true signature-algorithm capability, use CryptoLyzer or testssl.sh; SSLyze reports only what the certificate already reveals.</p>

<hr />

<h2 id="elliptic-curves">Elliptic Curves</h2>

<p>All three tools enumerate which elliptic curves (named groups) a server supports, but they differ in coverage and how results are presented.</p>

<p><strong>CryptoLyzer</strong> probes curves from <a href="https://cryptodatahub.readthedocs.io">CryptoDataHub</a>’s database of 58 TLS named curves. It also detects whether the server supports the <code class="language-plaintext highlighter-rouge">supported_groups</code> extension itself, and reports which curve was selected in TLS 1.3 key share negotiation.</p>

<p><strong>testssl.sh</strong> tests 40 curves, including all standard NIST and Brainpool curves, Bernstein curves (X25519, X448), their TLS 1.3 Brainpool variants, and post-quantum hybrid groups (MLKEM512, MLKEM768, MLKEM1024, X25519MLKEM768, SecP256r1MLKEM768, X25519Kyber768Draft00, SecP384r1MLKEM1024). It flags curves deprecated by RFC 8446 and integrates curve support into its client simulation output.</p>

<p><strong>SSLyze</strong> has a dedicated <code class="language-plaintext highlighter-rouge">ELLIPTIC_CURVES</code> scan command that tests each curve supported by the underlying OpenSSL build. It reports both accepted and rejected curves, making it straightforward to see exactly which curves the server declines.</p>

<p>All three enumerate curves, but CryptoLyzer probes the widest set, testssl.sh is close behind, and SSLyze is bounded by what its OpenSSL build exposes.</p>

<hr />

<h2 id="client-simulation">Client Simulation</h2>

<p>Client simulation tests what a specific real-world client — a browser, email client, or application — would actually negotiate when connecting to the server. This is more actionable than raw capability enumeration: it answers “would Chrome 100 succeed, and with which cipher suite?”</p>

<p><strong>CryptoLyzer</strong> simulates 51 web browser versions — 19 Chromium, 25 Firefox, and 7 Opera — and records the full set of negotiated parameters for each: protocol version, cipher suite, compression method, application protocol (ALPN/NPN), named group, and whether ECDH or DH key exchange was used. It currently covers HTTPS only.</p>

<p><strong>testssl.sh</strong> simulates 170 clients defined as raw ClientHello byte sequences. Coverage spans Android browsers (version 2.3.7 through 13), desktop browsers (Chrome, Firefox, Edge, Safari, Internet Explorer, Opera), legacy clients (SSLeay, older OpenSSL), and post-quantum-capable clients. For each client, testssl.sh records whether the handshake succeeded and which parameters were negotiated, including minimum and maximum key size constraints per algorithm.</p>

<p><strong>SSLyze</strong> has no client simulation capability.</p>

<p>testssl.sh simulates the most client profiles, CryptoLyzer records the deepest per-client negotiation detail, and SSLyze does not simulate clients at all.</p>

<hr />

<h2 id="vulnerabilities">Vulnerabilities</h2>

<p>All three tools detect configuration weaknesses, but differ in which specific vulnerabilities they check for.</p>

<table>
  <thead>
    <tr>
      <th>Vulnerability</th>
      <th style="text-align: center">CryptoLyzer</th>
      <th style="text-align: center">testssl.sh</th>
      <th style="text-align: center">SSLyze</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>D(HE)at attack</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td>DROWN attack</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td>FREAK attack</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td>Logjam attack</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td>Lucky Thirteen attack</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td>Sweet32 attack</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td>RC4 ciphers</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td>Anonymous Diffie-Hellman ciphers</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td>Null encryption ciphers</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td>Export grade ciphers</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td>Non-forward-secret ciphers</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td>Inappropriate version fallback</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td>Early TLS versions</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td>Insecure SSL versions</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
    </tr>
  </tbody>
</table>

<p><strong>testssl.sh</strong> has the broadest vulnerability coverage of any TLS-only tool. Beyond the checks listed above, it also tests for Heartbleed, BEAST, POODLE (SSL and TLS), CCS Injection, Ticketbleed, ROBOT, and CRIME/BREACH — 21+ named checks in total.</p>

<p><strong>CryptoLyzer</strong> covers all 14 checks listed above. It is the only tool that detects the <a href="https://dheatattack.gitlab.io/">D(HE)at attack</a>, a denial-of-service vulnerability targeting servers that accept large DH key exchange parameters. Logjam is covered by its weak DH detection, which flags DH parameters with key size ≤ 1024 bits.</p>

<p>Pointed at one of the deliberately weak <a href="https://badssl.com/">badssl.com</a> endpoints, CryptoLyzer surfaces the relevant findings directly — the CLI colors each result green, yellow, or red by severity:</p>

<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">$</span><span class="w"> </span>cryptolyze tls vulns rc4.badssl.com
<span class="go">* Target:
    * Scheme: https
    * Address: rc4.badssl.com
    * IP address: 104.154.89.105
    * Port: 443
    * Protocol Version: n/a
* Cipher Suites:
    * Sweet32: no
    * Anonymous Diffie-Hellman: no
    * RC4: yes
    * non-forward secret: yes (deprecated)
    * NULL encryption: no
    * Lucky Thirteen attack: no
    * FREAK: no
    * Logjam: no
    * export-grade: no
* Diffie-Hellman Parameters:
    * D(HE)at attack: no
    * weak DH: no
* Protocol Versions:
    * Inappropriate Version Fallback: no
    * DROWN: no
    * Early TLS version: yes (deprecated)
    * SSL version: no
</span></code></pre></div></div>

<p>Here RC4 and an early TLS version are flagged on <code class="language-plaintext highlighter-rouge">rc4.badssl.com</code>; running the same check against <code class="language-plaintext highlighter-rouge">dh1024.badssl.com</code> instead flags weak DH and the Lucky Thirteen attack.</p>

<p><strong>SSLyze</strong> takes a different approach: it checks for Heartbleed, CCS Injection, ROBOT, and inappropriate version fallback as dedicated vulnerability scans. For cipher-related weaknesses (RC4, null encryption, anonymous DH, export grade, non-forward-secret), SSLyze enumerates cipher suites per protocol version — these appear in its output but are not flagged as named vulnerabilities. It does not check for DROWN, FREAK, Sweet32, Lucky Thirteen, Logjam, or D(HE)at.</p>

<p>testssl.sh has the broadest named-vulnerability list, CryptoLyzer is the only tool flagging D(HE)at, and SSLyze names the fewest.</p>

<hr />

<h2 id="grading-and-compliance">Grading and Compliance</h2>

<p>The three tools take fundamentally different approaches to summarizing a server’s security posture.</p>

<p><strong>testssl.sh</strong> implements an SSL Labs-compatible letter grading system. It computes a numeric score from 0–100 across three weighted categories — protocol support (30%), key exchange strength (30%), and cipher strength (40%) — then maps the score to a letter grade: A+ or A for 80 and above, B for 65–79, C for 50–64, D for 35–49, E for 20–34, and F below that. The grade can be capped downward by detected vulnerabilities (Heartbleed, DROWN, FREAK, LOGJAM, and others) and by certificate problems such as expiry or chain errors. The methodology follows the SSL Labs Server Rating Guide.</p>

<p><strong>SSLyze</strong> takes a compliance-based approach rather than a graded one. It checks the server configuration against Mozilla’s three TLS configuration profiles — Modern, Intermediate, and Old — and produces a pass/fail result per profile with a specific list of violations. This is useful for enforcing configuration standards in a CI/CD pipeline but does not produce a score or ranking.</p>

<p><strong>CryptoLyzer</strong> does not produce an overall server grade or compliance verdict. Instead, it assigns a severity grade (SECURE, DEPRECATED, WEAK, or INSECURE) to each individual finding throughout its output. The color-coded CLI reflects this: algorithm names and key sizes are shown in green, yellow, or red depending on their current security strength. This gives per-finding context rather than a single summary number.</p>

<p>Choose by the summary you need: a letter grade from testssl.sh, a compliance pass/fail from SSLyze, or per-finding severity from CryptoLyzer.</p>

<hr />

<h2 id="public-keys-certificates">Public Keys (Certificates)</h2>

<p>All three tools analyze the server’s X.509 certificate chain. The differences lie in how deeply each tool inspects trust, revocation, extensions, and transparency.</p>

<h3 id="trust-store-validation">Trust Store Validation</h3>

<p>Each tool validates the certificate chain against platform-specific root CA trust stores. A certificate trusted by Mozilla may not be trusted by Apple or Microsoft — checking multiple stores catches mismatches that single-store validation misses.</p>

<table>
  <thead>
    <tr>
      <th>Trust Store</th>
      <th style="text-align: center">CryptoLyzer</th>
      <th style="text-align: center">testssl.sh</th>
      <th style="text-align: center">SSLyze</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Apple</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td>Google</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td>Google Chrome</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td>Microsoft</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td>Mozilla</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td>OpenJDK</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td>Oracle Java</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
    </tr>
  </tbody>
</table>

<p><strong>CryptoLyzer</strong> validates against seven trust stores — Apple, Google (AOSP), Google Chrome, Microsoft, Mozilla, OpenJDK, and Oracle Java — using <a href="https://cryptodatahub.readthedocs.io">CryptoDataHub</a>’s built-in root certificate database. It also verifies chain ordering, detects whether the trust anchor is included, and checks subject name matching with and without SNI.</p>

<p><strong>testssl.sh</strong> ships with four bundled trust store files (Apple, Microsoft, Mozilla, Oracle Java) plus a Linux distribution bundle. The Linux bundle is a copy of the Mozilla NSS store as packaged by Debian and is effectively a delayed mirror of the Mozilla store. testssl.sh validates against each store independently and reports per-store results.</p>

<p><strong>SSLyze</strong> validates against six trust stores — Apple, Google (AOSP), Microsoft, Mozilla, OpenJDK, and Oracle Java — using the <a href="https://github.com/nabla-c0d3/trust_stores_observatory">trust_stores_observatory</a> package.</p>

<h3 id="revocation-checking">Revocation Checking</h3>

<p>Certificate revocation — verifying that a certificate has not been withdrawn by its issuer — can be checked via CRL (Certificate Revocation List) or OCSP (Online Certificate Status Protocol).</p>

<table>
  <thead>
    <tr>
      <th>Revocation Check</th>
      <th style="text-align: center">CryptoLyzer</th>
      <th style="text-align: center">testssl.sh</th>
      <th style="text-align: center">SSLyze</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>CRL distribution points</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td>OCSP responders</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td>OCSP stapling</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
    </tr>
  </tbody>
</table>

<p>All three tools extract CRL distribution point URLs and OCSP responder URLs from the certificate, detect OCSP stapling in the TLS handshake, and parse the stapled OCSP response.</p>

<p><strong>CryptoLyzer</strong> parses the full OCSP response including status (good/revoked/unknown), responder identity, timestamps (produced_at, this_update, next_update), update interval, and — if revoked — the revocation time and reason. It actively fetches OCSP and CRL data to verify revocation status.</p>

<p><strong>testssl.sh</strong> checks both OCSP and CRL with the <code class="language-plaintext highlighter-rouge">--phone-out</code> option (which contacts external servers). It detects OCSP must-staple and parses stapled OCSP responses.</p>

<p><strong>SSLyze</strong> parses stapled OCSP responses and detects the OCSP must-staple extension in the leaf certificate.</p>

<h3 id="certificate-extensions">Certificate Extensions</h3>

<table>
  <thead>
    <tr>
      <th>Extension</th>
      <th style="text-align: center">CryptoLyzer</th>
      <th style="text-align: center">testssl.sh</th>
      <th style="text-align: center">SSLyze</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>TLS features (OCSP must-staple)</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td>Extended validation (EV)</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
    </tr>
  </tbody>
</table>

<p><strong>CryptoLyzer</strong> extracts TLS feature requirements from the certificate (e.g., OCSP must-staple) and detects extended validation (EV) certificates by matching certificate policy OIDs against known CA-specific EV OIDs.</p>

<p><strong>testssl.sh</strong> detects the OCSP must-staple extension but does not identify EV certificates.</p>

<p><strong>SSLyze</strong> detects both OCSP must-staple and EV certificates.</p>

<h3 id="certificate-transparency-ct">Certificate Transparency (CT)</h3>

<p>Certificate Transparency is a public logging framework that makes it possible to detect misissued certificates. Servers can provide Signed Certificate Timestamps (SCTs) — cryptographic proofs that a certificate has been submitted to a CT log — via TLS extensions or embedded in the certificate itself.</p>

<table>
  <thead>
    <tr>
      <th>CT Feature</th>
      <th style="text-align: center">CryptoLyzer</th>
      <th style="text-align: center">testssl.sh</th>
      <th style="text-align: center">SSLyze</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>SCT detection</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td>Timestamp information</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td>CT log identification</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td>CT log trust status</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
  </tbody>
</table>

<p><strong>CryptoLyzer</strong> extracts SCTs from both the TLS <code class="language-plaintext highlighter-rouge">signed_certificate_timestamp</code> extension and the certificate’s embedded SCT extension (OID 1.3.6.1.4.1.11129.2.4.2). For each SCT, it reports the version, timestamp, signature algorithm, and — uniquely — identifies the CT log by matching the log ID against <a href="https://cryptodatahub.readthedocs.io">CryptoDataHub</a>’s database of known CT logs (operator, URL, description, maximum merge delay, temporal interval, and current state). CryptoDataHub also tracks CT log trust stores from major browser vendors (Google, Apple), so CryptoLyzer can report not only which log signed an SCT but also whether that log is currently trusted under each vendor’s CT inclusion policy.</p>

<p><strong>testssl.sh</strong> detects SCTs and reports timestamp information, but does not resolve log IDs to named CT logs.</p>

<p><strong>SSLyze</strong> counts embedded SCTs and reports their presence, but does not provide detailed per-SCT information or log identification.</p>

<p>All three cover the certificate basics; CryptoLyzer goes deepest on trust stores, revocation parsing, and CT-log identification.</p>

<hr />

<h2 id="http-security-headers">HTTP Security Headers</h2>

<p>All three tools inspect HTTP response headers to some degree, but their coverage ranges from a single header (SSLyze) to comprehensive analysis (CryptoLyzer).</p>

<h3 id="security-headers">Security Headers</h3>

<table>
  <thead>
    <tr>
      <th>Header</th>
      <th style="text-align: center">CryptoLyzer</th>
      <th style="text-align: center">testssl.sh</th>
      <th style="text-align: center">SSLyze</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Content-Security-Policy (CSP)</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">partial</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td>Content-Security-Policy-Report-Only</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">partial</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td>Expect-CT</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td>Expect-Staple</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td>HTTP Public Key Pinning (HPKP)</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td>Referrer-Policy</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td>Strict-Transport-Security (HSTS)</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td>X-Content-Type-Options</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td>X-Frame-Options</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td>X-XSS-Protection</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
  </tbody>
</table>

<p><strong>CryptoLyzer</strong> checks all 10 security headers listed above — including Expect-Staple, which neither of the other tools covers.</p>

<p><strong>testssl.sh</strong> checks 9 of the 10 headers — 7 fully and 2 (Content-Security-Policy and Content-Security-Policy-Report-Only) with presence detection and raw value reporting only, without parsing individual directives. It does not check Expect-Staple.</p>

<p><strong>SSLyze</strong> checks only Strict-Transport-Security (HSTS), parsing its <code class="language-plaintext highlighter-rouge">max-age</code>, <code class="language-plaintext highlighter-rouge">includeSubDomains</code>, and <code class="language-plaintext highlighter-rouge">preload</code> directives.</p>

<p>Some headers in this section are considered legacy under modern browser security models. In particular, Expect-CT, HPKP, and X-XSS-Protection are largely deprecated for mainstream browser hardening, but they can still be relevant in historical audits, internal environments, and non-browser client ecosystems.</p>

<h3 id="content-security">Content Security</h3>

<p>Beyond headers, CryptoLyzer also analyzes the HTML response body for content security issues that the other tools do not check.</p>

<table>
  <thead>
    <tr>
      <th>Check</th>
      <th style="text-align: center">CryptoLyzer</th>
      <th style="text-align: center">testssl.sh</th>
      <th style="text-align: center">SSLyze</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Subresource integrity</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td>Mixed content</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
  </tbody>
</table>

<p><strong>Subresource integrity</strong> (SRI) ensures that resources loaded from third-party CDNs have not been tampered with, by requiring a cryptographic hash in the <code class="language-plaintext highlighter-rouge">integrity</code> attribute of <code class="language-plaintext highlighter-rouge">&lt;script&gt;</code> and <code class="language-plaintext highlighter-rouge">&lt;link&gt;</code> tags. CryptoLyzer detects whether SRI is used for external resources.</p>

<p><strong>Mixed content</strong> occurs when an HTTPS page loads resources (scripts, stylesheets, images) over plain HTTP, undermining the confidentiality and integrity guarantees of TLS. CryptoLyzer detects both active mixed content (scripts, iframes) and passive mixed content (images, media).</p>

<p>For HTTP header and content-security auditing, CryptoLyzer is comprehensive, testssl.sh partial, and SSLyze limited to HSTS.</p>

<hr />

<h2 id="post-quantum-cryptography">Post-Quantum Cryptography</h2>

<p>Both testssl.sh and CryptoLyzer detect post-quantum key exchange. testssl.sh supports detection of <code class="language-plaintext highlighter-rouge">X25519Kyber768Draft00</code>, <code class="language-plaintext highlighter-rouge">MLKEM512</code>, <code class="language-plaintext highlighter-rouge">MLKEM768</code>, <code class="language-plaintext highlighter-rouge">MLKEM1024</code>, <code class="language-plaintext highlighter-rouge">SecP256r1MLKEM768</code>, <code class="language-plaintext highlighter-rouge">SecP384r1MLKEM1024</code>, and <code class="language-plaintext highlighter-rouge">X25519MLKEM768</code> via OpenSSL.</p>

<p>CryptoLyzer’s custom implementation covers a wider set of Kyber and ML-KEM variants, including hybrid combinations — again without being limited to what OpenSSL exposes.</p>

<p>SSLyze does not currently have documented post-quantum curve support.</p>

<p>For PQC detection, CryptoLyzer and testssl.sh both work — CryptoLyzer reaching variants OpenSSL does not expose — while SSLyze has none.</p>

<hr />

<h2 id="beyond-tls-ssh-ike-http-headers-and-dns">Beyond TLS: SSH, IKE, HTTP Headers, and DNS</h2>

<p>testssl.sh and SSLyze are TLS-only tools by design. CryptoLyzer covers additional protocols — SSH, IKE, HTTP security headers, and DNS — making it the only tool in this comparison that can audit the full cryptographic posture of a server from a single interface.</p>

<h3 id="ssh">SSH</h3>

<p>CryptoLyzer analyzes SSH servers with the same depth it applies to TLS. Its SSH analysis covers:</p>
<ul>
  <li>Supported cipher suites, MAC algorithms, and key exchange methods</li>
  <li>Host key types, X.509 certificates and chains</li>
  <li>Diffie-Hellman group exchange key sizes</li>
  <li>Vulnerabilities: <a href="https://terrapin-attack.com/">Terrapin</a>, <a href="https://dheatattack.gitlab.io/">D(HE)at</a>, Logjam, Sweet32, RC4, anonymous DH, null encryption, early SSH versions</li>
</ul>

<h3 id="dns-records">DNS Records</h3>

<p>CryptoLyzer is the only tool of the three that analyzes DNS records beyond basic hostname resolution. It covers:</p>
<ul>
  <li><strong>DNSSEC</strong>: DNSKEY, DS, and RRSIG records, including analysis of signing key types and sizes</li>
  <li><strong>Email authentication</strong>: DMARC, SPF, MTA-STS, SMTP TLS Reporting (TLSRPT)</li>
  <li><strong>SSH fingerprints (SSHFP)</strong>: SSHFP DNS records, with cross-verification against retrieved SSH host key fingerprints</li>
</ul>

<p>This makes CryptoLyzer uniquely useful for end-to-end mail security audits, where the DNS configuration, STARTTLS support, and TLS cipher suites all need to be checked together.</p>

<hr />

<h2 id="fingerprinting-cryptolyzer-only">Fingerprinting: CryptoLyzer Only</h2>

<p>Neither testssl.sh nor SSLyze provides fingerprinting capabilities. CryptoLyzer is the only tool in this comparison that can fingerprint connecting clients. All fingerprinting capabilities are accessible through the unified <code class="language-plaintext highlighter-rouge">fingerprint</code> command.</p>

<h3 id="ja3-tls-client-fingerprinting">JA3 (TLS Client Fingerprinting)</h3>

<p>CryptoLyzer can act as a TLS server to capture and generate <a href="https://engineering.salesforce.com/tls-fingerprinting-with-ja3-and-ja3s-247362855967/">JA3</a> fingerprints of any connecting TLS client — browsers, email clients, custom applications, VPN clients — regardless of the client type. It supports fingerprinting across 11 application protocols:</p>

<ul>
  <li>FTP</li>
  <li>LDAP</li>
  <li>LMTP</li>
  <li>MySQL</li>
  <li>NNTP</li>
  <li>OpenVPN</li>
  <li>POP3</li>
  <li>PostgreSQL</li>
  <li>RDP</li>
  <li>Sieve</li>
  <li>SMTP</li>
</ul>

<p>CryptoLyzer can also decode an existing JA3 tag into a human-readable breakdown of the TLS parameters it encodes — TLS version, cipher suites, extensions, elliptic curves, and point formats — making it useful for threat intelligence and forensic analysis without needing to capture live traffic.</p>

<h3 id="ja4-tls-client-fingerprinting">JA4 (TLS Client Fingerprinting)</h3>

<p>CryptoLyzer also generates and decodes <a href="https://github.com/FoxIO-LLC/ja4">JA4</a> fingerprints, the successor to JA3. JA4 produces a structured 36-character tag — a 10-character prefix encoding TLS version, cipher count, extension count, and ALPN, followed by two 12-character truncated SHA-256 hashes of the sorted cipher suites and extensions, separated by underscores. Because JA4 includes signature algorithms and normalizes field ordering before hashing, it produces more stable fingerprints than JA3 across implementation differences, with fewer collisions.</p>

<p>CryptoLyzer also generates <strong>JA4X</strong> fingerprints for X.509 certificates — a compact tag derived from the certificate’s issuer, subject, and extension OIDs — which allows tracking certificate issuance patterns across different subject names.</p>

<p>For client fingerprinting and tag decoding, CryptoLyzer stands alone in this comparison.</p>

<hr />

<h2 id="python-api">Python API</h2>

<p>SSLyze was built API-first. Its Python API is well-documented, supports async scanning, and is widely used in production pipelines.</p>

<p>CryptoLyzer also provides a Python API covering all its protocols — TLS, SSH, HTTP headers, DNS, and fingerprinting. The API is the primary interface; the CLI is built on top of it.</p>

<p>testssl.sh has no Python API. Being a Bash script, it can be invoked as a subprocess and its JSON output parsed, but this is considerably less ergonomic than a native Python library.</p>

<p>For Python-native pipelines, SSLyze and CryptoLyzer both offer real APIs; testssl.sh offers only subprocess-and-parse.</p>

<hr />

<h2 id="windows-support">Windows Support</h2>

<p>CryptoLyzer and SSLyze both run natively on Windows (pure Python or Python with compiled wheels).</p>

<p>testssl.sh requires a Bash environment on Windows — WSL, Cygwin, or MSYS2 — which adds friction in Windows-native environments.</p>

<p>On Windows-native hosts, CryptoLyzer and SSLyze run directly, while testssl.sh needs a Bash layer.</p>

<hr />

<h2 id="output-formats">Output Formats</h2>

<table>
  <thead>
    <tr>
      <th>Format</th>
      <th style="text-align: center">CryptoLyzer</th>
      <th style="text-align: center">testssl.sh</th>
      <th style="text-align: center">SSLyze</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Human-readable (color-coded)</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td>JSON</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td>Markdown</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td>HTML</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td>CSV</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
  </tbody>
</table>

<p>CryptoLyzer’s Markdown output is particularly useful for generating documentation directly from audit results — it can be converted to DOCX or PDF, or embedded in reports, without post-processing.</p>

<p>CryptoLyzer’s color-coded CLI output uses a traffic-light system: algorithm names and key sizes are colored green, yellow, or red based on their current security strength.</p>

<hr />

<h2 id="parallel-scanning">Parallel Scanning</h2>

<p>When scanning multiple targets, the tools differ significantly in concurrency support.</p>

<p><strong>SSLyze</strong> was designed from the ground up for fleet scanning. Its <code class="language-plaintext highlighter-rouge">Scanner</code> class accepts a list of targets, tests connectivity to all of them in parallel (default: 10 concurrent), then runs the actual TLS scans with up to 10 concurrent targets and 5 threads per target. Results stream back as each target completes.</p>

<p><strong>CryptoLyzer</strong> supports parallel scanning via the <code class="language-plaintext highlighter-rouge">-j</code> / <code class="language-plaintext highlighter-rouge">--parallel</code> flag. Targets are dispatched to a <code class="language-plaintext highlighter-rouge">ThreadPoolExecutor</code> and analyzed concurrently up to the specified worker count. Results are printed in the order targets were given on the command line, regardless of completion order.</p>

<p><strong>testssl.sh</strong> is primarily sequential. It has a <code class="language-plaintext highlighter-rouge">--parallel</code> option, but it parallelizes <em>checks within a single target</em> rather than scanning multiple targets concurrently.</p>

<p>For multi-target scanning, SSLyze and CryptoLyzer parallelize across targets, while testssl.sh parallelizes only within a single target.</p>

<hr />

<h2 id="when-to-use-which-tool">When to Use Which Tool</h2>

<p><strong>Use testssl.sh when:</strong></p>
<ul>
  <li>You need a quick, zero-dependency TLS check on any Unix system</li>
  <li>You want a comprehensive single-file tool with broad vulnerability coverage</li>
  <li>Human-readable HTML reports are a requirement</li>
  <li>You do not need a programmable API</li>
</ul>

<p><strong>Use SSLyze when:</strong></p>
<ul>
  <li>You need a clean Python API for integration into pipelines</li>
  <li>Mozilla compliance checking is a requirement</li>
  <li>TLS is the only protocol you need to analyze</li>
</ul>

<p><strong>Use CryptoLyzer when:</strong></p>
<ul>
  <li>You need to analyze protocols beyond TLS: SSH, IKE, HTTP headers, DNS records</li>
  <li>You need JA3, JA4, or HASSH fingerprinting</li>
  <li>Cipher suite coverage beyond OpenSSL’s limits matters (GOST, experimental, deprecated algorithms)</li>
  <li>You need a Python API that covers all of the above</li>
  <li>You want a single tool for a complete cryptographic posture assessment</li>
</ul>

<hr />

<h2 id="known-limits">Known Limits</h2>

<ul>
  <li><strong>CryptoLyzer</strong> does not currently provide a single overall server letter grade.</li>
  <li><strong>CryptoLyzer</strong> does not currently provide a built-in Mozilla profile compliance verdict.</li>
  <li><strong>testssl.sh</strong> is less ergonomic for Python-native integrations because it is a shell-first tool.</li>
  <li><strong>SSLyze</strong> is intentionally TLS-focused and does not target SSH or DNS security analysis.</li>
</ul>

<hr />

<h2 id="packaging">Packaging</h2>

<p>The table below shows package repository availability across major distributions. “AUR” = Arch User Repository (community-maintained). “OBS” = author-maintained <a href="https://build.opensuse.org/project/show/home:pfeiffersz:cryptolyzer:dev">OpenSUSE Build Service repository</a> requiring a custom package source. testssl.sh is packaged as <code class="language-plaintext highlighter-rouge">testssl</code> (without the <code class="language-plaintext highlighter-rouge">.sh</code> suffix) in Fedora’s RPM repositories.</p>

<table>
  <thead>
    <tr>
      <th>Distribution</th>
      <th style="text-align: center">CryptoLyzer</th>
      <th style="text-align: center">testssl.sh</th>
      <th style="text-align: center">SSLyze</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Debian 12 (bookworm)</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td>Debian 13 (trixie)</td>
      <td style="text-align: center">OBS</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td>Debian sid (unstable)</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td>Fedora (all releases)</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td>openSUSE Tumbleweed</td>
      <td style="text-align: center">OBS</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td>Ubuntu 22.04 LTS</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td>Ubuntu 24.04 LTS</td>
      <td style="text-align: center">OBS</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td>Ubuntu 26.04 LTS</td>
      <td style="text-align: center">OBS</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td>Arch Linux</td>
      <td style="text-align: center">AUR</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">AUR</td>
    </tr>
    <tr>
      <td>Kali Linux</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
    </tr>
  </tbody>
</table>

<p><strong>testssl.sh</strong> is the most broadly packaged of the three. It appears in every Debian release since Debian 11, all supported Fedora releases, openSUSE Tumbleweed, all Ubuntu LTS releases, Arch Linux’s official <code class="language-plaintext highlighter-rouge">extra</code> repository, and Kali Linux.</p>

<p><strong>SSLyze</strong> is not packaged in Debian, Fedora, openSUSE, or Ubuntu. It is available in Kali Linux’s official repositories and in the AUR. On other platforms, <code class="language-plaintext highlighter-rouge">pip install sslyze</code> is the standard installation method.</p>

<p><strong>CryptoLyzer</strong> is in Debian sid (unstable) and available via the author-maintained OBS repository for Debian 13, openSUSE Tumbleweed, Ubuntu 24.04 LTS, and Ubuntu 26.04 LTS. It is also in the AUR. On all platforms it can be installed via <code class="language-plaintext highlighter-rouge">pip install cryptolyzer</code>. None of the compared tools publish author-maintained binary repositories for multiple distributions; CryptoLyzer’s OBS project is the only one that does.</p>

<hr />

<h2 id="conclusion">Conclusion</h2>

<p>testssl.sh and SSLyze are excellent tools for what they do — TLS/SSL analysis — and each has earned its place in the standard toolkit. If TLS is all you need, either is a fine choice depending on whether you prefer shell scripts or Python libraries.</p>

<p>CryptoLyzer takes a different bet: that a serious cryptographic audit extends beyond TLS, that cipher suite coverage matters at the margins, and that having one tool with a consistent Python API across all protocols is worth the investment.</p>

<p>If your scope is a web server’s HTTPS configuration, any of these three will serve you well. If you need to audit the full cryptographic posture of a server — TLS, SSH, IKE, HTTP headers, and DNS together — CryptoLyzer is the only tool in this comparison that covers all of it.</p>]]></content><author><name>Szilárd Pfeiffer</name></author><summary type="html"><![CDATA[Which TLS/cryptography analyzer is right for you?]]></summary></entry><entry><title type="html">Assessing IT Solutions Against Security Principles</title><link href="https://pfeifferszilard.hu/2026/06/30/assessing-it-solutions-against-security-principles.html" rel="alternate" type="text/html" title="Assessing IT Solutions Against Security Principles" /><published>2026-06-30T00:00:00+02:00</published><updated>2026-06-30T00:00:00+02:00</updated><id>https://pfeifferszilard.hu/2026/06/30/assessing-it-solutions-against-security-principles</id><content type="html" xml:base="https://pfeifferszilard.hu/2026/06/30/assessing-it-solutions-against-security-principles.html"><![CDATA[<p><strong>Established security principles — the CIA triad, the Parkerian hexad,
Kerckhoffs’s principles, and the Zero Trust directive — are rarely used to
evaluate real IT solutions. Together with Péter Balsai, we have begun to apply
them as analytical tools.</strong></p>

<h2 id="introduction">Introduction</h2>

<p>In 2024–2025, joint work with Péter Balsai gave rise to two working premises:</p>

<ol>
  <li>The extent to which IT solutions adhere to established, well-known
information security principles should be subject to systematic examination.</li>
  <li>Disciplines outside information technology — including military thought
(strategy and tactics) and other non-IT domains — should be examined for
principles that may be transferable to, and applicable within, IT systems.</li>
</ol>

<h2 id="current-work">Current work</h2>

<p>Following from these premises, we have begun to apply the following as
analytical instruments within a preliminary framework that remains under active
development:</p>

<ul>
  <li>Kerckhoffs’s principles (design rules), one of which, in a reformulated form,
corresponds to Shannon’s maxim;</li>
  <li>the CIA triad;</li>
  <li>the Parkerian hexad.</li>
</ul>

<h2 id="tables-for-consideration-and-discussion">Tables for consideration and discussion</h2>

<p>We intend to present at the NWS2026 conference on the password and on
the prevailing assumption that it is obsolete and therefore dispensable. In
support of that discussion, a selection of preliminary — and as yet unverified —
results is presented below in tabular form. The tables are provided without
commentary, with the sole intention of offering a basis for further
consideration.</p>

<p>The CIA triad, the Parkerian hexad, Kerckhoffs’s principles, and the Zero Trust
directive are not new; yet taking them into account and observing them is not
common practice, and their use for the systematic examination of systems is
seen only rarely.</p>

<p>In each table below, the columns are authentication methods (the password, a
possession factor, biometrics, and OPAQUE), and the rows are security
properties. Each cell states whether the method <strong>violates</strong> the property,
<strong>may violate</strong> it, or does <strong>not</strong> (<em>no</em>).</p>

<h3 id="the-cia-triad-and-the-parkerian-hexad">The CIA triad and the Parkerian hexad</h3>

<table>
  <thead>
    <tr>
      <th style="text-align: left"> </th>
      <th style="text-align: left">Password</th>
      <th style="text-align: left">Possession</th>
      <th style="text-align: left">Biometrics</th>
      <th style="text-align: left">OPAQUE</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td style="text-align: left">Confidentiality</td>
      <td style="text-align: left">violates</td>
      <td style="text-align: left"><em>may violate</em></td>
      <td style="text-align: left">violates</td>
      <td style="text-align: left"><strong>no</strong></td>
    </tr>
    <tr>
      <td style="text-align: left">Integrity</td>
      <td style="text-align: left"><strong>no</strong></td>
      <td style="text-align: left">violates</td>
      <td style="text-align: left">violates</td>
      <td style="text-align: left"><strong>no</strong></td>
    </tr>
    <tr>
      <td style="text-align: left">Availability</td>
      <td style="text-align: left"><em>may violate</em></td>
      <td style="text-align: left">violates</td>
      <td style="text-align: left">violates</td>
      <td style="text-align: left"><em>may violate</em></td>
    </tr>
    <tr>
      <td style="text-align: left">Authenticity</td>
      <td style="text-align: left"><em>may violate</em></td>
      <td style="text-align: left"><em>may violate</em></td>
      <td style="text-align: left"><strong>no</strong></td>
      <td style="text-align: left"><strong>no</strong></td>
    </tr>
    <tr>
      <td style="text-align: left">Possession and control</td>
      <td style="text-align: left">violates</td>
      <td style="text-align: left">violates</td>
      <td style="text-align: left">violates</td>
      <td style="text-align: left"><strong>no</strong></td>
    </tr>
    <tr>
      <td style="text-align: left">Utility</td>
      <td style="text-align: left"><strong>no</strong></td>
      <td style="text-align: left"><strong>no</strong></td>
      <td style="text-align: left"><strong>no</strong></td>
      <td style="text-align: left"><strong>no</strong></td>
    </tr>
  </tbody>
</table>

<h3 id="kerckhoffss-principles--methods">Kerckhoffs’s principles / methods</h3>

<table>
  <thead>
    <tr>
      <th style="text-align: left"> </th>
      <th style="text-align: left">Password</th>
      <th style="text-align: left">Possession</th>
      <th style="text-align: left">Biometrics</th>
      <th style="text-align: left">OPAQUE</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td style="text-align: left"><strong>Indecipherability</strong></td>
      <td style="text-align: left"><em>may violate</em></td>
      <td style="text-align: left"><em>may violate</em></td>
      <td style="text-align: left"><em>may violate</em></td>
      <td style="text-align: left"><strong>no</strong></td>
    </tr>
    <tr>
      <td style="text-align: left"><strong>Public specification</strong></td>
      <td style="text-align: left"><strong>no</strong></td>
      <td style="text-align: left">violates</td>
      <td style="text-align: left">violates</td>
      <td style="text-align: left"><strong>no</strong></td>
    </tr>
    <tr>
      <td style="text-align: left"><strong>Memorability / replaceability</strong></td>
      <td style="text-align: left"><strong>no</strong></td>
      <td style="text-align: left">violates</td>
      <td style="text-align: left">violates</td>
      <td style="text-align: left"><strong>no</strong></td>
    </tr>
    <tr>
      <td style="text-align: left"><strong>Telegraph (network)</strong></td>
      <td style="text-align: left"><strong>no</strong></td>
      <td style="text-align: left"><strong>no</strong></td>
      <td style="text-align: left"><strong>no</strong></td>
      <td style="text-align: left"><strong>no</strong></td>
    </tr>
    <tr>
      <td style="text-align: left"><strong>Portability</strong></td>
      <td style="text-align: left"><strong>no</strong></td>
      <td style="text-align: left"><em>may violate</em></td>
      <td style="text-align: left">violates</td>
      <td style="text-align: left"><strong>no</strong></td>
    </tr>
    <tr>
      <td style="text-align: left"><strong>Simplicity</strong></td>
      <td style="text-align: left">violates</td>
      <td style="text-align: left">violates</td>
      <td style="text-align: left">violates</td>
      <td style="text-align: left"><strong>no</strong></td>
    </tr>
  </tbody>
</table>

<h3 id="the-zero-trust-directive">The Zero Trust directive</h3>

<table>
  <thead>
    <tr>
      <th style="text-align: left"> </th>
      <th style="text-align: left">Password</th>
      <th style="text-align: left">Possession</th>
      <th style="text-align: left">Biometrics</th>
      <th style="text-align: left">OPAQUE</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td style="text-align: left">In transit</td>
      <td style="text-align: left"><em>may violate</em></td>
      <td style="text-align: left"><em>may violate</em></td>
      <td style="text-align: left"><em>may violate</em></td>
      <td style="text-align: left"><strong>no</strong></td>
    </tr>
    <tr>
      <td style="text-align: left">In use (processing)</td>
      <td style="text-align: left"><strong>no</strong></td>
      <td style="text-align: left">violates</td>
      <td style="text-align: left">violates</td>
      <td style="text-align: left"><strong>no</strong></td>
    </tr>
    <tr>
      <td style="text-align: left">At rest (storage)</td>
      <td style="text-align: left"><strong>no</strong></td>
      <td style="text-align: left">violates</td>
      <td style="text-align: left">violates</td>
      <td style="text-align: left"><em>may violate</em></td>
    </tr>
  </tbody>
</table>

<p>This page will be updated to reflect any changes arising from discussion or from
our continued work.</p>]]></content><author><name>Szilárd Pfeiffer</name></author><summary type="html"><![CDATA[Established security principles — the CIA triad, the Parkerian hexad, Kerckhoffs’s principles, and the Zero Trust directive — are rarely used to evaluate real IT solutions. Together with Péter Balsai, we have begun to apply them as analytical tools.]]></summary></entry><entry><title type="html">Bitcoin account hijacking using OSINT techniques</title><link href="https://pfeifferszilard.hu/2023/03/16/bitcoin-account-hijacking-using-osint-techniques.html" rel="alternate" type="text/html" title="Bitcoin account hijacking using OSINT techniques" /><published>2023-03-16T00:00:00+01:00</published><updated>2023-03-16T00:00:00+01:00</updated><id>https://pfeifferszilard.hu/2023/03/16/bitcoin-account-hijacking-using-osint-techniques</id><content type="html" xml:base="https://pfeifferszilard.hu/2023/03/16/bitcoin-account-hijacking-using-osint-techniques.html"><![CDATA[<p><strong>Researchers at <a href="https://kudelskisecurity.com/">Kudelski Security</a> have
<a href="https://research.kudelskisecurity.com/2023/03/06/polynonce-a-tale-of-a-novel-ecdsa-attack-and-bitcoin-tears/">managed to break</a>
Bitcoin and Ethereum wallets using a novel attack against one of the most popular asymmetric key algorithms of modern
cryptography. Although <a href="https://en.wikipedia.org/wiki/Satoshi_Nakamoto">Satoshi Nakamoto</a>’s wallet was not among the 764
wallets they were able to break, it is quite worrying to see that a software issue can make such a modern cryptographic
algorithm like ECDSA vulnerable. Analysis of data that comes purely from open sources could reveal a practical weakness
of an algorithm that is the fundamental basis of secure internet communication, public key infrastructures, and
cryptocurrency transactions.</strong></p>

<h2 id="software-issue-behind-the-scenes">Software Issue Behind the Scenes</h2>

<p>As with many other times in the history of attacks against cryptographic algorithms, the cause of a successful attack is
not a vulnerability in the algorithm itself, but the fact that poor-quality software used an algorithm with insufficient
care. It is crucial to obtain “high-quality” random numbers during the calculation of many cryptographic operations.
Such operations store passwords using <a href="https://en.wikipedia.org/wiki/Salt_(cryptography)">salt</a>ed
<a href="https://en.wikipedia.org/wiki/Cryptographic_hash_function">hash</a>es, the generation of cryptographic keys used to
authenticate web servers on the internet or an employee before access given to the company’s private network using a
virtual private network (VPN) service. The generation of
<a href="https://en.wikipedia.org/wiki/Digital_signature">digital signature</a>s – which is necessary for the verification of the
transactions – also requires a cryptographically strong random value. In the absence of strong random values, there
would be a relation between the random and the private part of the signing key. This property could be exploited, and
private key can be acquired by an attacker. In the possession of the private key, any transaction related to the key can
be verified, meaning that the balance of the wallet can be transferred.</p>

<h2 id="not-a-new-idea-but-a-new-method">Not a New Idea, but a New Method</h2>

<p>Though the attack itself is novel, the idea behind the attack is not so new. The lack of high-quality random numbers has
caused serious vulnerabilities in the past. In 2002, a researcher found an
<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=cve-2008-0166">issue</a> in the version of the
<a href="https://www.openssl.org/">OpenSSL</a> distributed with <a href="https://www.debian.org/">Debian</a> Linux and its derivatives that
reduced the entropy of generated random values. The issue caused SSH, VPN and X.509 keys generated by the affected
versions of OpenSSL to become vulnerable. Services still used a key generated by the affected version of the code that
meant they remained vulnerable until the regeneration of the key. In 2010, a group called <em>fail0verflow</em> compromised an
ECDSA key <a href="https://en.wikipedia.org/wiki/Sony">Sony</a> used to sign software for the
 <a href="https://en.wikipedia.org/wiki/PlayStation_3">PlayStation 3</a> game console. The root cause of the attack was almost the
same as it is now, namely Sony did not used different random numbers when digitally signed different software. The
novelty of the current attack is that it exploits the high-degree relationships among the random values
(<a href="https://en.wikipedia.org/wiki/Cryptographic_nonce">nonce</a>s) used to generate digital signatures. It means if the nonce
was not generated by a cryptographically secure random number generator but using a weak
<a href="https://en.wikipedia.org/wiki/Pseudorandom_number_generator">pseudo-random number generator</a> (PRNG), it would allow the
attacker to retrieve the private part of the key used to generate the signatures.</p>

<h2 id="special-kind-of-open-source-intelligence">Special Kind of Open-source Intelligence</h2>

<p>There are three prerequisites that must be met to successfully retrieve the signer’s private key from signatures. The
first one is that the random value used to generate the signature should come from a weak PRNG. The second one is to
have a batch of consecutive digital signatures generated by using the same PRNG. The third one is that the signatures
can be ordered, meaning that we know which signatures have been generated after which one. It could be assumed that
there are implementations that use weak PRNGs as it is not basic knowledge whether random number generators are adequate
for cryptographic purposes and some legacy software may follow older guidelines. The question is: where can an attacker
find consecutive and ordered list of signatures? The answer is: in several places. Digital signatures are part of each
cryptographic protocol, so they can be collected from open sources. The best examples are<a href="https://en.wikipedia.org/wiki/Cryptocurrency">
cryptocurrencies</a>, where the transfers are validated by digital
signatures. These digital signatures must be published to allow each party to validate the transactions. Basically,
cryptocurrency <a href="https://en.wikipedia.org/wiki/Blockchain">blockchain</a>s are huge collections of the necessary signatures.
For instance, researchers could collect 763 million unique signatures from the Bitcoin blockchain which were generated
by 424 million unique public keys. Most of the time a key was used to generate only a few signatures, but there were
millions of keys which generated at least four signatures, which is the minimum requirement of the attack.</p>

<h2 id="someone-got-ahead-of-the-researchers">Someone Got Ahead of the Researchers</h2>

<p>Researchers ran their attack for two days and 19 hours with an estimated cost of USD 265, resulting in 762 unique broken
wallets, but someone may have gotten ahead of them, as all the wallets had zero balance. The researchers suspect that
these wallets have already been hacked in the past. If they had not been hacked, 484 BTC could have been stolen from
these wallets, which means almost 12 million USD. However, 484 BTC was worth 31 million USD at Bitcoin’s peak. The
question arises, where did the money go? The researchers obtained that the recipients were addressed by the latest
transactions of the broken wallets. They identified 466 different recipient addresses, where the top 1 received 75 BTC,
the top 5 received 140 BTC, meaning more than USD 1.5 million, and almost USD 3 million, respectively. They counted 144
BTC in total, which is far from the theoretical 484 BTC, but still sounds like a profitable business, worth the
aforementioned USD 265 cost of investigation. After the first transaction to the top address in 2018, several
transactions were initiated from that address to several recipients for 0.5 or 1 BTC, although the account still had a
balance of 63.5 BTC. Researchers also found public conversations about accounts that were swept exploiting repeated
nonces. A forum member called <em>johoe</em> <a href="https://bitcointalk.org/index.php?topic=1431060.0">claimed</a> that he had collected
135 addresses that can be compromised using that technique, and 82 had been compromised already at the time of his post.
He also stated that he collected 7 BTC from the broken accounts. He was willing to send the funds back to the owner
after proving ownership. The researchers repeated their attack against Ethereum after collecting more than 1.7 billion
ECDSA signatures. They managed to break 2 unique wallets processing 22% of their signature collection. They decided to
stop the attack, considering that the cost-benefit ratio was too low.</p>

<h2 id="is-this-still-a-real-issue-now">Is This Still a Real Issue Now?</h2>

<p>Considering only the results related to the Bitcoin wallets, I would say this might not be an issue anymore. The
exploitable signatures were generated several years ago, perhaps with the same software that had a serious flaw, which
may have already been fixed. The signatures were exploitable not because they used a pseudo random generator during
signature generation, but due to repeated nonce values. At the same time, given that digital signatures are used in so
many cases, such as during a cryptographic handshake, this may still be a significant issue. It is true that exploiting
the vulnerability requires getting consecutive signatures from a potentially affected server, which is not a trivial
problem in the case of a busy server, as many other clients connect to a server between our consecutive connections.
Even so, if an attacker manages to exploit a server, it means that the server certificate is compromised without any
sign on the server. For as much as the <a href="https://pfeifferszilard.hu/2020/09/09/why-do-certificate-revocation-checking-mechanisms-never-work.html">certificate revocation is one of the weakest points of
X.509</a>, it is
troubling that such simple flow in an implementation can cause certificate compromise. The case would be even more
worrying if there were a similar flow in certificate issuance, as this would compromise a CA, which could result in
unpredictable consequences.</p>]]></content><author><name>Szilárd Pfeiffer</name></author><summary type="html"><![CDATA[Researchers at Kudelski Security have managed to break Bitcoin and Ethereum wallets using a novel attack against one of the most popular asymmetric key algorithms of modern cryptography. Although Satoshi Nakamoto’s wallet was not among the 764 wallets they were able to break, it is quite worrying to see that a software issue can make such a modern cryptographic algorithm like ECDSA vulnerable. Analysis of data that comes purely from open sources could reveal a practical weakness of an algorithm that is the fundamental basis of secure internet communication, public key infrastructures, and cryptocurrency transactions.]]></summary></entry><entry><title type="html">Chinese researchers: RSA is breakable. Others: Do not panic!</title><link href="https://pfeifferszilard.hu/2023/02/20/chinese-researchers-rsa-is-breakable-others-do-not-panic.html" rel="alternate" type="text/html" title="Chinese researchers: RSA is breakable. Others: Do not panic!" /><published>2023-02-20T00:00:00+01:00</published><updated>2023-02-20T00:00:00+01:00</updated><id>https://pfeifferszilard.hu/2023/02/20/chinese-researchers-rsa-is-breakable-others-do-not-panic</id><content type="html" xml:base="https://pfeifferszilard.hu/2023/02/20/chinese-researchers-rsa-is-breakable-others-do-not-panic.html"><![CDATA[<p><strong>Quantum computing not only poses a great opportunity, but also a great threat to internet security. According to the promises of quantum computers, certain mathematical problems that form the basis of today’s most popular cryptographic algorithms will be much easier to solve with them than with classical computers. In a recent publication, Chinese researchers claim that there is an existing algorithm that, even with today’s quantum computers, makes it possible to break the RSA algorithm, which is the fundamental basis of secure internet communication. At the same time, there are doubts about the reliability of the publication. However, even if these doubts are confirmed, it does not change the fact that the security threat posed by quantum computers remains with us.</strong></p>

<p>The basic claim of the <a href="https://arxiv.org/pdf/2212.12372.pdf">paper</a>, published last Christmas by 24 Chinese researchers, is that they have found an algorithm that enables 2,048-bit RSA keys to be broken even with the relatively low-power quantum computers available today. There is nothing really new in the fact that quantum computers pose a general risk to the reliability of cryptographic procedures that guarantee secure internet communications, such as <a href="https://en.wikipedia.org/wiki/RSA_(cryptosystem)">RSA open-key cryptography</a> or the Diffie-Hellman key exchange algorithm. These procedures are based on mathematical problems that are practically unsolvable with conventional computers, but which can be solved in a few hours with sufficiently powerful quantum computers. Sufficiently large means 20 million <a href="https://en.wikipedia.org/wiki/Qubit">quantum bits</a> (qubit) in this case. The problem with this figure of 20 million is that <span style="text-decoration:underline;">IBM’s quantum computer</span> – the largest quantum computer known today – can only render 433 of these 20 million qubits. It is not an exaggeration to say that the Chinese researchers chose one of the steepest hills to climb. But can they really overcome this challenge?</p>

<blockquote>
  <p><a href="https://en.wikipedia.org/wiki/Integer_factorization">Integer factorization</a> is the most widely used infeasible mathematical problem to guarantee that the cryptographic algorithms are practically unbreakable. Factorizing a number consisting of only a few digits is trivial (15 = 3 * 5), but the required computational capacity grows exponentially along with the number of digits. For hundreds or even thousands of digits, the computational effort required is so enormous that even using the highest performance supercomputers, the time required to do the calculation would be similar to the lifetime of the universe. According to the <a href="https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-57Pt3r1.pdf">recommendation</a> of the <a href="https://en.wikipedia.org/wiki/National_Institute_of_Standards_and_Technology">National Institute of Standards and Technology</a> (NIST), the smallest RSA key size that can be considered secure is 2,048 bits. This means approximately 600 digits, but in many cases larger keys of 3,072 or 4,096 bits are also used. There, the number of digits expressed in the decimal number system already exceeds a thousand, meaning that these keys are practically infeasible with traditional methods. At the same time, in 1994<span style="text-decoration:underline;"> <a href="https://en.wikipedia.org/wiki/Peter_Shor">Peter Shor</a></span> already came up with an <a href="https://en.wikipedia.org/wiki/Shor%27s_algorithm">algorithm</a> that – on a quantum computer only existing in theory at the time – would be able to perform the prime factorization with much greater efficiency than before. This breakthrough would imply that a significant part of our encryption procedures would no longer be resistant to breaking, including, among other things, HTTPS, which ensures the security of browsing, or VPN protocols, one of the foundations of remote work.</p>
</blockquote>

<h2 id="has-cryptographic-apocalypse-now-arrived">Has Cryptographic Apocalypse Now arrived?</h2>

<p>The Chinese researchers could only provide a theoretical answer to this question, since the solution and the techniques outlined by them require a 372-qubit computer. Though this does exist within the walls of IBM,  the Chinese researchers did not have this machine at their disposal. However, they did succeed in factoring a 48-bit (15-digit) number with a 10-qubit computer. At first sight, this may not seem like much of a breakthrough, but it should be noted that this is the largest number that has ever been factored using a generic algorithm. Not to mention the fact that it was possible to put a theory into practice. The question is whether it was possible to bridge the aforementioned gap. As the correspondence between <a href="https://en.wikipedia.org/wiki/Bruce_Schneier">Bruce Schneier</a> – one of the iconic figures of IT security – and <a href="https://www.amazon.com/stores/Roger-A.-Grimes/author/B001IQUMT4">Roger A. Grimes</a> – the author of several books on cryptography – revealed:</p>

<blockquote>
  <p>“Apparently what happened is another guy who had previously announced he was able to break traditional asymmetric encryption using classical computers…but reviewers found a flaw in his algorithm and that guy had to retract his paper. But this Chinese team realized that the step that killed the whole thing could be solved by small quantum computers. So they tested and it worked.”</p>
</blockquote>

<p>You might think that the cryptographic apocalypse is here.</p>

<h2 id="keep-calm-and-dig-deep">Keep Calm and Dig Deep</h2>

<p>The basis of the Chinese researchers’ algorithm relies on <a href="https://en.wikipedia.org/wiki/Claus_P._Schnorr">Claus Schnorr</a>’s factorization algorithm (not to be confused with <a href="https://en.wikipedia.org/wiki/Shor%27s_algorithm">Shor’s algorithm</a>). The aforementioned algorithm works well with smaller numbers – with which the researchers themselves tested it – but falls apart with larger values. It is precisely this limitation that the Chinese researchers claim to have overcome. However, they do not mention any details, and they have not been able to prove the complete theory in practice due to the lack of a quantum computer with sufficient capacity. As Schneier cited the situation on his blog:</p>

<blockquote>
  <p>“So if it’s true that the Chinese paper depends on this Schnorr technique that doesn’t scale, the techniques in this Chinese paper won’t scale, either. (On the other hand, if it does scale then I think it also breaks a bunch of lattice-based public-key cryptosystems.)”</p>
</blockquote>

<p>Does the uncertainty remain until someone tries the algorithm on a sufficiently large-capacity quantum computer? Partially.</p>

<p>There are, in fact, some signs that cast doubt on the whole story. One of these is that the Chinese researchers failed to win the $200,000 prize offered by the <a href="https://en.wikipedia.org/wiki/RSA_Factoring_Challenge">RSA Factoring Challenge</a>, which goes to whoever can successfully crack a 2048-bit RSA key. Of course, you could say that they did not have the necessary hardware, but a letter to IBM to get the prize, even if it is shared, would have been certainly worthwhile. People drawn to conspiracy theories may ask why the Chinese state did not keep the discovery for itself and started pouring money into the development of a suitable quantum computer. This would obviously cost a very substantial amount, but would also bring a very substantial benefit. At the same time, there is also strong skepticism from the scientific side. <a href="https://en.wikipedia.org/wiki/Scott_Aaronson">Scott Aaronson</a> – former researcher at MIT, now at the University of Texas – made a <a href="https://scottaaronson.blog/?p=6957">devastating statement on his blog</a> about the Chinese paper. Aaronson, in his pieces of research, primarily focuses on quantum computing and complexity theory, perhaps the most important fields of science concerning our topic. His three-word review about the content of the publication was: “No. Just no.” He criticized the publication in a firm tone:</p>

<blockquote>
  <p>“Then, finally, they come clean about the one crucial point in a single sentence of the Conclusion section:
It should be pointed out that the quantum speedup of the algorithm is unclear due to the ambiguous convergence of QAOA.
“Unclear” is an understatement here. It seems to me that a miracle would be required for the approach here to yield any benefit at all, compared to just running the classical Schnorr’s algorithm on your laptop. And if the latter were able to break RSA, it would’ve already done so.
All told, this is one of the most actively misleading quantum computing papers I’ve seen in 25 years, and I’ve seen … many.”</p>
</blockquote>

<p>Aaronson is not alone in his opinion: <a href="https://www.linkedin.com/feed/update/urn:li:activity:7016808281847336960/">many</a> <a href="https://www.linkedin.com/feed/update/urn:li:activity:7017366747691241472/">others</a> criticize the research on the same basis, including Peter Shor, who says:</p>

<blockquote>
  <p>“There are apparently possible problems with this paper.”</p>
</blockquote>

<p>It should also be highlighted that the research-sharing platform (<a href="https://arxiv.org/">arχiv</a>), where the Chinese study was published, <a href="https://arxiv.org/about">does not perform peer reviews</a>, meaning that the mere fact of publication does not mean much, especially in such popular fields as quantum computing and cryptography.</p>

<h2 id="so-are-we-off-the-hook-or-not">So, are we off the hook or not?</h2>

<p>Even if we are able to recognize all the <a href="https://en.wikipedia.org/wiki/Research_paper_mill">research paper mills</a> – which must necessarily be expected in a popular and highly regarded discipline such as cryptography or quantum computing –  the harsh reality remains. Any encrypted data recorded today that uses a cryptographic process that does not withstand the challenges posed by quantum computers could become compromised in the not-too-distant future. As a result, it would be necessary to use algorithms that are thought to be secure against a cryptoanalytic attack by a quantum computer to mitigate the effect of the harvest-now-decrypt-later technique, as it cannot be eliminated. In the  case of a cryptographic problem that received great publicity, such as Heartbleed in 2014, the market reacted relatively quickly, although it was weeks before the error disappeared from the 100,000 most-visited pages. In other cases, which have not received as much publicity, it can take years, according to statistics from <a href="https://www.ssllabs.com/ssl-pulse/">Qualys Pulse</a> . In other words, we cannot expect the introduction of post-quantum cryptography to happen much faster than this.</p>

<p>This is just like global warming: a problem that cannot be dealt with in the future when it becomes critical. It should be dealt with in the present. The similarity is striking if we consider the fact that scientists have been scaring people with horror stories about quantum computers for decades. What seemed like a theory for a while, has now become the reality. <a href="https://www.science.org/content/article/ibm-promises-1000-qubit-quantum-computer-milestone-2023">IBM promises a one-thousand-qubit computer</a> by the end of the year, and <a href="https://www.cnet.com/tech/computing/google-plans-to-build-a-practical-quantum-computer-by-2029-at-new-center/">Google a one-million-qubit one</a> by the end of the decade. The latter does not promise anything good, since it is only a question of data storage capacity – how much data can be accessed after RSA becomes breakable. The first to have machines with sufficient capacity will presumably be the still much-criticized technology giants, and the most powerful states. Lawmakers still call for encryption backdoors <a href="https://www.helpnetsecurity.com/2017/06/20/eu-encryption-law/">from time</a> <a href="https://www.helpnetsecurity.com/2021/04/05/weak-encryption/">to time</a>, despite the <a href="https://balasys.eu/blogs/weakened-encryption-is-a-silver-bullet-not-just-for-law-enforcement-agencies-but-for-cybercriminals">warnings</a> about the <a href="https://pfeifferszilard.hu/2021/02/25/cryptography-weakening-a-tale-of-the-law-abiding-criminal.html">serious risks involved</a>, but with such a technical breakthrough, they would not necessarily need to do so. However, this may have consequences that are difficult to foresee both for privacy and the outcomes of conflicts that are increasingly transferred to cyberspace.</p>

<p><a href="http://creativecommons.org/licenses/by-sa/4.0/" id="license" class="by-sa"></a><span class="licensetext"><span property="dct:title" rel="dct:type">Chinese researchers: RSA is breakable. Others: Do not panic!</span> is licensed under a <a rel="license" itemprop="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a></span></p>]]></content><author><name>Szilárd Pfeiffer</name></author><summary type="html"><![CDATA[Quantum computing not only poses a great opportunity, but also a great threat to internet security. According to the promises of quantum computers, certain mathematical problems that form the basis of today’s most popular cryptographic algorithms will be much easier to solve with them than with classical computers. In a recent publication, Chinese researchers claim that there is an existing algorithm that, even with today’s quantum computers, makes it possible to break the RSA algorithm, which is the fundamental basis of secure internet communication. At the same time, there are doubts about the reliability of the publication. However, even if these doubts are confirmed, it does not change the fact that the security threat posed by quantum computers remains with us.]]></summary></entry><entry><title type="html">No Zero Trust Network without strong authentication</title><link href="https://pfeifferszilard.hu/2022/11/03/no-zero-trust-network-without-strong-authentication.html" rel="alternate" type="text/html" title="No Zero Trust Network without strong authentication" /><published>2022-11-03T00:00:00+01:00</published><updated>2022-11-03T00:00:00+01:00</updated><id>https://pfeifferszilard.hu/2022/11/03/no-zero-trust-network-without-strong-authentication</id><content type="html" xml:base="https://pfeifferszilard.hu/2022/11/03/no-zero-trust-network-without-strong-authentication.html"><![CDATA[<h2 id="what-is-zero-trust-and-why-is-it-important">What is Zero Trust and why is it important?</h2>

<p>Traditional cybersecurity approaches focus on establishing a sound perimeter to keep malicious actors outside a network. This assumes that all users and resources inside the perimeter are trustworthy. In today’s world, however, resources are increasingly hybrid in their structure, and data are spread across an innumerable combination of devices, services, applications, and people. This makes security more complicated than simply keeping bad actors outside a network; good security means knowing more about who’s inside as well.  According to the Zero Trust Architecture’s principle guideline – never trust, always verify – no resource should be accessed until successful authentication and authorization have been achieved.</p>

<p>While the Zero Trust security Model was first introduced in the 1990’s, it’s only become widely known and used in the past few years because, like many things, it is far easier said than done. But one thing is for sure: the improved security environment is worth the effort, and it begins with strong authentication. The Zero Trust security model is an approach to the design and implementation of information technology systems. The main concept behind the architecture is de-perimeterization, which refers to the removal of a boundary between an organization and the outside world.</p>

<h2 id="the-seven-tenets-of-zero-trust">The seven tenets of Zero Trust</h2>

<p>The United States’ Cybersecurity and Infrastructure Security Agency (CISA) <a href="https://www.cisa.gov/sites/default/files/publications/CISA%20Zero%20Trust%20Maturity%20Model_Draft.pdf">has outlined the following principles</a> in its Zero Trust Maturity Model:</p>

<p><strong>1. All data sources and computing services are considered resources.</strong></p>

<p>Even if the network is composed of multiple classes of devices, this tenant does not allow exceptions. In practice, there should be at least one policy enforcement point in the network where all the traffic goes through and where the policy can be enforced.</p>

<p><strong>2. All communication is secured regardless of network location.</strong></p>

<p>Secure communication and providing trust are no longer based on the location of an asset.</p>

<p><strong>3. Access to individual enterprise resources is granted on a per-session basis.</strong></p>

<p>An evaluation should be made before giving access to a resource independently of whether the resource was previously permitted or not.</p>

<p><strong>4. Access to resources is determined by dynamic policy.</strong></p>

<p>The policies should be generated as real time as possible and should always be appropriate to the attributes.</p>

<p><strong>5. The enterprise monitors and measures the integrity and security posture of all owned and associated assets.</strong></p>

<p>No asset should inherently be trusted, and data integrity should be maintained at all times.</p>

<p><strong>6. All resource authentications and authorizations are dynamic and strictly enforced before access is allowed.</strong></p>

<p>Authentication and authorization should always be rigorously checked at each access request before access is granted to a resource.</p>

<p><strong>7. The enterprise collects as much information as possible about the current state of assets, network infrastructure, and communications, and uses this information to improve its security posture.</strong></p>

<p>Maintaining and improving security posture is a never-ending circle: collecting and analyzing data are essential to the process.</p>

<p>While there is no one definition for Zero Trust architecture, the major tenets of the approach, as described by CISA, make clear that strong authentication is at its foundation. And strong authentication needs to be a priority for all security architecture, as password issues are responsible for more than 80 percent of data breaches. And strong passwords alone are not enough. Organizations today require more robust protections to defend themselves against the latest threats. Though  more and more companies are investing in various strong/multifactor authentication methods, it has proven easier to purchase a solution than to effectively implement and introduce it across an organization. So how should organizations start to actually follow through in adopting strong authentication practices?</p>

<h2 id="always-encrypt-and-always-encrypt-well">Always Encrypt and Always Encrypt Well</h2>

<p>The ‘zeroth’ step in implementing strong authentication is reliable encryption. Zero Trust requires that enterprises never consider their private network as an implicit zone of trust. Assets on a network should always be handled as if an attacker was persistent on the system. As a result, access to resources should be granted in the most secure manner available. This entails not just authenticating all connections, but also encrypting all the traffic. Attackers are smart, and capable enough to eavesdrop on a network, analyze any unencrypted traffic to capture credentials to perform a well-structured attack later.</p>

<p>In the case of a private network or service, it is good practice to allow only the most secure cryptographic algorithms that provides <a href="https://en.wikipedia.org/wiki/Forward_secrecy">forward secrecy</a>, such as <a href="https://en.wikipedia.org/wiki/Elliptic-curve_Diffie%E2%80%93Hellman">ECDHE</a> and <a href="https://en.wikipedia.org/wiki/Authenticated_encryption">authenticated encryption</a>, such as <a href="https://en.wikipedia.org/wiki/Poly1305">Poly1305</a>. Attacker toolchains – such as other software systems – often contain legacy parts that do not support the most modern mechanisms. This means that an exploit used against a service that can be accessed solely via encrypted channels, using the most modern algorithms, will fail before it can really begin, even if the attacker can access the system and has valid credentials, as the initiation of the encrypted connection will fail. This approach also has other indirect benefits. Using state-of-the-art encryption increases security as connection failure events can be reported as suspicious behaviors as part of “real-time monitoring,” another requirement of Zero Trust. Beyond this, advanced encryption also helps us identify our own legacy or “shadow” systems that cannot support the most modern forms of encryption, meaning they should either be accessed through a middleware device or be sunset altogether.</p>

<h2 id="authentication-is-about-identity-not-methods">Authentication is about Identity, not Methods</h2>

<p>Just like there is no reliable authentication without encryption, there is no authorization without reliable authentication. Zero Trust requires strictly enforced authentication and authorization before resource access. Unfortunately, security experts sometimes focus on methods instead of identity. Passwords, certificates, tokens, or biometrics are just methods, they are not the identity itself.</p>

<p>For instance, spyware can collect login credentials by harvesting from the databases of pawned sites, especially when users use their company email addresses for private purposes. Meanwhile, simpler passwords can be brute-forced to be discovered. If security is compromised, the password can no longer prove identity.  You might think that a more modern and sophisticated method – such as a digital certificate – could solve the issue of simple passwords, but at the end of the day the strength of the certificates depends on the strength of the password that protects the certificate’s private key. If an attacker can compromise a protecting password, the authentication based on the certificate is also compromised.</p>

<p><a href="https://en.wikipedia.org/wiki/Multi-factor_authentication">Multi-factor authentication</a> (MFA, or 2FA) has not become so popular for nothing, and security experts today encourage both individuals and companies to use at least a second factor in authentication. However, MFA also has weak points in addition to its significant benefits. A typical <a href="https://en.wikipedia.org/wiki/Time-based_one-time_password">time-based, one-time password</a> (TOTP) either expires after a minute or is used as part of successful authentication. This means that even if an attacker acquires the actual value, it cannot be used for subsequent authentications. Unfortunately, this does not protect against <a href="https://en.wikipedia.org/wiki/Website_spoofing">website spoofing</a>, which can prompt a user to provide both their password and the TOTP on the spoofed authentication form. Using the intercepted credentials, the attacker can then authenticate in the name of the victim.</p>

<p>A more convenient, but less secure, second factor in MFA is <a href="https://en.wikipedia.org/wiki/Multi-factor_authentication#Mobile_phone-based_authentication">“push-based” authentication</a> where, following a successful password-based authentication, the user confirms the login by clicking “Yes, it was me” in a push notification received on their mobile device. However, if an attacker can compromise the password, several login attempts can be made that cause several push notifications on the mobile device of the victim. Just one confirmation in error that occurs either accidentally or through getting tired of the spoofing <a href="https://www.securityweek.com/high-profile-hacks-show-effectiveness-mfa-fatigue-attacks">(MFA fatigue attack)</a> is enough for the attacker to get into the system. It is also important to remember that a mobile-based second factor cannot be any more secure than the protection of the mobile device itself. If the mobile device isn’t locked, we risk the sense of the second factor, and this is the case if confirmation can be done without unlocking, or the locking pattern is simple, <a href="https://arstechnica.com/information-technology/2015/08/new-data-uncovers-the-surprising-predictability-of-android-lock-patterns/">predictable</a>, or vulnerable to <a href="https://en.wikipedia.org/wiki/Smudge_attack">smudge attack</a>.</p>

<p>To make a long story short: MFA is an essential best practice, but no matter how perfect a solution may seem, security awareness is still essential.</p>

<h2 id="authentication-is-necessary-but-not-sufficient">Authentication is Necessary, but not Sufficient</h2>

<p>Zero Trust Network Architecture requires both encryption and authentication, but these are means, not an end in and of themselves. According to the <a href="https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-207.pdf">National Institute of Standards and Technology (NIST) in a special publication on Zero Trust architecture</a>, both authentication and authorization should be strictly enforced every time before access is granted to any resources inside or outside of the private network, in line with the <a href="https://en.wikipedia.org/wiki/Principle_of_least_privilege">principle of least privilege</a>. This means that the classification of a resource should also vary the conditions of the resource access. Depending on the observable state of client identity, the requesting assets, or other behavioral and environmental attributes, various levels of access can be granted for a resource.</p>

<p>The principle of least privilege (PoLP), also known as the principle of minimal privilege (PoMP) or the principle of least authority (PoLA), requires that in a particular abstraction layer of a computing environment, every module (such as a process, a user, or a program, depending on the subject) must be able to access only the information and resources that are necessary for its legitimate purpose.</p>

<p>For instance, under certain circumstances, strictly “read-only” access may be granted to a particular resource, but upon further authentication “read-write” access can be provided as well. The situation reflects approaches to physical security, where entering physical environments with higher classification requires additional authentication. In terms of network and data security, access to data should mirror physical security considerations and authentication requirements for access to a location. In this dynamic, authentication is not just a single step – pass through the doors and you’re in – but rather a repeatedly executed task of the policy enforcement process based on what is being accessed and how.</p>

<p>The first tenet of Zero Trust says that all computing services are considered resources. Authentication services should be considered as resources, meaning that access should be granted taking the least privilege principle into account. It means that the number of authentication requests, including successful and unsuccessful, should not exceed a certain number. Rate limiting unsuccessful authentication requests helps to prevent brute-force attacks against the first factor of the authentication, such as a password. However, this does not diminish the importance of choosing properly secure passwords. Rate limiting successful authentication requests helps to avoid the compromise of the second factor after the first factor has already been compromised. For instance, an MFA fatigue attack is hardly feasible if the number of successful authentication requests is limited. Zero Trust requires monitoring and measuring the security posture of all owned and associated assets, meaning that exceeding the rate limit should be monitored and could trigger the deactivation of a user account that is suspected to be compromised. This is how identity handling becomes dynamic, something which is required at the optimal level of maturity in the <a href="https://www.cisa.gov/sites/default/files/publications/CISA%20Zero%20Trust%20Maturity%20Model_Draft.pdf">Zero Trust Maturity Model</a>.</p>

<h2 id="human-factor-is-unavoidable-in-authentication">Human Factor is Unavoidable in Authentication</h2>

<p>While trying to achieve the higher and higher levels of Zero Trust maturity, we should not forget about the weakest link in all security system chains: humans. Security is often contrary to comfort, yet discomfort is usually also contrary to security. Even the trendiest, most cutting-edge , methods can have weak points that attackers can successfully exploit while the most traditional methods might work effectively under such circumstances. Not surprisingly, users tend to bypass security systems if the discomfort they experience exceeds a certain level. Bothering users with <a href="https://learn.microsoft.com/en-us/archive/blogs/secguide/security-baseline-draft-for-windows-10-v1903-and-windows-server-v1903">frequent password changes</a> is a particularly good example of this. Users who are forced to frequently change their passwords often fall into two kinds of bad habits for security when trying to remember their passwords. The first is writing it down where others can see it, and therefore steal it. The second is that making memorable but predictable alterations to their existing password to fulfill the password policy requirements.</p>

<p>A conventional authentication method such as a password can be secure, but its security level does not depend on the expiry period. – rather, it depends on the entropy. The easier it is for a user to remember a strong password, the likelier it is they will use it. Security is about minimizing risks that cannot be taken without cooperation. High security requirements are good, but followable security rules that are in line with the risk are the best.</p>

<hr />

<p>Originally published at <a href="https://www.balasys.hu/blogs/modern-techniques-to-prevent-malware-instead-of-detecting-it">https://www.balasys.hu</a>.</p>

<p><a href="http://creativecommons.org/licenses/by-sa/4.0/" id="license" class="by-sa"></a><span class="licensetext"><span property="dct:title" rel="dct:type">No Zero Trust Network without strong authentication</span> is licensed under a <a rel="license" itemprop="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a></span></p>]]></content><author><name>Szilárd Pfeiffer</name></author><summary type="html"><![CDATA[What is Zero Trust and why is it important?]]></summary></entry><entry><title type="html">Weakened encryption is a silver bullet - not just for law enforcement agencies, but for cybercriminals</title><link href="https://pfeifferszilard.hu/2022/06/13/weakened-encryption-is-a-silver-bullet-not-just-for-law-enforcement-agencies-but-for-cybercriminals.html" rel="alternate" type="text/html" title="Weakened encryption is a silver bullet - not just for law enforcement agencies, but for cybercriminals" /><published>2022-06-13T00:00:00+02:00</published><updated>2022-06-13T00:00:00+02:00</updated><id>https://pfeifferszilard.hu/2022/06/13/weakened-encryption-is-a-silver-bullet-not-just-for-law-enforcement-agencies-but-for-cybercriminals</id><content type="html" xml:base="https://pfeifferszilard.hu/2022/06/13/weakened-encryption-is-a-silver-bullet-not-just-for-law-enforcement-agencies-but-for-cybercriminals.html"><![CDATA[<p>The member states of the <a href="https://www.un.org/">United Nations</a> are preparing to negotiate a draft of a new convention on cybercrime. <a href="https://www.unodc.org/">United Nations Office of Drugs and Crime</a> have invited NGOs and other stakeholders to participate in the negotiating sessions and share their views and expertise in this field. Our colleague, Szilárd Pfeiffer, Security Engineer &amp; Evangelist at Balasys, has shared his thoughts on data privacy, encryption, and cybercrime as a member of the <a href="https://cybertechaccord.org/">Cybersecurity Tech Accord</a> with the delegates of the member states:</p>

<blockquote>
  <p>The first international milestone in the fight against cybercrime was the <a href="https://www.coe.int/">Council of Europe</a>’s <a href="https://en.wikipedia.org/wiki/Convention_on_Cybercrime">Budapest Convention</a>. The Budapest Convention not only <a href="https://net.jogtar.hu/jogszabaly?docid=A0400079.TV">defined</a> the concepts of cybercrime, but also contained procedural rules. To this day, the convention remains one of the starting points for international regulation of cybercrime. It may also serve as a good guideline for the regulation to be developed by the United Nations.</p>

  <p>However, all regulation can contain points of debate. In the case of the Budapest Convention, the issue of privacy is one such point. It has been the subject of criticism over the last two-decade history of the convention. The convention sets out obligations for collecting, recording, and intercepting content data in real-time, transmitted by computer systems. It is important to highlight that the <a href="https://transparencyreport.google.com/https/overview">vast majority</a> of the content data that is transmitted through the internet is encrypted. This means that data can only be collected and recorded in encrypted form. To break the encryption, law enforcement agencies need a backdoor in the system or a deliberate weakening of the encryption. These are theoretically and technologically feasible, but they raise practical feasibility concerns, doubts concerning proportionality and security risks.</p>

  <p>Before continuing, I would like to emphasize that I do not intend to question the importance of fighting against cybercrime, but merely to find a way to minimize both security risks and privacy concerns.</p>

  <p>In order to deliberately weaken any encryption algorithms, the active involvement of all the major players in the technology sector is essential, as they should implement these weakened encryption algorithms in their commercial products. At the same time, we should not forget the <a href="https://en.wikipedia.org/wiki/Free_software_movement">free software movement</a> alongside the big tech giants. In this community, efforts to weaken encryption may be resisted because of their strong commitment to both trusted technologies and privacy. It is important to emphasize that the encryption software products we currently use in most web, cloud, and mobile technologies on our smartphones and laptops have been developed by technology companies and members of the free software movement.</p>

  <p>Even if methods to weaken encryption can be successfully enforced, the question is what the drawbacks are alongside the benefits they bring. For law-abiding citizens, surveillance is likely to be 100% successful, but for criminals, this rate might not be significantly higher than it is now.</p>

  <p>For instance, free software is never backed by a single organization, company, or state, but by decentralized communities that no one directly governs. The essence of <a href="https://en.wikipedia.org/wiki/Free_software">free software</a> is the right that users are <a href="https://en.wikipedia.org/wiki/The_Free_Software_Definition#The_Four_Essential_Freedoms_of_Free_Software">free to modify</a> the functionalities according to their needs. This means that cybercriminals can also evade the surveillance and weakened encryption that law enforcement agencies are able to break. In other words, our tools against the most dangerous cybercriminals and terrorists will be no more effective than they are today.
Whatever solution we choose, let us not forget that backdoors in our security systems can be exploited not only by us, but also by our enemies – against us. Cybercriminals today are still working hard to find specific software flaws that can be used to break into computer systems to acquire or corrupt as much data as possible. These criminals, knowing that there is a backdoor in every encrypted communication on the internet, would probably devote all their resources to finding and exploiting it. If even one of these criminal groups succeeds, the impact is currently unimaginable.</p>
</blockquote>

<hr />

<p>Originally published at <a href="https://balasys.eu/blogs/weakened-encryption-is-a-silver-bullet-not-just-for-law-enforcement-agencies-but-for-cybercriminals">https://www.balasys.hu</a>.</p>

<p><a href="http://creativecommons.org/licenses/by-sa/4.0/" id="license" class="by-sa"></a><span class="licensetext"><span property="dct:title" rel="dct:type">Weakened encryption is a silver bullet - not just for law enforcement agencies, but for cybercriminals</span> is licensed under a <a rel="license" itemprop="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a></span></p>]]></content><author><name>Szilárd Pfeiffer</name></author><summary type="html"><![CDATA[The member states of the United Nations are preparing to negotiate a draft of a new convention on cybercrime. United Nations Office of Drugs and Crime have invited NGOs and other stakeholders to participate in the negotiating sessions and share their views and expertise in this field. Our colleague, Szilárd Pfeiffer, Security Engineer &amp; Evangelist at Balasys, has shared his thoughts on data privacy, encryption, and cybercrime as a member of the Cybersecurity Tech Accord with the delegates of the member states:]]></summary></entry><entry><title type="html">The internet is a global village, not a metropolis</title><link href="https://pfeifferszilard.hu/2022/04/28/the-internet-is-a-global-village-not-a-metropolis.html" rel="alternate" type="text/html" title="The internet is a global village, not a metropolis" /><published>2022-04-28T00:00:00+02:00</published><updated>2022-04-28T00:00:00+02:00</updated><id>https://pfeifferszilard.hu/2022/04/28/the-internet-is-a-global-village-not-a-metropolis</id><content type="html" xml:base="https://pfeifferszilard.hu/2022/04/28/the-internet-is-a-global-village-not-a-metropolis.html"><![CDATA[<h2 id="the-internet-where-everybody-is-your-neighbor">The internet: where everybody is your neighbor</h2>

<p>The internet is not as big as you might think. Until <a href="https://en.wikipedia.org/wiki/IPv6">IPv6</a> arrives, there are fewer than 4 billion <a href="https://en.wikipedia.org/wiki/IPv4">IPv4</a> addresses. In theory, it would be almost 4.3 billion addresses, but 600 million IPv4 addresses are <a href="https://en.wikipedia.org/wiki/Reserved_IP_addresses">reserved</a>. In practice, there are approximately 3.7 billion public and routable IPv4 addresses. Finding vulnerable machines among this crowd of IP addresses might seem like looking for a needle in a haystack, but this is not true. With automated tools, anybody can systematically scan the internet for various vulnerabilities in public services.</p>

<p>This kind of mass scan requires fewer resources than you might think. Assuming that checking for a vulnerability takes a maximum of one second, in one month hackers need to check around 1,400 machines a second on average to find every single device on the internet that is exploitable for a particular vulnerability. If the available period is just a week or a day, you need to scan around 6,000 or 43,000 services a second, respectively. Sounds like relatively high numbers, but if you consider that even a huge country like <a href="https://en.wikipedia.org/wiki/List_of_countries_by_IPv4_address_allocation">China uses</a> less than 8% and <a href="https://en.wikipedia.org/wiki/List_of_countries_by_IPv4_address_allocation">Russia uses</a> less than 1% of the available IP addresses, you can see that focusing on smaller targets decreases the required resources to a tenth or a hundredth.</p>

<p>The numbers above demonstrate that it is theoretically possible to mass scan the entire internet. Effective free-to-use tools can be used to perform mass scans, converting this academic opportunity into practice. <a href="https://zmap.io/">ZMap</a>, <a href="https://github.com/robertdavidgraham/masscan">Masscan</a>, and others promise to scan the entire public IPv4 address space in <a href="https://github.com/zmap/zmap#zmap-the-internet-scanner">some ten</a> minutes or so on a typical desktop computer with a gigabit Ethernet connection. <a href="https://zmap.io/paper.pdf">Researchers proved</a> that the time needed to perform application-layer scans in some cases could be <a href="https://jhalderm.com/pub/papers/scanning-sec14.pdf">further reduced</a>, meaning that mass scans will be able to discover any accidentally or willingly published application layer services in a short space of time.</p>

<h2 id="search-engines-for-potential-weaknesses">Search engines for potential weaknesses</h2>

<p>Hackers do not even have to perform mass scans themselves, as commercial services sell bulk data from their mass scans. It would still be challenging to inspect, cleanse, transform, and model the bulk data to discover necessary information, though companies such as <a href="https://www.shodan.io/">Shodan</a> or <a href="https://www.zoomeye.org/">ZoomEye</a> have already done the data analysis task for you. They also provide search engines to access their well-structured databases, which contain near real-time information about exploitable services worldwide. These databases can only be accessed for free with substantial limitations, but of course, you can pay a <a href="https://account.shodan.io/billing">subscription</a> fee to reduce these limitations. The entry-level subscription cost is just a few dollars per month, meaning that the information price for the exploitable services is not high. Together with the numerous free-of-charge tools, this creates dramatically low barriers to entry for self-appointed hackers.</p>

<p>Some can put the mentioned tools and services together and create a well-automated system, especially since <a href="https://developer.shodan.io/">they provide</a><a href="https://en.wikipedia.org/wiki/API">APIs</a> to access their database. As you can see, you do not have to be a nation-state actor to perform effective scans for vulnerable services on the internet. Criminal and <a href="https://en.wikipedia.org/wiki/Hacktivism">hacktivist</a> groups can also do it by using the mentioned services or creating and managing their systems – this is common practice. However, the situation is actually worse than that, as even a <a href="https://en.wikipedia.org/wiki/Script_kiddie">script kiddie</a> could also find vulnerable services in their interest. The aforementioned search engines make it possible to filter the services by protocol, vendor, vulnerability, geolocation, etc. Someone with a low level of preparedness could cause harm to an organization by identifying targets with the mentioned tools using proof-of-concept implementations of the vulnerabilities. This can be true even if the author of the proof-of-concept implementation <a href="https://en.wikipedia.org/wiki/Coordinated_vulnerability_disclosure">discloses it responsibly</a>.</p>

<h2 id="operation-technology-is-also-under-attack">Operation technology is also under attack</h2>

<p>Cyberattacks may use devices that are not strictly part of the IT infrastructure to achieve their goals. For instance, with Shodan, you can easily find webcams without any authentication or default username and password near or inside a targeted organization. A hacker can use unauthorized access to a webcam to observe the targeted site and create plans to circumvent the guards. Some hacking techniques depend on getting devices into the targeted organization or near it. For instance, installing an open Wi-Fi hotspot near the targeted network may cause devices of the targeted network to connect automatically to the malicious Wi-Fi hotspot. If this happens, a hacker can eavesdrop on any unencrypted traffic sent or received by the connected device to get usernames and passwords. Even if the data is encrypted, metadata can still be collected, such as the domain name of the visited sites. It also opens the possibility of an intrusion attempt that exploits vulnerabilities on the connected device. An open webcam increases the risk that someone might install a malicious device unnoticed, even if it is a guarded factory site far from overcrowded districts.</p>

<p>Some people might think that no part of the critical infrastructures or <a href="https://en.wikipedia.org/wiki/Industrial_control_system">Industrial Control Systems</a> (ICS) are ever connected directly to the internet without robust authentication. The reality is different. For instance, a necessary Shodan query result contains thousands of <a href="https://en.wikipedia.org/wiki/Schneider_Electric">Schneider Electric</a> devices, mainly from Spain, France, and the United States. The manufacturer provides digital solutions for the energy and automation sector. You can also find thousands of devices by searching for network protocols (e.g., <a href="https://en.wikipedia.org/wiki/Modbus">Modbus</a>, <a href="https://en.wikipedia.org/wiki/DNP3">DNP</a>, <a href="https://en.wikipedia.org/wiki/Fieldbus">Fieldbus</a>, <a href="https://en.wikipedia.org/wiki/Profinet">PROFINET</a>) used in <a href="https://en.wikipedia.org/wiki/SCADA">SCADA</a> or Industrial Control Systems. It is possible that published <a href="https://en.wikipedia.org/wiki/Programmable_logic_controller">programmable logic controllers</a> (PLC) do not lead to the most severe risk, as you can also find <a href="https://en.wikipedia.org/wiki/SCADA#Human-machine_interface">human-machine interfaces</a> (HMI) published on the internet. These devices are usually accessible by the <a href="https://en.wikipedia.org/wiki/Remote_Desktop_Protocol">Remote Desktop Protocol</a> (RDP) servers, which can have both configuration and implementation issues. For instance, they may use NTLM authentication that has weaknesses and vulnerabilities.</p>

<h2 id="zero-trust-to-the-rescue">Zero Trust to the rescue</h2>

<p>Under such circumstances, neither industry nor other areas should assume that cyberattacks still don’t target them. Today, an organization does not have to be targeted by attackers directly. Automated tools systematically search the internet for vulnerable public services and attempt to exploit them immediately. If they are successful, the tools begin a lateral movement to spread themselves through the organization as extensively as possible and wait for the attackers’ commands. At that point, we have already lost. The best advice to prevent such a situation is what the <a href="https://en.wikipedia.org/wiki/Zero_trust_security_model">Zero Trust Security Model</a> has been advising for decades and is now also followed by US governmental offices in line with President <a href="https://www.forrester.com/blogs/biden-executive-order-bets-big-on-zero-trust-for-future-of-us-cybersecurity/">Biden’s executive order:</a></p>

<ol>
  <li>Handle everything equally as a resource, independently of whether it is part of information technology (IT) or operational technology (OT), as both have the same importance.</li>
  <li>Allow access to resources only after strict authentication independently from the resource accessible from the internet, as an intranet service can still be a target of an insider attack or malicious software brought to the intranet by a personal device (<a href="https://en.wikipedia.org/wiki/Bring_your_own_device">BYOD</a>).</li>
  <li>Prohibit plain text communication and use only encrypted connections with robust encryption algorithms to avoid the first step of each attack, eavesdropping.</li>
  <li>Apply the <a href="https://en.wikipedia.org/wiki/Principle_of_least_privilege">least privilege principle</a> during the authorization to minimize the risk that an infected device might cause on your network, as it is able to access everything that the device user is permitted to access.</li>
  <li>Apply these controls in a session-based manner to minimize the period between the revocation and the enforcement of an authorization level revocation.</li>
  <li><a href="https://en.wikipedia.org/wiki/Continuous_monitoring">Continuously monitor</a> your devices and network to prevent or notify of any suspicious behavior.</li>
</ol>

<hr />

<p>Originally published at <a href="https://balasys.eu/blogs/the-internet-is-a-global-village-not-a-metropolis">https://www.balasys.hu</a>.</p>

<p><a href="http://creativecommons.org/licenses/by-sa/4.0/" id="license" class="by-sa"></a><span class="licensetext"><span property="dct:title" rel="dct:type">The internet is a global village, not a metropolis</span> is licensed under a <a rel="license" itemprop="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a></span></p>]]></content><author><name>Szilárd Pfeiffer</name></author><summary type="html"><![CDATA[The internet: where everybody is your neighbor]]></summary></entry><entry><title type="html">How would Zero Trust prevent a Log4Shell attack?</title><link href="https://pfeifferszilard.hu/2022/02/10/how-would-zero-trust-prevent-a-log4-shell-attack.html" rel="alternate" type="text/html" title="How would Zero Trust prevent a Log4Shell attack?" /><published>2022-02-10T00:00:00+01:00</published><updated>2022-02-10T00:00:00+01:00</updated><id>https://pfeifferszilard.hu/2022/02/10/how-would-zero-trust-prevent-a-log4-shell-attack</id><content type="html" xml:base="https://pfeifferszilard.hu/2022/02/10/how-would-zero-trust-prevent-a-log4-shell-attack.html"><![CDATA[<p><strong>There is a seemingly trivial solution to any remote code execution attacks, namely: not to let the inbound traffic match the pattern that triggers the vulnerability of the server. Easy to say, but hard to do. There are<a href="https://hackertarget.com/detection-of-log4j-vulnerability/"> almost endless variations</a> of traffic patterns that could trigger the<a href="https://nvd.nist.gov/vuln/detail/CVE-2021-44228"> critical severity Log4j vulnerability</a>. As a result, malicious patterns of inbound traffic are extremely hard to detect. At the same time, outbound traffic caused by a Log4Shell attack site is easily detectable. Because this kind of traffic is always considered suspicious, as it targets random internet sites with a special protocol, according to the Zero Trust model it should not be allowed.</strong></p>

<p>Outbound traffic to a random internet site is a peculiarity of Log4Shell attacks that other arbitrary code execution attacks do not necessarily have. This peculiarity should help the prevention of exploitation not only when network defense is based on the perimeter-less Zero Trust Network Architecture security model but also if it is a perimeter-based castle-and-moat defense. The consequence of a Log4Shell attack is that the exploited server tries to download code from a random internet site owned by the attacker. If the download is successful, the server runs the code, usually to grant a backdoor to the attacker. Some questions arise. How could the access of random internet sites be successful? And even if it succeeded, how was the attacker able to access the opened backdoor?</p>

<h2 id="zero-trust-renders-log4shell-harmless">Zero Trust renders Log4Shell harmless</h2>

<p>Unlike Zero Trust, which requires micro segmentation, traditionally demilitarized zones (DMZ) are the best practice to isolate external-facing servers of the organization from both the local area network (LAN) and larger, usually untrusted networks such as the internet. Access to services running on the servers of DMZ, except public services such as web services, should be forbidden or strictly authenticated from the direction of the internet. As there are only a few legitimate reasons why a server in a DMZ would want to access the internet, this kind of traffic should also be strictly controlled. <strong>Even if a Log4Shell vulnerability is exploited in the server, it cannot download and later run any malicious code, as the outgoing traffic from the DMZ to the internet would have been prohibited.</strong> A strictly defended DMZ could prevent a Log4Shell attack, as exploited servers mostly use protocols (<a href="https://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol">LDAP</a>,<a href="https://en.wikipedia.org/wiki/Java_Naming_and_Directory_Interface"> JNDI</a>) to download the malicious codes, but it is hard to imagine legitimate reasons to permit the use of these protocols to access anything, or at least a random site on the internet, especially from a DMZ.</p>

<p>Zero Trust specifies and generalizes the methods and approaches already applied in any DMZ. Zero Trust requires the least privilege principle, for instance. Servers could access only the strictly necessary resources – e.g., an update server – on the internet with a specific address, port, and protocol. This way of working does not lead to serious administrative costs for the security team, as there are only a few reasons why a server needs to access the internet, and the firewall rules created as a result of these reasons are rarely changed. If for whatever reason, access to trusted resources cannot be tightened, protocol enforcement and content filtering become priorities. The least privilege also means that a resource can only be accessed with the necessary protocol. Even if an attacker runs a server on a port that is assumed to be allowed from a DMZ, such as HTTP(S), downloading the malicious code will fail when Log4j uses another protocol (LDAP, JNDI) than the expected one (HTTPS). Even if the necessary protocol is used, content filtering can detect malicious codes.</p>

<h2 id="zero-trust-defends-against-rce-attacks">Zero Trust defends against RCE attacks</h2>

<p>A remote code execution (RCE) attack does not necessarily require an external server on the internet from where the malicious code is acquired. In these cases, the code is injected into a legitimate but malformed request that exploits the vulnerability. It is almost impossible to detect a pattern that exploits a zero-day vulnerability, so we should focus on the consequences of running an arbitrary code on the exploited server. If the goal is simply to bring the service down immediately after exploitation, the attacker will succeed, as there are several ways to do so only on the privilege level of the exploited service. However, privilege escalation very frequently follows an RCE, which means that a suitable patch management process is essential to minimize this threat.</p>

<p>It is likely that one of the next steps will be<a href="https://en.wikipedia.org/wiki/Network_Lateral_Movement"> lateral movement</a>, i.e., trying to infect other servers of the organization. This requires the conversion of the exploited server to a command-and-control (C&amp;C) machine that requires permanent access. If we follow the principles of Zero Trust, only the public service of a server in the DMZ can be accessed from the internet. Accessing any other services on the server is usually either not permitted or only after strong authentication. If this is indeed the case, the C&amp;C server cannot be accessed by the attacker. Even if the public service itself can be used to control the server, <strong>eavesdropping and lateral movement cannot be performed if the server is isolated by micro segmentation in line with Zero Trust principles</strong>. Data leakage is still a serious threat if the attack is targeted and the exploited service can be used to leak data, but by applying Zero Trust principles this issue can be localized.</p>

<h2 id="think-global-not-local-one-by-one-solution-is-ineffective">Think global, not local: One-by-one solution is ineffective</h2>

<p>Log4j developers have implemented a built-in solution to control the outgoing LDAP and JNDI connections. This could be a solution for those affected by these attacks in the short term, but it cannot save time in the long term, as a large amount of	software have or will have similar issues even if we do not know it today. These kinds of security issues are the result of the way the software industry now works. The rapid development cycles, the release pressure, the missing security mindset, the low<a href="https://en.wikipedia.org/wiki/Code_coverage"> test coverage</a>, the lack of<a href="https://en.wikipedia.org/wiki/Security_testing"> security testing</a>, among others, can all be the cause of security issues. Security experts, such as penetration testers, hackers, and crackers, think differently than developers. Developers mostly focus on the<a href="https://en.wikipedia.org/wiki/Happy_path"> happy paths</a>, whereas security experts focus on<a href="https://en.wikipedia.org/wiki/Edge_case"> edge</a> and<a href="https://en.wikipedia.org/wiki/Corner_case"> corner cases</a> and how to exploit them. However, the goals of a penetration tester and a cracker are entirely different.</p>

<p>Though controlling outgoing connections from a server generally is a good idea, implementing it separately in all applications is presumably neither the most effective nor the fastest way. Different implementations of functionality like this may have other issues that increase complexity, especially if the goal is a comprehensive solution. Even if the developers of various software projects implement similar controls, it would require significant work. Maintainers then need to update a huge amount of software, which is a risk, and simply not possible in many cases, especially in the case of large organizations and IT infrastructures. According to Zero Trust Network Architecture, there should be a Policy Enforcement Point (PEP), which is responsible for enabling or terminating connections between a subject and an enterprise resource. Using a PEP, any outgoing connection from DMZ to the internet can be controlled carefully if they are not disabled.</p>

<h2 id="always-strictly-control-your-resources">Always strictly control your resources</h2>

<p>The solution, at least until an era of security by design arrives, is to strictly control resources, where everything is considered as a resource, even if it is on the internet. <strong>To avoid the consequences of vulnerabilities such as Log4Shell, we must control how resources can be accessed,</strong> how they can access other resources, and how these access rules can be enforced on the network <strong>using the least privilege principle and other principles of Zero Trust.</strong></p>

<hr />

<p>Originally published at <a href="https://balasys.eu/blogs/how-would-zero-trust-prevent-a-log4-shell-attack">https://www.balasys.hu</a>.</p>

<p><a href="http://creativecommons.org/licenses/by-sa/4.0/" id="license" class="by-sa"></a><span class="licensetext"><span property="dct:title" rel="dct:type">How would Zero Trust prevent a Log4Shell attack?</span> is licensed under a <a rel="license" itemprop="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a></span></p>]]></content><author><name>Szilárd Pfeiffer</name></author><summary type="html"><![CDATA[There is a seemingly trivial solution to any remote code execution attacks, namely: not to let the inbound traffic match the pattern that triggers the vulnerability of the server. Easy to say, but hard to do. There are almost endless variations of traffic patterns that could trigger the critical severity Log4j vulnerability. As a result, malicious patterns of inbound traffic are extremely hard to detect. At the same time, outbound traffic caused by a Log4Shell attack site is easily detectable. Because this kind of traffic is always considered suspicious, as it targets random internet sites with a special protocol, according to the Zero Trust model it should not be allowed.]]></summary></entry><entry><title type="html">Modern Techniques to Prevent Malware instead of Detecting It</title><link href="https://pfeifferszilard.hu/2022/01/18/modern-techniques-to-prevent-malware-instead-of-detecting-it.html" rel="alternate" type="text/html" title="Modern Techniques to Prevent Malware instead of Detecting It" /><published>2022-01-18T00:00:00+01:00</published><updated>2022-01-18T00:00:00+01:00</updated><id>https://pfeifferszilard.hu/2022/01/18/modern-techniques-to-prevent-malware-instead-of-detecting-it</id><content type="html" xml:base="https://pfeifferszilard.hu/2022/01/18/modern-techniques-to-prevent-malware-instead-of-detecting-it.html"><![CDATA[<p><strong>Though we would not argue against the importance of detecting malware, there should also be a cheap and effective step before detection, namely prevention. A malicious email that is never delivered to the recipients will never cause security issues. <a href="https://www.csoonline.com/article/3153707/top-cybersecurity-facts-figures-and-statistics.html">According to CSO</a>, 94% of malware in 2020 was spread through the email system.  Email, which remains an essential tool and still forms the basis of many business processes, uses one of the oldest and least secure communication protocols on the internet. Even though there are several ways to apply security policies on the mail transfer protocol to prevent the delivery of suspicious mail, these methods are not nearly as widely declared and enforced as they should be.</strong></p>

<p><img src="/assets/images/2022-01-18-modern-techniques-to-prevent-malware-instead-of-detecting-it.jpg" alt="Modern Techniques to Prevent Malware instead of Detecting It" /></p>

<p>The security of the other commonplace, older protocol, HTTP, the basis for the World Wide Web, has been in focus for more than ten years, leading to significant progress in this area. It is enough to mention the fact that HTTP has been almost completely replaced by HTTPS, an encrypted version of the same protocol that provides confidentiality, integrity and authenticity during data transfer. It should not be forgotten that just a few years ago, several sites sent credentials, customer data, or payment information on the internet without any kind of encryption. Post CCPA, GDPR, and other similar regulations, this is now almost unimaginable. A simple news site without any kind of authentication now uses HTTPS, quite rightly to avoid modification of content during transfer, just for instance. Try to imagine the potential consequences of a <a href="https://en.wikipedia.org/wiki/Man-in-the-middle_attack">man-in-the-middle attack</a> on one of the most popular news sites. As many business processes use the web and the protocol itself could not be improved, the ecosystem as a whole had to be improved to prevent downgrade attacks, clickjacking, cross-site scripting, and other malicious activities. But how secure is the transfer of electronic mail? Email is unquestionably still the basis of many formal and informal business processes, and so as long as this is the case, it is going to be the target of malicious parties. The answer to the issue of email security is a simple one, but not so encouraging. The state of mail transfer security is not nearly as good as in the domain of web page transfers.</p>

<p>There are significant differences between mail transfer and web page transfer. Web page transfer is usually performed between a web client (browser) and a web server. Mail, on the other hand, is not usually transferred to the recipients by a mail client, but instead to the server of the sender’s mail provider. It then passes the mail to the mail server of the recipient’s email provider, and then finally the recipient will download it asynchronously from that server. As you can see, there is a server-server communication that cannot be influenced by either of the clients. The details of that communication are determined by the participant servers and the simple mail transfer protocol (SMTP), which was designed at the beginning of the 1980s to be simple, not secure.</p>

<p><a href="https://datatracker.ietf.org/doc/html/rfc821">Originally</a>, the protocol did not contain any encryption capability. However, the <a href="https://en.wikipedia.org/wiki/Opportunistic_encryption">opportunistic use of TLS</a> was introduced in 1999, though only as an optional extension. Twenty years on, a publicly referenced server still must not be required to use the mechanism to deliver mail locally according to the related <a href="https://datatracker.ietf.org/doc/html/rfc3207#section-4">RFC</a>. It means that the owner of a recipient domain, notwithstanding a legitimate interest, is not allowed to require encryption during the mail delivery process. It depends on the sender’s goodwill to initiate encryption. Without it, both client and server are exposed to a malicious third party with <a href="https://en.wikipedia.org/wiki/Man-in-the-middle_attack">man-in-the-middle</a> capability that can enforce a lack of encryption, independently from the fact that both parties intend to encrypt. Without initiating encryption, the recipient cannot authenticate the sender and vice versa and beyond this, the mail transfer is vulnerable to eavesdropping and also content modification. Under such circumstances, the recipient may believe a sender is trusted and therefore believe that the attachment is trusted. However, the attachment could potentially be malware forged into the mail by a malicious third party.</p>

<h2 id="possible-solutions">Possible Solutions</h2>

<p>There are several mechanisms like <a href="https://en.wikipedia.org/wiki/Brand_Indicators_for_Message_Identification">BIMI</a>, <a href="https://en.wikipedia.org/wiki/DNS-based_Authentication_of_Named_Entities">DANE</a>, <a href="https://en.wikipedia.org/wiki/DomainKeys_Identified_Mail">DKIM</a>, <a href="https://en.wikipedia.org/wiki/DMARC">DMARC</a>, <a href="https://en.wikipedia.org/wiki/Domain_Name_System_Security_Extensions">DNSSEC</a>, <a href="https://datatracker.ietf.org/doc/html/rfc8461">MTA-STS</a>, <a href="https://en.wikipedia.org/wiki/Sender_Policy_Framework">SPF</a>, <a href="https://datatracker.ietf.org/doc/html/rfc8460">TLS-RPT</a>, which have aimed to remedy the situation, with a greater or lesser degree of success. We will examine the theories behind these mechanisms, their practical limitations, configuration difficulties, and the achieved effect.</p>

<p><img src="https://docs.google.com/spreadsheets/d/e/2PACX-1vSfbdF6Rpg_BlbLj6riHyWsUJjDxyZS-Hx5v1BZLeHAb-qZHSW4D1qCEz-Y6vFMJkGh6OL2eRLqjX9w/pubchart?oid=359061435&amp;format=image" alt="Mail server related DNS records" /></p>

<p>In general, it can be said that the most important limitations are prevalence and enforceability. As can be seen from the chart, there are significant differences in prevalence if we compare the top 1,000, 100,000, and one million domains of the <a href="https://majestic.com/reports/majestic-million">Majestic Million</a>. The prevalence is much higher among the most popular domains than the others. The reason cannot be only the fact that the Fortune 1,000 companies enjoy much better financial conditions, as these mechanisms can be implemented without significant cost. The lack of knowledge could be one reason, even though there are several guides and easy-to-use tools available to get the necessary configurations to enable these mechanisms. Another reason might be the fact that there is no regulatory body that can enforce the usage of these mechanisms or the execution of the policies declared by these mechanisms, only recommend them, as <a href="https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-177r1.pdf">NIST does</a>. The last reason to mention is that domain owners also have no power to force the execution of the declared policies on the mail systems owners of the recipient side. In any case, big tech companies like Google, which has a significant market share of the mail service market, have begun to put pressure on domain owners who want to provide mail service for their domain to publish policies, although <a href="https://security.stackexchange.com/questions/239152/does-gmail-still-ignore-dkim-if-spf-passes-dmarc-style">they do not necessarily strictly comply</a> with them.</p>

<p>In summary, the lack of these mechanisms on the sender side means a relatively high risk that emails sent from the domain are going to be put in a spam folder or rejected, at least by the biggest mail providers. The lack of checking of the policies declared through these mechanisms on the recipient side may mean a relatively high risk of incoming mails coming from unauthorized, or even malicious actors who can impersonate trusted parties. Usually, impersonation is the first step of a targeted attack where fraudsters can inject misinformation or bogus content such as scams, viruses, spyware, and malware into the organization.</p>

<h3 id="sender-policy-framework-spf">Sender Policy Framework (SPF)</h3>

<h4 id="concept">Concept</h4>

<p>The sender side can publish a policy through this mechanism, declaring which servers are allowed to send mail in the name of the given domain. The recipient side can use the published policies to check that the incoming mail is actually sent by an authoritative server. The policy itself is published in a TXT record of the given domain (e.g. example.com) and the servers can be declared by their IP addresses or indirectly, referring to other DNS records. The simplest case, at least in this respect, is that the domain owner maintains its email server and the MX record of the domain contains the IP address(es) of the mail server(s), so only the MX record should be referred to. From other points of view, it may seem easier to use a software-as-a-service solution to implement your mail service. In that case, you can include the policy of the SaaS provider or you can simply redirect to it.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>example.com. IN TXT “v=spf1 mx -all”
example.com. IN TXT “v=spf1 include:_spf.google.com -all”
example.com. IN TXT “v=spf1 redirect:spf.protection.outlook.com -all”
</code></pre></div></div>

<h4 id="threats">Threats</h4>

<p>The tricky part of a sender policy framework is not the explicit declaration of the servers, but the declaration of the default action. Default action answers the question of what should be done when the recipient realizes that there is no explicit rule that matches the IP address of the actual sender. For this, a special <a href="https://datatracker.ietf.org/doc/html/rfc7208#section-4.6.2">mechanism</a> (<code class="language-plaintext highlighter-rouge">all</code>) can be used optionally with a qualifier. All the examples above use the fail (<code class="language-plaintext highlighter-rouge">-</code>) qualifier, so the evaluation result of the Sender Policy Framework will <a href="https://datatracker.ietf.org/doc/html/rfc7208#section-2.6.4">fail</a> for clients not explicitly stated in the policy, meaning that they are not authorized to use the domain.</p>

<p><img src="https://docs.google.com/spreadsheets/d/e/2PACX-1vSfbdF6Rpg_BlbLj6riHyWsUJjDxyZS-Hx5v1BZLeHAb-qZHSW4D1qCEz-Y6vFMJkGh6OL2eRLqjX9w/pubchart?oid=148466378&amp;format=image" alt="Sending Mail by a Server is not Included in the Policy will" /></p>

<p>Although default fail is considered the most secure method, only less than one-third of the SPF records use it. This may be because this is not the most convenient method from the perspective of maintenance, as the lack of an IP address may cause failure in delivery.</p>

<p>There are two other options to avoid this problem. Domain owners can explicitly state that they are not asserting whether the IP address is authorized or not. This can be done by adding the <a href="https://datatracker.ietf.org/doc/html/rfc7208#section-2.6.2">neutral</a> (<code class="language-plaintext highlighter-rouge">?</code>) modifier. This might seem convenient in terms of the maintenance side, but has almost no added value on the security side. The result will be the same if the default is missing and the case is similar when the whole SPF record is missing. Counting all the MX records, not only the ones which have SPF TXT records, the ratio of neutral modifiers with a default value (all) is more than one-third. More than half of the SPF records use the soft fail modifier (<code class="language-plaintext highlighter-rouge">~</code>) when declaring the default behavior, meaning that the host is probably not authorized. From a security perspective, this is just a little more than if it were neutral.</p>

<p>Why is default action so important? Just imagine a firewall policy that contains a default rule declaring what should happen when no rule matches on the traffic explicitly when it could say that the traffic is not asserting or probably not authorized. It would be a security nightmare. Domain owners should know which servers are authoritative and should declare it strictly. In that case, the recipient can be sure that the sender is authoritative and the mail from a representative of a trusted company really comes from them, and as a result, avoid being a victim of a <a href="https://en.wikipedia.org/wiki/Phishing">phishing</a> or <a href="https://en.wikipedia.org/wiki/Social_engineering_(security)">social engineering</a> attack. Though strict rules may affect business continuity – something which must be taken into consideration – this issue should be handled by another mechanism, like DMARC, not by making the policy more permissive.</p>

<p>A severe limitation of the Sender Policy Framework is that servers are authorized by their IP address(es), which is vulnerable to <a href="https://en.wikipedia.org/wiki/IP_address_spoofing">IP spoofing</a>, and they could be declared indirectly referring to IP addresses by hostnames or other DNS records which are vulnerable to <a href="https://en.wikipedia.org/wiki/DNS_spoofing">DNS spoofing</a>. As the policy is stored in a DNS record, it should be transferred in a way that can guarantee the integrity of the data: without <a href="https://en.wikipedia.org/wiki/Domain_Name_System_Security_Extensions">DNSSec</a> or at least DNS over <a href="https://en.wikipedia.org/wiki/DNS_over_TLS">TLS</a>/<a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS">HTTPS</a>, the policy information is vulnerable to tampering and altering. The most serious issue with the Sender Policy Framework is that while its prevalence is relatively high, the really important question is what the ratio of the enforcer servers is. In any case, though the Sender Policy Framework can improve the level of security, publishing a policy has only a modest effect, which means that it should be combined with other mechanisms as it can prove neither the integrity nor the confidentiality of a mail.</p>

<h3 id="domainkeys-identified-mail-dkim">DomainKeys Identified Mail (DKIM)</h3>

<h4 id="concept-1">Concept</h4>

<p>In comparison, a Sender Policy Framework makes it possible to determine whether the server is authoritative to send an email in the name of the given domain, whereas the DomainKey Identified Mail method can be used to authenticate the mail itself independently from what the IP address of the sender was. The sender inserts a header (<code class="language-plaintext highlighter-rouge">DKIM-Signature</code>) into the mail which contains at least the hash of the body (<code class="language-plaintext highlighter-rouge">bh</code>), the signature of the content (<code class="language-plaintext highlighter-rouge">b</code>), the list of the headers (<code class="language-plaintext highlighter-rouge">h</code>) included when the signature is computed, the algorithm (<code class="language-plaintext highlighter-rouge">a</code>) used to create the signature and location (<code class="language-plaintext highlighter-rouge">d</code>, <code class="language-plaintext highlighter-rouge">s</code>) of the public key which can be used to verify the signature.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>DKIM-Signature: v=1; a=rsa-sha256; d=example.net; s=brisbane;
     c=relaxed/simple; q=dns/txt; t=1117574938; x=1118006938;
     h=from:to:subject:date:keywords:keywords;
     bh=MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI=;
     b=dzdVyOfAKCdLXdJOc9G2q8LoXSlEniSbav+yuU4zGeeruD00lszZVoG4ZHRNiYzR
</code></pre></div></div>

<p>The recipient mail server simply decrypts the signature with the public key found in the given location. The fact of the success of the decryption proves that the mail was signed by an actor who owns the private key related to the public key used to decrypt the signature. The decrypted value is the hash of the original mail that has been computed by the signer module of the sender server. The recipient server recomputes the hash and compares it with the result of the decryption. If the two hashes are identical, the mail body (including the attachments) and the listed headers are guaranteed not to have been altered by a third party. This essentially means that there is no malicious attachment in the mail unless the sender has attached it and nobody has modified any data in the mail, for instance, an account number, committing an <a href="https://en.wikipedia.org/wiki/Email_fraud">email fraud</a>.</p>

<h4 id="weaknesses">Weaknesses</h4>

<p>Choosing the appropriate signature algorithm and public key size requires care with this mechanism, as a not-so-wise decision may make the efforts so far meaningless. The traditional RSA public key type, with at least a 2048 bit key size or any elliptic curve-based key with at least a 224 bit key size can meet expectations, according to NIST. As multiple keys can be set, you can configure either an RSA key for compatibility and an ECDSA for modernity and to enjoy the benefits of elliptic curve-based cryptography, like smaller key sizes. Signature algorithm SHA-2 with any message digest size could be suitable. However, SHA-1 is strongly contraindicated as <a href="https://sha-mbles.github.io/">there is</a> a <a href="https://en.wikipedia.org/wiki/Collision_attack">chosen-prefix collision attack</a> against this algorithm. It needs a high amount of computational power, which makes a real-time break almost impossible, even taking into account the average delay time of a mail, though there is an opportunity of a <a href="https://en.wikipedia.org/wiki/Replay_attack">replay attack</a>, where the attacker can send almost the same mail later with a modified bank account number and payment deadline while the signature is still valid. The weak point of the DKIM mechanism is not the cryptography, but the fact that DKIM cannot provide confidentiality.</p>

<h3 id="mta-strict-transport-security-mta-sts">MTA Strict Transport Security (MTA-STS)</h3>

<h4 id="concept-2">Concept</h4>

<p>MTA Strict Transport Security is intended to solve the confidentiality issue of mail sending. Though the SMTP protocol originally did not contain any encryption capability, later an optional encryption capability was added as an extension, which is still not required. The situation is similar in relation to the unencrypted HTTP and the encrypted HTTPS protocols. An attacker with man-in-the-middle capability is able to force a client to use the unencrypted HTTP if the connection to the server was initiated with that protocol independently of whether the server supports the encrypted HTTPS protocol or not. It means that all the traffic communicated between the parties, which may contain sensitive information, can be intercepted by the attacker. There is a condition that must be met for a successful attack to be carried out, namely that the server must support the unencrypted version of the protocol. HTTP is not necessarily present, but SMTP always is, which means the information that encryption can be used must reach the client. This is the Strict Transport Security, which is implemented as a header in case of HTTP and a DNS record publication in case of SMTP.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>_mta-sts.example.com.  IN TXT "v=STSv1; id=20210602165800Z;"
</code></pre></div></div>

<p>During our investigation, we identified that most of the MTA-STS supporting domains use date in the id field. Assuming that the date in the id field is the publication date of the latest policy, and also assuming that the policies are not changing very often, a diagram can be drawn, in a cumulative manner, that shows how many MTA-STS policies were published. Though the curve may suggest a rise, the current prevalence does not even reach one percent.</p>

<p><img src="https://docs.google.com/spreadsheets/d/e/2PACX-1vSfbdF6Rpg_BlbLj6riHyWsUJjDxyZS-Hx5v1BZLeHAb-qZHSW4D1qCEz-Y6vFMJkGh6OL2eRLqjX9w/pubchart?oid=477050378&amp;format=image" alt="MTA Strict Transport Security (MTA-STS) count" /></p>

<p>Unlike the HTTP protocol, the SMTP protocol cannot be redirected to an encrypted channel, as SMTP protocol does not contain something like the “<a href="https://en.wikipedia.org/wiki/HTTP_301">moved permanently</a>” <a href="https://en.wikipedia.org/wiki/List_of_HTTP_status_codes">response status code</a> in HTTP, so the information that the server wants to use encrypted communication must reach the client on an independent channel. In this case, DNS is used, just like in Sender Policy Framework or DomainKey Identified Mail. Similar to the earlier mechanisms, MTA Strict Transport Security is published in a TXT record. The difference is that only the fact of presence and current version are indicated by TXT records, but the policy itself is distributed via HTTPS from a ‘<a href="https://tools.ietf.org/html/rfc5785">well-known</a>’ source. The DNS record contains a short string(<code class="language-plaintext highlighter-rouge">id</code>) that uniquely identifies a given instance of a policy so that senders can determine when the policy has been updated.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>version: STSv1
mode: enforce
mx: mail1.example.com
mx: mail2.example.com
max_age: 86400
</code></pre></div></div>

<p>The policy is similar to the <a href="https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security">Strict Transport Security header</a> in the case of HTTP. It contains a list (<code class="language-plaintext highlighter-rouge">mx</code>) of servers by which mails for this domain might be handled, with a lifetime value (<code class="language-plaintext highlighter-rouge">max_age</code>) for the policy, meaning that a client can cache a policy for up to this value and a mode (<code class="language-plaintext highlighter-rouge">mode</code>) indicating the expected behavior of the sending server in the case of a policy validation failure. The policy may declare that the sending server must not deliver (<code class="language-plaintext highlighter-rouge">enforce</code>) the message to a server which fails hostname matching or certificate validation, or has no TLS capability. For testing purposes, there is a mode (<code class="language-plaintext highlighter-rouge">testing</code>) that makes it possible to deliver mails despite the fact that there was validation failure, but a sending server can send a report about the failure (see TLS-RPT later). There is also a mode (<code class="language-plaintext highlighter-rouge">none</code>) indicating that there is no active policy. Today, just over half of the owners of MTS-STS publishing domains want to enforce the policy, while the other half is presumably in a testing phase. However, it should be noted that the ratio of domains supporting MTA-STS in the top one million is only 0.7%.</p>

<p><img src="https://docs.google.com/spreadsheets/d/e/2PACX-1vSfbdF6Rpg_BlbLj6riHyWsUJjDxyZS-Hx5v1BZLeHAb-qZHSW4D1qCEz-Y6vFMJkGh6OL2eRLqjX9w/pubchart?oid=1993289931&amp;format=image" alt="MTA Strict Transport Security (MTA-STS) modes" /></p>

<h4 id="threats-1">Threats</h4>

<p>Publishing MTA-STS policy is necessary, but far from sufficient. It should be enforced to minimize the risk of a MITM attack to ensure the unencrypted method of SMTP communication. Nonetheless, the existence and enforcement of the TLS protocol do not necessarily guarantee confidentiality. The quality and performance of the encryption is highly dependent on the details of the TLS settings. They should be determined and reviewed regularly with due care, bearing in mind the requirements of the related compliances (<a href="https://csrc.nist.gov/publications/detail/sp/800-52/rev-2/final">NIST</a>, <a href="https://www.pcisecuritystandards.org/documents/PCI_DSS_v3-2-1.pdf">PCI DSS</a>, <a href="https://www.hhs.gov/hipaa/for-professionals/breach-notification/guidance/index.html">HIPAA</a>) if necessary.</p>

<h4 id="weaknesses-1">Weaknesses</h4>

<p>TLS has a significant benefit, namely that it solves not only the problem of confidentiality but also the problem of integrity targeted by DKIM. However, it should be noted that the MTS-STS cannot guarantee confidentiality and integrity throughout the entire process of mail sending, despite <a href="https://en.wikipedia.org/wiki/Pretty_Good_Privacy">Pretty Good Privacy</a> (PGP) or <a href="https://en.wikipedia.org/wiki/S/MIME">Secure/Multipurpose Internet Mail Extensions</a> (S/MIME) – just in respect of MTA communication, as the name suggests, so in the case of client (MUA) server communication, the same issues exist when a protocol has only opportunist TLS capability, just like IMAP and POP3. Disadvantages of the mechanism include the fact that it requires the maintenance of a web server to publish the MTA-STS policy independently of whether the domain owner intends to publish a web page or not, and also that it requires the maintenance of an X.509 certificate for that web server, as only HTTPS is allowed to download the policy.</p>

<h3 id="smtp-tls-reporting-tls-rpt">SMTP TLS Reporting (TLS-RPT)</h3>

<h4 id="concept-3">Concept</h4>

<p>Though the topics discussed so far have been strictly related to security, we should also consider business continuity. Introducing the discussed mechanisms carries a risk in terms of mail delivery. The risk cannot be transferred and should not be accepted, as it can be reduced by the SMTP TLS Report mechanism declaring reporting endpoints where the sending servers can report when experiencing policy validation failures. The policy can be published in one or more TXT records that contain the aggregate report URI (<code class="language-plaintext highlighter-rouge">rua</code>), which can either be an email address or an HTTPS endpoint.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>_smtp._tls.example.com. IN TXT "v=TLSRPTv1; rua=mailto:reports@example.com"
_smtp._tls.example.com. IN TXT "v=TLSRPTv1; rua=https://reporting.example.com/v1/tlsrpt"
</code></pre></div></div>

<h4 id="weaknesses-2">Weaknesses</h4>

<p>One advantage of the mechanism is that it makes it possible to receive information about MTA-STS verification failures of sending mail servers, something which can be either a simple technical issue or an active attack. The disadvantage of the mechanism is that it may be necessary for the mail servers to use a protocol (HTTPS) that is unrelated to the mail sending and therefore requires extra functionality in the mail server implementation. Furthermore, the protocol has its own security mechanisms (<a href="https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security">HSTS</a>, <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/report-to">Report-To</a>, <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/NEL">Network Error Logging</a>, <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Expect-CT">Expect-CT</a>, …) which should be supported as an HTTP client in a mail server to provide the highest available security level. Policy violation reporting based on mails requires properly configured DomainKey Identified Mail (DKIM) on the report sending mail server side. If DKIM verification fails on the side of the report recipient mail server, the report can be ignored, according to the RFC. However, the RFC does not discuss the fact that the Sender Policy Framework can also be checked, as the report is actually sent by a mail server in the name of a given domain. With these checks, the reporter can be authenticated in a slightly weak way though, as an attacker can buy a domain and can apply proper DKIM and SPF settings and to send misinforming reports. However, with that activity there is a risk that the mail server is going to be added to a blacklist. The other option, sending the report via HTTPS, provides a much better opportunity to the attacker to send misleading reports, as it is much harder for the recipient to authenticate the sender of the report. Maybe this is the reason why the vast majority of the domain owners have chosen reporting MTA-STS violation in mail, not via HTTPS. This means there is a risk that spoof reports will be sent by an attacker to generate false positive alerts, thus undermining the trust in these kinds of reports, which could indicate man-in-the-middle attacks against our mailing system.</p>

<p><img src="https://docs.google.com/spreadsheets/d/e/2PACX-1vSfbdF6Rpg_BlbLj6riHyWsUJjDxyZS-Hx5v1BZLeHAb-qZHSW4D1qCEz-Y6vFMJkGh6OL2eRLqjX9w/pubchart?oid=758652635&amp;format=image" alt="SMTP TLS Reports Requested to be Sent" /></p>

<h4 id="threats-2">Threats</h4>

<p>Another problem of the reporting is the fact that it is completely voluntary. Publishing a TLSRPT policy with an appropriate aggregate report URI (<code class="language-plaintext highlighter-rouge">rua</code>) value does not necessarily mean that you will actually receive any reports, as the recipient may or may not support the TLSRPT mechanism. Even if the recipient supports the mechanism, it is far from sure that the recipient supports report sending and also intends to send reports, as configuration and a certain amount of resources are required to do so.</p>

<h3 id="domain-based-message-authentication-reporting-and-conformance-dmarc">Domain-based Message Authentication, Reporting and Conformance (DMARC)</h3>

<h4 id="concept-4">Concept</h4>

<p>The relation between the previously discussed TLS-RPT and the MTA-STS is the same as the relations between DMARC and the Sender Policy Framework (SPF) or DomainKey Identified Mail (DKIM). When the verification of SPF or DKIM fails, the recipient mail server can send a failure report to the domain owner defined in the DMARC TXT record. Compared to TLS-RPT it can be noted that there are more sophisticated settings here. Not only a single type of reporting endpoint can be set, but one for aggregate feedback (<code class="language-plaintext highlighter-rouge">rua</code>) and another for message-specific failure information (<code class="language-plaintext highlighter-rouge">ruf</code>). Report interval (<code class="language-plaintext highlighter-rouge">ri</code>) can also be set to indicate a request to mail receivers to generate aggregate reports separated by no more than the requested amount of time, and last but not least a policy is published as part of DMARC applies to the domain and can also apply to subdomains. The domain owner may request mail receivers to take no specific action (<code class="language-plaintext highlighter-rouge">none</code>) to treat mail that fails the DMARC check suspicious (<code class="language-plaintext highlighter-rouge">quarantine</code>) and place them into a spam folder, for instance, or to reject (<code class="language-plaintext highlighter-rouge">reject</code>) email that fails the DMARC check.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>_dmarc.example.com.  IN TXT "v=DMARC1; p=reject; rua=mailto:rua@example.com; ruf=mailto:ruf@example.com"
</code></pre></div></div>
<p>The ratio of the required actions dramatically shows how heavily the business depends on the email systems and how much more important the business continuity is than the security. Using a security first mindset any mail that fails the DMARC check would be treated as suspicious and should be quarantined or rejected. Except for the top 1,000 domain owners, only the minority are brave enough to ask the mail receivers to quarantine or reject. In other cases, the majority asks the mail receivers to take no action which questions the usage of DMARC has any sense.</p>

<p><img src="https://docs.google.com/spreadsheets/d/e/2PACX-1vSfbdF6Rpg_BlbLj6riHyWsUJjDxyZS-Hx5v1BZLeHAb-qZHSW4D1qCEz-Y6vFMJkGh6OL2eRLqjX9w/pubchart?oid=1607294539&amp;format=image" alt="Domain Owner Wishes for Mail Receivers to take the action if DMARC check fails" /></p>

<h4 id="weaknesses-3">Weaknesses</h4>

<p>Authenticating the issuer of the report is as hard as it is in the case of SMTP TLS Reporting (TLS-RPT), so there is a risk that the reports will be spoofed. Despite the TLS-RPT, DMARC supports only delivering reports by mail, so authentication of the sender is possible, but only in a limited manner.</p>

<h4 id="threats-3">Threats</h4>

<p>Incidentally, a situation is conceivable when there are two servers which support DMARC and intend to send reports when experiencing an issue, but the DMARC fails mutually during the check of the reporting mail due to a DMARC configuration or DMARC check implementation issue. In that case, the DMARC report send is triggered mutually by the DMARC report of the other server, which could potentially cause an endless loop. There are also limits to DMARC specification, like percentage (<code class="language-plaintext highlighter-rouge">pct</code>) of messages to which the DMARC policy is to be applied, or the earlier mentioned report interval (<code class="language-plaintext highlighter-rouge">ri</code>), but these options are designed to help the introduction of DMARC, not to avoid attacks.</p>

<h3 id="brand-indicators-for-message-identification-bimi">Brand Indicators for Message Identification (BIMI)</h3>

<p>The mechanisms discussed above are about machine-to-machine (M2M) communication. There are no – or no well-declared – user-facing consequences of success and failure. BIMI seeks to fill this gap, and makes the result of the earlier mechanisms visible to the user. BIMI enables the display of brand-controlled logos within supporting email clients (MUA) only if the email is well authenticated. This essentially means that the sender domain must publish DMARC for the domain and the subdomains, where the policy must be set to either quarantine or reject and where the percentage subdomain policy cannot be set to anything less than 100. For the brand’s logo to be displayed in the email client, the email must pass DMARC authentication and BIMI validation checks, ensuring that the organization’s domain has not been impersonated and the brand indicator is valid.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>default._bimi.example.com.  IN TXT "v=BIMI1; l=https://example/bimi/logo.svg"
</code></pre></div></div>

<h4 id="weaknesses-4">Weaknesses</h4>

<p>The configuration is relatively simple compared to the previously described mechanisms, but it must be noted that there could also be a relatively simple attack against it. Once the logo is published, a malicious actor could register a lookalike domain, configure DKIM, DMARC and copy the indicator to mimic the attackable domain and publish it as if it were its own. In that case, the same logo would appear in the email client of the recipient as the email coming from either the attacked or the attacker domain, so for the recipient it is just as hard to distinguish the two domains as it was before. The situation is much worse when the attacked domain does not publish BIMI, just the attacker one, so the latter may seem more trustworthy than the former. This weakness is targeted by the Verified Mark Certificates (VMC), which provide digitally signed evidence that the organization is allowed to use the brand indicator, like the extended validation where not only the domain but the organization name and other descriptive data are certified. The mechanism is based on X.509, so it carries all the complexity and difficulties of it, including validation, revocations checking and certificate transparency. Verified Mark Certificates can only be purchased by an organization if their logo is trademarked, so it is feared that the VMC part of BIMI takes us back to pre-Let’s Encrypt times, when there was no chance of signing a certificate with a widely accepted certificate authority for free, meaning it cannot reach high prevalence, just like extended validation.</p>

<h3 id="domain-name-system-security-extensions-dnssec">Domain Name System Security Extensions (DNSSEC)</h3>

<h4 id="concept-5">Concept</h4>

<p>DNSSEC is a suite of extension specifications for securing data exchanged using the DNS protocol in untrusted networks, just like the internet. DNSSEC ensures the authenticity and integrity of data, but not confidentiality. As the information stored in DNS records related to the previously discussed mechanisms (SPF, DMARC, DKIM…) are public, confidentiality is not required, but authenticity and integrity are, meaning that we need to be sure that the information is not compromised by an attacker. <a href="https://en.wikipedia.org/wiki/DNS_over_TLS">DNS over TLS</a> (DoT) and <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS">DNS over HTTPS</a> also provide authenticity and integrity in addition to confidentiality, but DNSSEC has a significant advantage over them, namely it can ensure authenticity and integrity during the potentially recursive name resolution procedure. DoT and DoH can provide confidentiality, integrity and authenticity between the DNS client and the DNS resolver, but it is not possible to ensure that all DNS servers use DoT/DoH when serving the request and the client has no information about whether they used DoT/DoH or not. It must be noted that these two protocols were never intended to achieve that goal, but instead to provide confidentiality and also privacy to the end-user.</p>

<h4 id="weaknesses-5">Weaknesses</h4>

<p>In the case of DNSSEC, integrity and authenticity are ensured by digital signatures. Answers from DNSSEC-protected zones are digitally signed by a key whose public part can be found in the DNSKEY record of the given domain. Using this public key, a DNS client can check the integrity and authenticity of the answer. Just like any other cases where integrity and authenticity are ensured by digital signatures, the key issue is the <a href="https://en.wikipedia.org/wiki/Chain_of_trust">chain of trust</a> and also key types, sizes, and digest algorithms used in the chain. Public keys found in DNSKEY records are signed by the DNSKEY of the upper level domain up to the top level (TLD) and the root domain. The parameters of these keys determine the security level. As DNSSEC is a relatively old protocol of the internet, and the earlier versions did not support strong encryption algorithms and large key sizes, so backward compatibility leads to the fact that small key sizes are still in use, however, large ones are also supported.</p>

<p><img src="https://docs.google.com/spreadsheets/d/e/2PACX-1vSfbdF6Rpg_BlbLj6riHyWsUJjDxyZS-Hx5v1BZLeHAb-qZHSW4D1qCEz-Y6vFMJkGh6OL2eRLqjX9w/pubchart?oid=1714537878&amp;format=image" alt="RSA Equivalent DNSSEC Key Sizes of Top Level Domains" /></p>

<p>Only an insignificant minority of the top-level domains currently use the 1024-bit RSA key as the strongest key. Mostly, 2048-bit RSA keys are used, though it must be noted that RSA keys with lesser key sizes are also used. The prevalence of <a href="https://en.wikipedia.org/wiki/Elliptic-curve_cryptography">elliptic-curve</a>-based public keys (ECDSA), despite all their advantages, is particularly low among the top-level domains. Only 256-bit keys are used, where the RSA equivalent key size is 3072, neither greater key sizes, nor Edwards-curve Digital Signature Algorithm (EdDSA) curves are used, though the latter is now recommended. Digest algorithms do not follow the same pattern as key types and sizes did: backward compatibility has no significant effect. Only an insignificant minority offer the weekend SHA-1 algorithm. The majority of the top-level domains offer strong digest algorithms.</p>

<p><img src="https://docs.google.com/spreadsheets/d/e/2PACX-1vSfbdF6Rpg_BlbLj6riHyWsUJjDxyZS-Hx5v1BZLeHAb-qZHSW4D1qCEz-Y6vFMJkGh6OL2eRLqjX9w/pubchart?oid=303158640&amp;format=image" alt="DNSSEC Digest Algorithms of Top Level Domains" /></p>

<p>It should be noted that the prevalence of DNSSEC is unfortunately low despite NIST declaring that organizations should deploy DNSSEC for all DNS name servers and validate DNSSEC responses on all systems that receive emails  to provide authentication and integrity protection to the DNS resource records discussed above.</p>

<h3 id="dns-based-authentication-of-named-entities-dane">DNS-based Authentication of Named Entities (DANE)</h3>

<h4 id="concept-6">Concept</h4>

<p>DANE is a protocol that allows binding X.509 certificates to domain names using the previously discussed DNSSEC. The most important result of binding domain names and X.509 certificates is that it makes any <a href="https://en.wikipedia.org/wiki/Certificate_authority">certificate authority</a> (CA) needless, as it can declare an X.509 certificate or public key used on a specific service (for instance an email server) of the domain. In this case, an X.509 public key does not need to be certified by a third party (CA) that the X.509 public-key relates to a specific domain. As part of the issuance of a <a href="https://en.wikipedia.org/wiki/Domain-validated_certificate">domain validated certificate</a>, the domain owner must prove its authority to the certification, mostly by creating a DNS record with a specified value. However, in the case of DANE, a TLSA record has already been created to store the public key or its hash, so the authority is proven by matching the public key or X.509 certificate in the DNS record and provided by the service. The mechanism also makes certificate common name and subject alternative name (SAN) matching needless, as the certificate and the domain name are bound by a DNS record related definitely to the domain name. This means there is no need to certify the binding by a certificate authority as it is cryptographically proven by DNSSEC. Certificate revocation check, which is the <a href="https://coroner.medium.com/why-do-certificate-revocation-checking-mechanisms-never-work-f9b7a4ee1a61">Achilles heel of the complete Public Key Infrastructure</a> (<a href="https://en.wikipedia.org/wiki/Public_key_infrastructure">PKI</a>), also becomes needless, as the validity of a certificate has no sense in this environment: there is no certification by a third party that could expire, and the domain owner simply stops publishing a key if it is suspected to be compromised. The situation is the same when the domain owner just wants to regularly change keys to decrease their validity period, as it would be strongly recommendable, and now <a href="https://www.thesslstore.com/blog/ssl-certificates-one-year-max-validity-ballot-fails-at-the-ca-b-forum/">blocked by the certificate authorities</a> despite the several weaknesses of revocation check mechanisms.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>_25._tcp.mail.example.com. IN TLSA 2 0 1 ( E8B54E0B4BAA815B06D3462D65FBC7C0 CF556ECCF9F5303EBFBB77D022F834C0 )
</code></pre></div></div>

<p>The previously emphasized way of working does not mean that DANE cannot work together with PKI. TLSA records have four data fields: certificate usage (2), selector (0), matching type (1), and certificate association data respectively. Certificate usage specifies that certificate association data contains a leaf certificate (end entity or EE) or a CA (trusted anchor or TA) and also specifies whether the certificate given by the server should be issued by a CA trusted by the application doing the verification (PKIX) or not (DANE). Certificate usage can take the following four values, where the certificate provided by the server during the TLS handshake must:</p>

<ol>
  <li>be issued by an already trusted CA whose certificate published in the certificate association data (CA constraint or PKIX-TA)</li>
  <li>be issued by an already trusted CA whose certificate must match exactly the certificate published in the certificate association data (Service certificate constraint or PKIX-EE)</li>
  <li>be issued by the CA published in the certificate association data (Trusted anchor assertion or DANE-TA)</li>
  <li>match exactly the certificate published in the certificate association data and it can be a self-signed certificate (Domain issued certificate or DANE-EE)</li>
</ol>

<p>Selector specifies whether the full certificate (0) or the subject public key info are part of the certificate sent by the server should be matched against the association data, while matching type specifies how the certificate association data is presented. The entire selected data can be presented either in the certificate association data (0) or by a hash (1/2).</p>

<p>DANE would mean a giant leap in the direction of a decentralized internet that preserves the support of the traditional PKI by providing some kind of digital self-determination for the domain owner. At the same time, it would also solve the problem that clients now trust in a predefined group of root CAs, where the members of the group depend on the vendor of the client application, independently from the fact that the domain owner trusts in only one CA that actually issued the certificate used by a server. Supporting DANE constraints could be applied to a number of trusted CAs – including the number zero, meaning that a domain owner could decide to skip CAs entirely.</p>

<h4 id="weaknesses-6">Weaknesses</h4>

<p>Despite all the advantages of DANE, there is one unavoidable disadvantage, namely the <a href="https://caniuse.com/dnssec">lack of client application support</a>, something which makes DANE a theoretical solution only to several serious practical issues.</p>

<h2 id="conclusions">Conclusions</h2>

<p>Given the serious shortcoming of the old fashioned mail transfer protocol, it is strongly recommended to arm email systems with as many additional security mechanisms as possible, according to NIST which recommends organizations to deploy SPF, MTA-STS, DANE, and DNSSEC in order to avoid receiving mail from unauthenticated sources on an unreliable channel. There are, however, overlaps between the discussed mechanisms, all of them are needed to ensure the complete confidentiality, integrity, and authenticity of the received mails and also to be aware of whether senders are experiencing any suspicious behavior. The discussed mechanisms have no significant introduction or maintenance costs, especially given their undoubted benefit. Organizations should declare policies to help each other make informed decisions. These policies are about what servers are authoritative to send emails by the name of their domains (SPF) and whether they want to use encryption (MTA-STS, DANE) to ensure confidentiality when receiving mails, what the evidence is that a received mail has factually been sent by sender (DKIM), and how parties can inform each other when they experience errors or suspicious behaviors (DMARC, TLS-RPT). They also have to prove the integrity and authenticity of these policies (DNSSEC). This means that the “never trust, always verify” principle of the <a href="https://en.wikipedia.org/wiki/Zero_trust_security_model">Zero Trust Security Model</a> is essential to filter out any suspicious senders and their deceptive content and malicious attachments, ideally before such content can cause a business email compromise.</p>

<hr />

<p>Originally published at <a href="https://www.balasys.hu/blogs/modern-techniques-to-prevent-malware-instead-of-detecting-it">https://www.balasys.hu</a>.</p>

<p><a href="http://creativecommons.org/licenses/by-sa/4.0/" id="license" class="by-sa"></a><span class="licensetext"><span property="dct:title" rel="dct:type">Modern Techniques to Prevent Malware instead of Detecting It</span> is licensed under a <a rel="license" itemprop="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a></span></p>

<p>Photo by <a href="https://unsplash.com/@markuswinkler?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Markus Winkler</a> on <a href="https://unsplash.com/license?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></p>]]></content><author><name>Szilárd Pfeiffer</name></author><summary type="html"><![CDATA[Though we would not argue against the importance of detecting malware, there should also be a cheap and effective step before detection, namely prevention. A malicious email that is never delivered to the recipients will never cause security issues. According to CSO, 94% of malware in 2020 was spread through the email system. Email, which remains an essential tool and still forms the basis of many business processes, uses one of the oldest and least secure communication protocols on the internet. Even though there are several ways to apply security policies on the mail transfer protocol to prevent the delivery of suspicious mail, these methods are not nearly as widely declared and enforced as they should be.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://pfeifferszilard.hu/assets/images/2022-01-18-modern-techniques-to-prevent-malware-instead-of-detecting-it.jpg" /><media:content medium="image" url="https://pfeifferszilard.hu/assets/images/2022-01-18-modern-techniques-to-prevent-malware-instead-of-detecting-it.jpg" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">CryptoLyzer: A comprehensive cryptographic settings analyzer</title><link href="https://pfeifferszilard.hu/2021/12/27/cryptolyzer-a-comprehensive-cryptographic-settings-analyzer.html" rel="alternate" type="text/html" title="CryptoLyzer: A comprehensive cryptographic settings analyzer" /><published>2021-12-27T00:00:00+01:00</published><updated>2021-12-27T00:00:00+01:00</updated><id>https://pfeifferszilard.hu/2021/12/27/cryptolyzer-a-comprehensive-cryptographic-settings-analyzer</id><content type="html" xml:base="https://pfeifferszilard.hu/2021/12/27/cryptolyzer-a-comprehensive-cryptographic-settings-analyzer.html"><![CDATA[<p><strong>CryptoLyzer is a multiprotocol cryptographic settings analyzer with SSL/TLS, SSH, and HTTP header analysis ability. The main purpose of the tool is to tell you what kind of cryptographic related settings are enabled on a client or server.</strong></p>

<p>If you are not interested in the principles behind the project, but the practice, feel free to skip the next section and jump to the Practice section.</p>

<h2 id="principles">Principles</h2>

<h3 id="rationale">Rationale</h3>

<p>There are many notable open-source projects (<a href="https://github.com/nabla-c0d3/sslyze">SSLyze</a>, <a href="https://github.com/mozilla/cipherscan">CipherScan</a>, <a href="https://testssl.sh/">testssl.sh</a>, <a href="https://github.com/prbinu/tls-scan">tls-scan</a>, …) and several SaaS solutions (<a href="https://tls.imirhil.fr/">CryptCheck</a>, <a href="https://www.cyphercraft.io/">CypherCraft</a>, <a href="https://hardenize.com">Hardenize</a>, <a href="https://www.immuniweb.com/ssl/">ImmuniWeb</a>, <a href="https://observatory.mozilla.org/">Mozilla Observatory</a>, <a href="https://www.ssllabs.com/">SSL Labs</a>, …) to do a security setting analysis, especially when we are talking about TLS, which is the most common and popular cryptographic protocol. However, most of these tools heavily depend on one or more versions of one or more cryptographic protocol libraries, like <a href="https://www.gnutls.org/">GnuTLS</a>, <a href="https://www.openssl.org/">OpenSSL</a>, or <a href="https://www.wolfssl.com/">wolfSSL</a>. But why is this such a problem?</p>

<p>The minor problem is the dependency easily stucks them in <a href="https://en.wikipedia.org/wiki/Transport_Layer_Security#SSL_1.0,_2.0,_and_3.0">SSL</a>/<a href="https://en.wikipedia.org/wiki/Transport_Layer_Security">TLS</a>/<a href="https://en.wikipedia.org/wiki/Datagram_Transport_Layer_Security">DTLS</a> as other cryptographic protocols (eg: <a href="https://en.wikipedia.org/wiki/IPsec">IPSec VPN</a>, <a href="https://en.wikipedia.org/wiki/Kerberos_(protocol)">Kerberos</a>, <a href="https://en.wikipedia.org/wiki/OpenVPN">OpenVPN</a>, <a href="https://en.wikipedia.org/wiki/Secure_Shell_Protocol">SSH</a>, …) can not be implemented directly by these libraries. Supporting them by the analyzer application needs extra effort. Anyway, most of the analysis of the cryptographic setting does not require any cryptography because before the parties could agree on the cryptographic algorithms they use plain text.</p>

<p>The major problem is the fact that analysis should test special and corner cases of the protocol that are intentionally triggered. It is hard to do that with a cryptographic protocol library, which was designed for production not for penetration testing or settings analysis. During an analysis, connections are tried to be established with hardly supported, experimental, obsoleted, or even deprecated mechanisms or algorithms to identify which ones are supported by the given client or server implementation. These mechanisms and algorithms may or may not be supported by the latest or any version of any cryptographic protocol implementations.</p>

<p>That is why most of the existing tools require special build(s) of the dependent library where all the protocol versions and algorithms of the good old days are reenabled to make the chance to set up these libraries to offer them as clients or as servers. But what if we want to test an algorithm or a mechanism that has never been implemented by the dependent cryptographic library?</p>

<p>It is not just a theory. A <a href="https://github.com/PeterMosmans/openssl">special fork</a> of OpenSSL, maintained by Pluralsight author <a href="https://www.pluralsight.com/authors/peter-mosmans">Peter Mosmans</a>, aims to have as many ciphers as possible. This fork is used and recommended by Mozilla Cipherscan, however, it can offer <a href="https://github.com/PeterMosmans/openssl/blob/1.0.2-chacha/README.md">less than two hundred</a> cipher suites, but there are more than three hundred in the different <a href="https://en.wikipedia.org/wiki/Request_for_Comments">RFC</a>s according to <a href="https://ciphersuite.info/cs/?software=all&amp;singlepage=true">Cipher Suite Info</a>. The majority of them are weak or insecure, which makes it particularly important to be part of the analysis. In addition, it is also true that there are cipher suites that are not on the Cipher Suite Info list, for instance, Russian standard (<a href="https://en.wikipedia.org/wiki/GOST">GOST</a>) cipher suites. These are rarely used cipher suites, but there is an <a href="https://github.com/gost-engine/engine">OpenSSL engine</a> that implements them, so they should be checked.</p>

<p>The situation is similar in the case of other parts of the TLS protocol, like extensions. It is unlikely that a cryptographic library will support each extension, but some of them are possibly implemented by some of the libraries. For instance, <a href="https://datatracker.ietf.org/doc/html/rfc6961">multiple certificate status request extension</a> and Diffie-Hellman key exchange in TLS 1.3 are not implemented by OpenSSL 1.x but implemented by GnuTLS and WolfSSL. Another example can be the <a href="https://datatracker.ietf.org/doc/html/rfc6187">X.509 certificate-based authentication in SSH</a> protocol, which is supported by <a href="https://www.ssh.com/manuals/server-admin/60/serverauth-cert.html">Tectia SSH</a> and has an <a href="http://roumenpetrov.info/openssh/">open-source implementation</a> but is not supported by the default OpenSSH. Even though they are not so common a comprehensive settings analyzer tool should run checks against them.</p>

<p>Summing up the main reason for establishing a greenfield project instead of contributing to existing one is the opinion, that an analysis is mostly testing when we trigger special and corner cases, hardly supported, experimental, obsoleted, or even deprecated mechanisms and algorithms, so a comprehensive analyzer should be implemented independently from current cryptographic protocol implementations as much as possible.</p>

<h3 id="goals">Goals</h3>

<p>CrypytoLyzer focuses on comprehensiveness, multi-protocol ability, and library independence. To do so cryptographic protocols clients are implemented focusing only on the necessary parts (usually the handshake). This kind of client can check a server against rarely or privately used, deprecated, or completely insecure algorithms and mechanisms.</p>

<ul>
  <li>Zero Trust
    <ul>
      <li>should not require any privilege during the analysis</li>
      <li>Should not require any credentials (except it is strictly necessary)</li>
      <li>should not provide any information for 3rd party</li>
    </ul>
  </li>
  <li>Completeness
    <ul>
      <li>should be able to support as many cryptographic protocols (DTLS, IPSec, OpenVPN, TLS, SSL, SSH, …) as possible</li>
      <li>should be able to handle special/corner cases of the cryptographic protocols</li>
    </ul>
  </li>
  <li>Usability
    <ul>
      <li>should work both in public and private networks</li>
      <li>should be able to give a human-readable summary (<a href="https://en.wikipedia.org/wiki/Markdown">Markdown</a>)</li>
      <li>should be able to give machine-readable detailed output (<a href="https://en.wikipedia.org/wiki/JSON">JSON</a>)</li>
      <li>should be customizable to meet special needs (Python <a href="https://en.wikipedia.org/wiki/Library_(computing)">library</a>)</li>
    </ul>
  </li>
</ul>

<p>The existing solutions are focusing on only one cryptographic protocol (TLS or SSH) despite the fact, that all the cryptographic protocols have the same building blocks (authentication, key exchange, symmetric ciphers, integrity), so they can be analyzed in the same (or almost the same) way, only the information which the analysis is based on can be acquired differently.</p>

<h2 id="features">Features</h2>

<p>The goals above are just goals, not the current state of the development, particularly since the actual version number is 0.8.0 at the time of writing. The supported cryptographic protocol families, for now, are the SSL/TLS and SSH. You can read comparative analysis with either open source or proprietary (SaaS) solutions below. I wanted to stay as objective as an author can with the competitors, but forgive me if I have not been managed to.</p>

<h3 id="strengths">Strengths</h3>

<h4 id="transport-layer-security-tls">Transport Layer Security (TLS)</h4>

<h5 id="specialties">Specialties</h5>

<p>Cryptolyzer supports both the early and deprecated <a href="https://tools.ietf.org/html/draft-hickman-netscape-ssl-00">Secure Socket Layer (SSL) 2.0</a> and each <a href="https://en.wikipedia.org/wiki/Transport_Layer_Security">Transport Layer Security</a> version up to the <a href="https://tools.ietf.org/html/rfc8446">TLS 1.3</a> version including draft versions. Some features although be checked hardly or difficultly using the most popular SSL/TLS implementations (eg: GnuTLS, <a href="https://www.libressl.org/">LibreSSL</a>, OpenSSL, wolfSSL, …) or just not in the scope of them. The checks are the specialties of Cryptolyzer such as supporting each cipher suite discussed on <a href="https://ciphersuite.info">ciphersuite.info</a> (and more) including the Russian governmental standard (GOST) cipher suites, Diffie-Hellman parameter checks, JA3 tag generation, …</p>

<!---
|| **CryptoLyzer** | Qualys SSL Labs | ImmuniWeb | Hardenize | Mozilla Observatory | Testssl.sh | SSLyze |
-->

<table>
  <thead>
    <tr>
      <th style="text-align: left"> </th>
      <th style="text-align: center"><strong>Crypto Lyzer</strong></th>
      <th style="text-align: center"><a href="https://www.ssllabs.com/ssltest/">Qualys SSL Labs</a></th>
      <th style="text-align: center"><a href="https://www.immuniweb.com/ssl/">Immuni Web</a></th>
      <th style="text-align: center"><a href="https://www.hardenize.com/">Hard enize</a></th>
      <th style="text-align: center"><a href="https://observatory.mozilla.org/">Moz. Obs.</a></th>
      <th style="text-align: center"><a href="https://testssl.sh/">testssl .sh</a></th>
      <th style="text-align: center"><a href="https://github.com/nabla-c0d3/sslyze">SSL-yze</a></th>
      <th style="text-align: center"> </th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td style="text-align: left">TLS 1.3 Draft Versions</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://datatracker.ietf.org/doc/html/rfc8446#section-4.2.8.1">TLS 1.3 DH Parameters</a></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left">TLS <a href="https://en.wikipedia.org/wiki/GOST">GOST</a> Ciphers</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left">TLS DH Param <a href="https://en.wikipedia.org/wiki/Safe_and_Sophie_Germain_primes">Prime Check</a></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left">TLS <a href="https://security.stackexchange.com/questions/225209/what-is-ecdh-public-server-param-reuse">DHE Param Reuse</a> Check</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left">TLS ECDH Param Reuse Check</td>
      <td style="text-align: center"><strong>0.9.x</strong></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left">SSH DH <a href="https://en.wikipedia.org/wiki/Safe_and_Sophie_Germain_primes">Param Check</a></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://engineering.salesforce.com/tls-fingerprinting-with-ja3-and-ja3s-247362855967">JA3 tag</a> Generation</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://engineering.salesforce.com/tls-fingerprinting-with-ja3-and-ja3s-247362855967">JA3 tag</a> Decode</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left"> </td>
      <td style="text-align: center"><strong>89%</strong></td>
      <td style="text-align: center"><strong>33%</strong></td>
      <td style="text-align: center">0%</td>
      <td style="text-align: center">11%</td>
      <td style="text-align: center">0%</td>
      <td style="text-align: center">0%</td>
      <td style="text-align: center">22%</td>
      <td style="text-align: center">0%</td>
    </tr>
  </tbody>
</table>

<h5 id="opportunistic-tls">Opportunistic TLS</h5>

<p>Several application-layer protocols have an extension to upgrade a plain text connection to an encrypted one (TLS) without using a separate port referred to as <a href="https://en.wikipedia.org/wiki/Opportunistic_TLS">opportunistic TLS</a> (STARTTLS). This mechanism is supported by the analyzer in the case of most protocols.</p>

<!---
|| **CryptoLyzer** | Qualys SSL Labs | ImmuniWeb | Hardenize | Mozilla Observatory | Testssl.sh | SSLyze |
-->

<table>
  <thead>
    <tr>
      <th style="text-align: left"> </th>
      <th style="text-align: center"><strong>Crypto Lyzer</strong></th>
      <th style="text-align: center"><a href="https://www.ssllabs.com/ssltest/">Qualys SSL Labs</a></th>
      <th style="text-align: center"><a href="https://www.immuniweb.com/ssl/">Immuni Web</a></th>
      <th style="text-align: center"><a href="https://www.hardenize.com/">Hard enize</a></th>
      <th style="text-align: center"><a href="https://observatory.mozilla.org/">Moz. Obs.</a></th>
      <th style="text-align: center"><a href="https://testssl.sh/">testssl .sh</a></th>
      <th style="text-align: center"><a href="https://github.com/nabla-c0d3/sslyze">SSL-yze</a></th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td style="text-align: left"><a href="https://en.wikipedia.org/wiki/File_Transfer_Protocol">FTP</a></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://en.wikipedia.org/wiki/Internet_Message_Access_Protocol">IMAP</a></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol">LDAP</a></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://en.wikipedia.org/wiki/Local_Mail_Transfer_Protocol">LMTP</a></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://en.wikipedia.org/wiki/MySQL">MySQL</a></td>
      <td style="text-align: center"><strong>0.9.x</strong></td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://en.wikipedia.org/wiki/Network_News_Transfer_Protocol">NNTP</a></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://en.wikipedia.org/wiki/Post_Office_Protocol">POP3</a></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://en.wikipedia.org/wiki/PostgreSQL">PostgreSQL</a></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://en.wikipedia.org/wiki/Remote_Desktop_Protocol">RDP</a></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://en.wikipedia.org/wiki/Sieve_(mail_filtering_language)">Sieve</a></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol">SMTP</a></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://en.wikipedia.org/wiki/XMPP">XMPP (Jabber)</a></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td style="text-align: left"> </td>
      <td style="text-align: center"><strong>92%</strong></td>
      <td style="text-align: center">0%</td>
      <td style="text-align: center">8%</td>
      <td style="text-align: center">17%</td>
      <td style="text-align: center">0%</td>
      <td style="text-align: center"><strong>83%</strong></td>
      <td style="text-align: center">67%</td>
    </tr>
  </tbody>
</table>

<h5 id="extensions">Extensions</h5>

<p>There are several extensions for the original TLS specifications which have both security and compatibility considerations. A high number of extension types can be analyzed by CryptoLyzer compared to most of the competitors.</p>

<!---
|| **CryptoLyzer** | Qualys SSL Labs | ImmuniWeb | Hardenize | Mozilla Observatory | Testssl.sh | SSLyze |
-->

<table>
  <thead>
    <tr>
      <th style="text-align: left"> </th>
      <th style="text-align: center"><strong>Crypto Lyzer</strong></th>
      <th style="text-align: center"><a href="https://www.ssllabs.com/ssltest/">Qualys SSL Labs</a></th>
      <th style="text-align: center"><a href="https://www.immuniweb.com/ssl/">Immuni Web</a></th>
      <th style="text-align: center"><a href="https://www.hardenize.com/">Hard enize</a></th>
      <th style="text-align: center"><a href="https://observatory.mozilla.org/">Moz. Obs.</a></th>
      <th style="text-align: center"><a href="https://testssl.sh/">testssl .sh</a></th>
      <th style="text-align: center"><a href="https://github.com/nabla-c0d3/sslyze">SSL-yze</a></th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td style="text-align: left"><a href="https://datatracker.ietf.org/doc/html/rfc7507">Fallback SCSV</a></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://datatracker.ietf.org/doc/html/rfc5246#section-7.4.1.2">TLS Clock</a> Skew</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://datatracker.ietf.org/doc/html/rfc3749">Compression</a></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://datatracker.ietf.org/doc/html/rfc5746">Secure Renegotiation</a></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td style="text-align: left">Insecure <a href="https://datatracker.ietf.org/doc/html/rfc5246#section-7.4.1.2">Renegotiation</a></td>
      <td style="text-align: center"><strong>0.8.x</strong></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://datatracker.ietf.org/doc/html/rfc5246#appendix-F.1.4">Session Caching</a></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://datatracker.ietf.org/doc/html/rfc5077">Session Ticketing</a></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://www.rfc-editor.org/rfc/rfc4492.html#section-5.1.1">Elliptic Curves</a></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://www.rfc-editor.org/rfc/rfc4492.html#section-5.1.1">EC Point Format</a></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://www.rfc-editor.org/rfc/rfc7301.html">App. Layer Proto. Negotiation</a></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://tools.ietf.org/id/draft-agl-tls-nextprotoneg-03.html">Next Protocol Negotiation</a></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://datatracker.ietf.org/doc/html/rfc7627">Extended Master Secret</a></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://www.rfc-editor.org/rfc/rfc7366.html">Encrypt-then-mac</a></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://www.rfc-editor.org/rfc/rfc8701.html">GREASE check</a></td>
      <td style="text-align: center"><strong>0.9.x</strong></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://security.stackexchange.com/questions/181692/long-handshake-intolerance-ssl-tls-command-line">Handshake Length Intolerance</a></td>
      <td style="text-align: center"><strong>0.9.x</strong></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left"> </td>
      <td style="text-align: center"><strong>80%</strong></td>
      <td style="text-align: center"><strong>73%</strong></td>
      <td style="text-align: center">40%</td>
      <td style="text-align: center">0%</td>
      <td style="text-align: center">0%</td>
      <td style="text-align: center"><strong>73%</strong></td>
      <td style="text-align: center">53%</td>
    </tr>
  </tbody>
</table>

<h4 id="secure-shell-ssh">Secure Shell (SSH)</h4>

<p>In addition to TLS, there are some other cryptographic protocols, such as SSH. The cryptographic protocols have the same building blocks (authentication, key exchange, symmetric ciphers, integrity), so they can be analyzed in the same manner and it can be done with the same tool using CryptoLyzer without compromise.</p>

<!---
|| **CryptoLyzer** | Mozilla Observatory | Operous SSH Check | Rebex SSH Check | SSH Configuration Auditor | ssh-audit | ssh_scan |
-->

<table>
  <thead>
    <tr>
      <th style="text-align: left"> </th>
      <th style="text-align: center"><strong>Crypto Lyzer</strong></th>
      <th style="text-align: center"><a href="https://observatory.mozilla.org/">Moz. Obs.</a></th>
      <th style="text-align: center"><a href="https://sshcheck.operous.dev/">Operous SSH Check</a></th>
      <th style="text-align: center"><a href="https://sshcheck.com/">Rebex SSH Check</a></th>
      <th style="text-align: center"><a href="https://www.sshaudit.com/">SSH Conf. Auditor</a></th>
      <th style="text-align: center"><a href="https://github.com/jtesta/ssh-audit">ssh-audit</a></th>
      <th style="text-align: center"><a href="https://github.com/mozilla/ssh_scan">ssh-scan</a></th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td style="text-align: left">Algorithms</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td style="text-align: left">Host Keys</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td style="text-align: left">Host Certificates</td>
      <td style="text-align: center"><strong>0.9.x</strong></td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left">X.509 Certificates</td>
      <td style="text-align: center"><strong>0.10.x</strong></td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left">DH Param Check</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left">Banner Analysis</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td style="text-align: left"> </td>
      <td style="text-align: center"><strong>67%</strong></td>
      <td style="text-align: center">17%</td>
      <td style="text-align: center">50%</td>
      <td style="text-align: center">17%</td>
      <td style="text-align: center">33%</td>
      <td style="text-align: center">33%</td>
      <td style="text-align: center"><strong>50%</strong></td>
    </tr>
  </tbody>
</table>

<h4 id="http-headers">HTTP Headers</h4>

<h5 id="security">Security</h5>

<p>There are security mechanisms in the application layer too, not only in the transport layer. The HTTP protocol is a good example of that as there are encryption (HSTS), authentication (Expect-CT, Expect-Staple), content integrity (subresource integrity, content security policy) related headers which are parsed by CryptoLyzer in detail.</p>

<!---
|| **CryptoLyzer** | Qualys SSL Labs | ImmuniWeb | Hardenize | Mozilla Observatory | Testssl.sh | SSLyze |
-->

<table>
  <thead>
    <tr>
      <th style="text-align: left"> </th>
      <th style="text-align: center"><strong>Crypto Lyzer</strong></th>
      <th style="text-align: center"><a href="https://www.ssllabs.com/ssltest/">Qualys SSL Labs</a></th>
      <th style="text-align: center"><a href="https://www.immuniweb.com/ssl/">Immuni Web</a></th>
      <th style="text-align: center"><a href="https://www.hardenize.com/">Hard enize</a></th>
      <th style="text-align: center"><a href="https://observatory.mozilla.org/">Moz. Obs.</a></th>
      <th style="text-align: center"><a href="https://testssl.sh/">testssl .sh</a></th>
      <th style="text-align: center"><a href="https://github.com/nabla-c0d3/sslyze">SSL-yze</a></th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td style="text-align: left"><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy">Content Security Policy</a></td>
      <td style="text-align: center"><strong>0.9.x</strong></td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/report-to">CSP Report-To</a></td>
      <td style="text-align: center"><strong>0.9.x</strong></td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://scotthelme.co.uk/a-new-security-header-expect-ct/">Expect Certificate Transparency</a></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://scotthelme.co.uk/designing-a-new-security-header-expect-staple/">Expect OCSP Staple</a></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security">HTTP Strict Transport Security</a></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Public_Key_Pinning">HTTP Public Key Pinning</a></td>
      <td style="text-align: center"><strong>0.10.x</strong></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy">Referrer Policy</a></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity">Subresource Integrity</a></td>
      <td style="text-align: center"><strong>0.8.x</strong></td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options">X Content Type Options</a></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options">X Frame Options</a></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection">X XSS Protection</a></td>
      <td style="text-align: center"><strong>0.8.x</strong></td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left"> </td>
      <td style="text-align: center"><strong>55%</strong></td>
      <td style="text-align: center">18%</td>
      <td style="text-align: center">9%</td>
      <td style="text-align: center">55%</td>
      <td style="text-align: center"><strong>82%</strong></td>
      <td style="text-align: center">18%</td>
      <td style="text-align: center">18%</td>
    </tr>
  </tbody>
</table>

<h5 id="generic">Generic</h5>

<p>Several HTTP headers are not closely related to security. Although, some among them, especially caching headers (Age, Cache-Control, Date, ETag, Expires, Last-Modified), can have significance when obsolescence of security-related information (eg: CRL) is indicated by caching headers.</p>

<!---
|| **CryptoLyzer** | Qualys SSL Labs | ImmuniWeb | Hardenize | Mozilla Observatory | Testssl.sh | SSLyze |
-->

<table>
  <thead>
    <tr>
      <th style="text-align: left"> </th>
      <th style="text-align: center"><strong>Crypto Lyzer</strong></th>
      <th style="text-align: center"><a href="https://www.ssllabs.com/ssltest/">Qualys SSL Labs</a></th>
      <th style="text-align: center"><a href="https://www.immuniweb.com/ssl/">Immuni Web</a></th>
      <th style="text-align: center"><a href="https://www.hardenize.com/">Hard enize</a></th>
      <th style="text-align: center"><a href="https://observatory.mozilla.org/">Moz. Obs.</a></th>
      <th style="text-align: center"><a href="https://testssl.sh/">testssl .sh</a></th>
      <th style="text-align: center"><a href="https://github.com/nabla-c0d3/sslyze">SSL-yze</a></th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td style="text-align: left"><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type">Content-Type</a></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Server">Server</a></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left">Application banner</td>
      <td style="text-align: center"><strong>0.9.x</strong></td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Age">Age</a></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control">Cache-Control</a></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Date">Date</a></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag">ETag</a></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Expires">Expires</a></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Last-Modified">Last-Modified</a></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Pragma">Pragma</a></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left">Proxy banner</td>
      <td style="text-align: center"><strong>0.9.x</strong></td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie">Set-Cookie</a></td>
      <td style="text-align: center"><strong>0.10.x</strong></td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left"> </td>
      <td style="text-align: center"><strong>75%</strong></td>
      <td style="text-align: center">0%</td>
      <td style="text-align: center">0</td>
      <td style="text-align: center">8%</td>
      <td style="text-align: center"><strong>75%</strong></td>
      <td style="text-align: center">42%</td>
      <td style="text-align: center">0%</td>
    </tr>
  </tbody>
</table>

<h3 id="weaknesses">Weaknesses</h3>

<h4 id="transport-layer-security-tls-1">Transport Layer Security (TLS)</h4>

<h5 id="x509-extensions">X.509 Extensions</h5>

<p>There are some X.509 related mechanisms in TLS that can have a serious impact on security in particular the revocation checking which is a <a href="https://coroner.medium.com/why-do-certificate-revocation-checking-mechanisms-never-work-f9b7a4ee1a61">weak point of the public key infrastructure</a> (PKI). Cryptolyzer lagging behind competitors in this field.</p>

<!---
|| **CryptoLyzer** | Qualys SSL Labs | ImmuniWeb | Hardenize | Mozilla Observatory | Testssl.sh | SSLyze |
-->

<table>
  <thead>
    <tr>
      <th style="text-align: left"> </th>
      <th style="text-align: center"><strong>Crypto Lyzer</strong></th>
      <th style="text-align: center"><a href="https://www.ssllabs.com/ssltest/">Qualys SSL Labs</a></th>
      <th style="text-align: center"><a href="https://www.immuniweb.com/ssl/">Immuni Web</a></th>
      <th style="text-align: center"><a href="https://www.hardenize.com/">Hard enize</a></th>
      <th style="text-align: center"><a href="https://observatory.mozilla.org/">Moz. Obs.</a></th>
      <th style="text-align: center"><a href="https://testssl.sh/">testssl .sh</a></th>
      <th style="text-align: center"><a href="https://github.com/nabla-c0d3/sslyze">SSL-yze</a></th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td style="text-align: left"><a href="https://datatracker.ietf.org/doc/html/rfc6066#section-8">OCSP Stapling</a></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://datatracker.ietf.org/doc/html/rfc7633">OCSP Must Staple</a></td>
      <td style="text-align: center"><strong>0.8.x</strong></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://certificate.transparency.dev/">Certificate Transparency</a></td>
      <td style="text-align: center"><strong>0.8.x</strong></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://en.wikipedia.org/wiki/Certificate_authority#Providers">Multiple Trusted Root CA Stores</a></td>
      <td style="text-align: center"><strong>0.9.x</strong></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://en.wikipedia.org/wiki/Public_key_infrastructure#Certificate_revocation">Revocation Status</a></td>
      <td style="text-align: center"><strong>0.10.x</strong></td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left"> </td>
      <td style="text-align: center"><strong>20%</strong></td>
      <td style="text-align: center">100%</td>
      <td style="text-align: center">80%</td>
      <td style="text-align: center">100%</td>
      <td style="text-align: center">40%</td>
      <td style="text-align: center"><strong>80%</strong></td>
      <td style="text-align: center">80%</td>
    </tr>
  </tbody>
</table>

<h4 id="generic-1">Generic</h4>

<p>Usability is another field where Cryptolyzer should evolve. Comprehensiveness is not enough, weaknesses, vulnerabilities should be highlighted to make the analysis results more easily understandable.</p>

<!---
|| **CryptoLyzer** | Qualys SSL Labs | ImmuniWeb | Hardenize | Mozilla Observatory | Testssl.sh | SSLyze |
-->

<table>
  <thead>
    <tr>
      <th style="text-align: left"> </th>
      <th style="text-align: center"><strong>Crypto Lyzer</strong></th>
      <th style="text-align: center"><a href="https://www.ssllabs.com/ssltest/">Qualys SSL Labs</a></th>
      <th style="text-align: center"><a href="https://www.immuniweb.com/ssl/">Immuni Web</a></th>
      <th style="text-align: center"><a href="https://www.hardenize.com/">Hard enize</a></th>
      <th style="text-align: center"><a href="https://observatory.mozilla.org/">Moz. Obs.</a></th>
      <th style="text-align: center"><a href="https://testssl.sh/">testssl .sh</a></th>
      <th style="text-align: center"><a href="https://github.com/nabla-c0d3/sslyze">SSL-yze</a></th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td style="text-align: left">Client Emulation</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left">Weakness Check</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left">Vulnerability Check</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td style="text-align: left">Highlights in Output</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left"> </td>
      <td style="text-align: center">0%</td>
      <td style="text-align: center">100%</td>
      <td style="text-align: center">75%</td>
      <td style="text-align: center">50%</td>
      <td style="text-align: center">75%</td>
      <td style="text-align: center">100%</td>
      <td style="text-align: center">25%</td>
    </tr>
  </tbody>
</table>

<h3 id="opportunities">Opportunities</h3>

<h4 id="dns-records">DNS Records</h4>

<p>Nowadays information related to security settings is stored in DNS records especially, but not exclusively in the case of the SMTP protocol. These records can be analyzed by CryptoLyzer and the necessary implementations are planned to be done soon.</p>

<!---
|| **CryptoLyzer** | Qualys SSL Labs | ImmuniWeb | Hardenize | Mozilla Observatory | Testssl.sh | SSLyze |
-->

<table>
  <thead>
    <tr>
      <th style="text-align: left"> </th>
      <th style="text-align: center"><strong>Crypto Lyzer</strong></th>
      <th style="text-align: center"><a href="https://www.ssllabs.com/ssltest/">Qualys SSL Labs</a></th>
      <th style="text-align: center"><a href="https://www.immuniweb.com/ssl/">Immuni Web</a></th>
      <th style="text-align: center"><a href="https://www.hardenize.com/">Hard enize</a></th>
      <th style="text-align: center"><a href="https://observatory.mozilla.org/">Moz. Obs.</a></th>
      <th style="text-align: center"><a href="https://testssl.sh/">testssl .sh</a></th>
      <th style="text-align: center"><a href="https://github.com/nabla-c0d3/sslyze">SSL-yze</a></th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td style="text-align: left"><a href="https://en.wikipedia.org/wiki/DNS_Certification_Authority_Authorization">DNS CAA</a></td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://datatracker.ietf.org/doc/html/rfc8461">MTA-STS</a></td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://en.wikipedia.org/wiki/DNS-based_Authentication_of_Named_Entities">DANE</a></td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://en.wikipedia.org/wiki/Sender_Policy_Framework">SPF</a></td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://en.wikipedia.org/wiki/DMARC">DMARC</a></td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left"><a href="https://datatracker.ietf.org/doc/html/rfc8460">TLS-RPT</a></td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td style="text-align: left"> </td>
      <td style="text-align: center"><strong>0%</strong></td>
      <td style="text-align: center">17%</td>
      <td style="text-align: center">17%</td>
      <td style="text-align: center"><strong>100%</strong></td>
      <td style="text-align: center">17%</td>
      <td style="text-align: center">17%</td>
      <td style="text-align: center">0%</td>
    </tr>
  </tbody>
</table>

<h4 id="other-protocols">Other protocols</h4>

<p>Some cryptographic protocols use the variant of the TLS protocol. Some protocols wrap the original TLS protocol such as <a href="https://openvpn.net/community-resources/openvpn-cryptographic-layer/">OpenVPN</a>, <a href="https://datatracker.ietf.org/doc/rfc9001/">QUIC</a>, and there is a modified version of TLS, according to the need of UDP, called <a href="https://en.wikipedia.org/wiki/Datagram_Transport_Layer_Security">DTLS</a>. Their support would be implemented relatively easily in CryptoLyzer in the future.</p>

<h2 id="practice">Practice</h2>

<h3 id="installation">Installation</h3>

<p>CryptoLyzer can be easily installed from <a href="https://pypi.org/">The Python Package Index</a> (PyPi)</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ pip install cryptolyzer
</code></pre></div></div>

<p>or via Docker from <a href="https://hub.docker.com/">Docker Hub Container Image Library</a> (docker hub)</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ docker pull coroner/cryptolyzer
</code></pre></div></div>

<p>and there are prebuilt packages for DEB (Debian, Ubuntu, …) and RPM (Fedora, RHEL, SUSE) based systems.</p>

<h3 id="usage">Usage</h3>

<p>The command-line interface is slightly similar to the OpenSSL command-line tool. On each level of subcommands, comprehensive help can be given using the –help option. The analysis subject can be given multiple times as an argument in URL format. Most of the time scheme and port part of the URL has default values according to the analyzer (eg: tls, ssh).</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ cryptolyze tls all www.example.com

$ cryptolyze tls1_2 ciphers https://www.example.com:443

$ cryptolyze ssh all www.example.com

$ cryptolyze ssh2 ciphers ssh://www.example.com:22

$ cryptolyze http headers http://www.example.com/path?query#fragment
</code></pre></div></div>

<p>or can be used via Docker</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ docker run --rm coroner/cryptolyzer tls all www.example.com

$ docker run --rm coroner/cryptolyzer tls1_2 ciphers https://www.example.com:443

$ docker run --rm coroner/cryptolyzer ssh all www.example.com

$ docker run --rm coroner/cryptolyzer ssh2 ciphers ssh://www.example.com:22

$ docker run --rm coroner/cryptolyzer http headers http://www.example.com/path?query#fragment
</code></pre></div></div>

<p><a href="http://creativecommons.org/licenses/by-sa/4.0/" id="license" class="by-sa"></a><span class="licensetext"><span property="dct:title" rel="dct:type">CryptoLyzer: A comprehensive cryptographic settings analyzer</span> is licensed under a <a rel="license" itemprop="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a></span></p>]]></content><author><name>Szilárd Pfeiffer</name></author><summary type="html"><![CDATA[CryptoLyzer is a multiprotocol cryptographic settings analyzer with SSL/TLS, SSH, and HTTP header analysis ability.]]></summary></entry></feed>