Hey Enrico! [email protected] 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. [email protected] Can't keep my eyes from the circling sky, Tongue-tied & twisted, Just an earth-bound misfit, I...

