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 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? Enrico -- GPG key: 4096R/634F4BD1E7AD5568 2009-05-08 Enrico Zini <[email protected]>
# eMudra: # Extract from the PEM key data Debian.Certs.eMudhraPEM.0;Engine:81-255,Target:0;0;546a45544d4245474131554543784d4b5a573154615764754946424c5354456c4d434d474131554543684d635a5531315a476879595342555a574e6f626d3973 # binary pub part of the CA key Debian.Certs.eMudhraDER.0;Engine:81-255,Target:0;0;0423a50cb82d12f528f3b1b2dde20212809e395f494d9fc925345974ecbb061ce7c072afe8ae2fe141548714a84ab2e87c82e65b6ab5dcb375ce8b06d08623bf46d58e0f3f04f4d71c927ef6a563c2f55f8e2e4fa11819022b320a82647d1693d1 # Comodo: # Extract from the PEM key data Debian.Certs.ComodoPEM.0;Engine:81-255,Target:0;0;657a364b4a636641335a336d4e576751494a3250324e3753773453634456376f4c386b434177454141614f42774443427654416442674e564851344546675155 # Comodo binary data from libupnp/neptune/source/data/tls/base/npttlstrustanchor_base_0065.cpp Debian.Certs.ComodoKDEBIN.0;Engine:81-255,Target:0;0;308204323082031aa003020102020101300d06092a864886f70d0101050500307b310b3009060355040613024742311b301906035504080c1247726561746572204d616e636865737465723110300e06035504070c0753616c666f7264311a3018060355040a0c11436f6d6f646f204341204c696d697465643121301f06035504030c18414141204365727469666963617465205365727669636573301e170d3034303130313030303030305a170d3238313233313233353935395a307b310b3009060355040613 # Binary modulus part from the DER data Debian.Certs.ComodoDER.0;Engine:81-255,Target:0;0;00be409df46ee1ea76871c4d45448ebe46c883069dc12afe181f8ee402faf3ab5d508a16310b9a06d0c57022cd492d5463ccb66e68460b53eacb4c24c0bc724eeaf115aef4549a120ac37ab23360e2da8955f32258f3dedccfef8386a28c944f9f68f29890468427c776bfe3cc352c8b5e07646582c048b0a891f9619f762050a891c766b5eb78620356f08a1a13ea31a31ea099fd38f6f62732586f07f56bb8fb142bafb7aaccd6635f738cda0599a838a8cb17783651ace99ef4783a8dcf0fd942e2980cab2f9f0e01deef9f9949f12ddfac744d1b98b547c5e529d1f99018c7629cbe83c7267b3e8a25c7c0dd9de6356810209d8fd8ded2c3849c0d5ee82fc9
signature.asc
Description: PGP signature

