🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.devel
Article #471

Re: Scan your system for compromised CA certificates

#471
From: Steve McIntyre
Date: Sun, 15 Nov 2026 18:30
92 lines
5242 bytes
Hey Enrico!

enrico@enricozini.org wrote:
>
>Hello,
>
>I improvised a clamav signature file that looks for compromised eMudhra
>and Comodo CA certificates: you can find it attached to this email.
>
>I generated it by using bits of the PEM base64 data, the binary modulus
>or public keys of the certificates, and binary data as found in
>https://sources.debian.org/src/kodi/2:21.3+dfsg-2/lib/libUPnP/Neptune/Source/Data/TLS/Base/NptTlsTrustAnchor_Base_0065.cpp
>
>You can try it out on your own system with something like this:
>
>  [sudo] clamscan -r -i -d cacerts.ldb /usr /var/lib/ ~/.local/ ~/.cache/
>
>Besides containers, flatpaks, virtualenvs, nspawn machines and other
>things that embed entire OS trees or vendored libraries that are not
>being kept up to date, this, on my Debian systems, finds positives in
>several system packages:
>
>  # python3-pip-whl:
>  /usr/share/python-wheels/pip-25.1.1-py3-none-any.whl: Debian.Certs.eMudhraPEM.0.UNOFFICIAL FOUND
>
>  # libgrpc29t64:
>  /usr/share/grpc/roots.pem: Debian.Certs.eMudhraPEM.0.UNOFFICIAL FOUND
>
>  # texlive-base:
>  /usr/share/texlive/tlpkg/installer/curl/curl-ca-bundle.crt: Debian.Certs.ComodoPEM.0.UNOFFICIAL FOUND
>
>  # libnode115:
>  /usr/lib/x86_64-linux-gnu/libnode.so.115: Debian.Certs.eMudhraPEM.0.UNOFFICIAL FOUND
>
>  # libnss3:
>  /usr/lib/x86_64-linux-gnu/libnssckbi.so: Debian.Certs.ComodoKDEBIN.0.UNOFFICIAL FOUND
>
>  # python3-pip:
>  /usr/lib/python3/dist-packages/pip/_vendor/certifi/cacert.pem:
>Debian.Certs.eMudhraPEM.0.UNOFFICIAL FOUND
>
>  # python3-botocore:
>  /usr/lib/python3/dist-packages/botocore/cacert.pem: Debian.Certs.ComodoPEM.0.UNOFFICIAL FOUND
>
>  # awscli:
>  /usr/lib/python3/dist-packages/awscli/botocore/cacert.pem: Debian.Certs.ComodoPEM.0.UNOFFICIAL FOUND
>
>  # libqt6webenginecore6-bin:
>  /usr/lib/qt6/libexec/webenginedriver: Debian.Certs.eMudhraDER.0.UNOFFICIAL FOUND

Aha! Good call on using clamav here to find the patterns. :-)

>Note: these results are limited to things I happen to have installed in
>my system.
>
>This feels a lot bigger than I can handle, and I'm not sure what could
>be a next step.
>
>A possible thing that could be done is to write a lintian plugin that
>warns if a package is embedding these keys: I offer the attached
>signature file as a base for that.
>
>Note that clamav is able to open archives, which may help finding the
>cert in things like pip-25.1.1-py3-none-any.whl.
>
>Can one write a lintian test that uses clamav if installed? It could be
>interesting, also to scan using the standard clamav database for things
>that may have slipped into packages for some reason.
>
>Another possible thing we can do is run clamav on the unpacked contents
>of the archive every once in a while: is there a place where this can
>easily be done?
>
>I understand that I am unable to tell if these certificates are only
>shipped, or also used. Perhaps removing them is an easier route than
>ensuring that they are not, and keep not, being used?

All of these are sensible questions, I think. I don't have answers
directly, but you've prompted me to make another point!

IMHO we *absolutely* need to fix this awful anti-pattern of packages
embedding and using their own certificate stores like this. On other
OSes this might be considered good practice, but in Debian there is
absolutely no good reason to not just use the system-provided
certificate store. As you've demonstrated above, even after applying
updates you appear to still have known-bad certificates on your
system. This is a security nightmare.

-- 
Steve McIntyre, Cambridge, UK.                                steve@einval.com
Can't keep my eyes from the circling sky,
Tongue-tied & twisted, Just an earth-bound misfit, I...
Technical Details
Message-ID: <NZN9f-c5H1-1@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.corradoroberto.it!bofh.it!news.nic.it!robomod
References: <NZMdc-c58b-7@gated-at.bofh.it>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.corradoroberto.it!bofh.it!news.nic.it!robomod
From: Steve McIntyre <steve@einval.com>
Newsgroups: linux.debian.devel
Subject: Re: Scan your system for compromised CA certificates
Date: Sun, 15 Nov 2026 19:30:01 +0100
Message-ID: <NZN9f-c5H1-1@gated-at.bofh.it>
References: <NZMdc-c58b-7@gated-at.bofh.it>
X-Mailbox-Line: From debian-devel-request@lists.debian.org  Sun Nov 15 18:23:34 2026
Old-Return-Path: <steve@einval.com>
X-Amavis-Spam-Status: No, score=-2.1 tagged_above=-10000 required=5.3
 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
 DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001]
 autolearn=ham autolearn_force=no
X-Policyd-Weight: using cached result; rate: -4.6
X-Newsgroups: mossbank.mlist.debian.devel
Organization: Invalid Argument
X-Mailing-List: <debian-devel@lists.debian.org> archive/latest/373203
List-ID: <debian-devel.lists.debian.org>
List-URL: <https://lists.debian.org/debian-devel/>
List-Archive: https://lists.debian.org/msgid-search/E1xSesr-000000069XA-3dKo@mail.einval.com
Approved: robomod@news.nic.it
Lines: 92
Sender: robomod@news.nic.it
X-Original-Date: Sun, 15 Nov 2026 18:23:21 +0000
X-Original-Message-ID: <E1xSesr-000000069XA-3dKo@mail.einval.com>
X-Original-References: <avnrRnhY_Xs-cU_l@ezini.eu>