Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
i-can-count-to-four — Scan a filesystem for traces of the compromised eMudhra CA certificates (CVE-2026-111943) and get an upgrade plan | Kitploit
Tools/GitHubGitHub/xowap/i-can-count-to-four
Defensive ToolsVulnerability ScannersVulnerability AnalysisConfiguration AuditingCryptographySupply Chain SecurityIncident Response
GitHubxowap/i-can-count-to-four

i-can-count-to-four

Scan a filesystem for traces of the compromised eMudhra CA certificates (CVE-2026-111943) and get an upgrade plan

View Repository
29 days agoNot yet reviewed
Share

i-can-count-to-four

“I can count to four!” — because at least one of the leaked eMudhra private keys turned out to be the integer 4. The name is the joke; the tool is serious.

A small, fast Rust tool that walks a whole filesystem and tells you what to upgrade because of the compromised eMudhra intermediate CA certificates — the ones behind CVE-2026-111943 (Red Hat tracking: CVE-2026-114406 / RHSB-2026-012).

It answers one question: which programs on this machine still trust that CA, and how do I fix them?

① CONTAINS THE COMPROMISED CERTIFICATE — act on these
   CLEAR   Browser cache • cached downloads (Firefox/Chrome)      6 file(s)

② UPGRADE PLAN — 485 files across 126 items
   Python project (poetry) • 60 files, 17 unit(s)
        • ~/dev/jonator/api (9)
            cd "$HOME/dev/jonator/api" && poetry update
   Toolchain (managers & version managers) • 10 tool(s)
        • uv
            uv self update

Background

In April 2025 an eMudhra key-generation ceremony produced a second, weak set of P-384 keys during a wrap/unwrap step. Eight intermediate CA certificates were issued with those keys. The private keys turned out to be single- and double-digit integers, so anyone can recover them from the public certificates and mint fraudulent certificates for any domain.

The eight certificates are shipped in the crate (see certs/), verified byte-for-byte against the published SHA-256 fingerprints. Embedding the real bytes is what makes matching exact instead of guesswork.

For a deeper write-up, see the Cisco Talos advisory, Mozilla's Firefox and Chrome posts, and the Red Hat bulletin.

How it looks for traces

Detection is layered, cheap first:

  1. Fast prefilter — each file that is read is streamed through two Aho-Corasick automata in a single linear pass, with a needle-sized overlap across chunk boundaries (large opaque files are only read at head/tail — see Design notes):
    • the eight raw DER certificates (finds .der files, blobs inside NSS / JKS / PKCS#12 keystores, memory dumps, ...);
    • textual traces: SHA-256 fingerprints (compact and colon-separated), serial numbers, the subject CNs, the issuer roots (emSign Root … CA - G3), the vendor name, and the PEM header.
  2. Deep analysis (only for files that matched, so it stays cheap):
    • exact DER bytes anywhere in the file, by byte offset;
    • PEM / base64 certificate blocks are decoded, and each certificate is hashed (whole-cert SHA-256 and SPKI SHA-256) and parsed;
    • any bare DER certificate is parsed so a re-signed variant whose public key still matches is caught by its SPKI hash;
    • everything else is reported as a lower-confidence reference.

Every match is classified and ranked:

RankFindingsMeaning
HIGHexact-cert-bytes, exact-cert-pem, subject-public-keyThe certificate (or its key) is provably present.
lowcert-sha256-fingerprint, spki-sha256-fingerprint, serial-numberThe value is referenced as text (configs, CRLs, logs, allowlists).
lowsubject-cn, issuer-cn, vendor-nameA weaker mention worth a look.

Design notes

  • No name allow-lists. It does not skip /usr, node_modules, .git, or any tool directory. The only thing it refuses to descend into is the kernel's pseudo filesystems, discovered from /proc/self/mounts (proc, sysfs, devtmpfs, cgroup2, ...). So /dev and /sys are skipped, but /tmp, /run, /dev/shm, overlayfs and network mounts are all scanned.

  • Content sniffing, not name sniffing. The bulk of a disk is a handful of enormous files that cannot hold a certificate (model weights, disk images, media). Each file's head is classified by content:

    • certificate containers — ASN.1/DER, PEM, PKCS#12, JKS, SQLite/Berkeley DB — are read in full;
    • text (configs, logs, scripts, CRLs) is read in full up to a cap;
    • small files are always read in full;
    • anything else that is large is read only at the head and tail and counted as partially read, so coverage is never silently overstated.

    --thorough disables the shortcut and reads every file completely. On a machine with an 82 GiB model-blob directory this turns a ~160 s pass into ~0.02 s while still inspecting every file's head and tail.

  • Symlinks are not followed (avoids loops and double-reporting) and only regular files are read.

  • Streaming, not slurping. Files are read in 8 MiB chunks with a bounded per-thread buffer, so memory stays flat regardless of file size.

  • Parallel across files, with --threads workers (default: CPU count).

Build

cargo build --release
# binary at target/release/i-can-count-to-four

Usage

# Scan the whole disk from / (default)
sudo ./target/release/i-can-count-to-four

# Scan specific roots, human-readable output
./target/release/i-can-count-to-four /etc /home /opt

# Machine-readable JSON
./target/release/i-can-count-to-four / --json > findings.json

# Stay on one filesystem, limit depth, pick thread count
./target/release/i-can-count-to-four / --one-file-system --max-depth 4 --threads 8

# CI: exit non-zero (status 2) if the certificate is actually present
./target/release/i-can-count-to-four / --quiet --fail-on-found

# Show what is being hunted
./target/release/i-can-count-to-four --list-targets

Running as root avoids permission denied noise; without root the tool simply counts unreadable files and keeps going.

Options

FlagDescription
ROOT...One or more roots to scan (default /).
--jsonEmit JSON (summary + findings) instead of text.
--one-file-systemDo not cross mount points.
--follow-linksFollow symlinks (off by default).
--max-depth NLimit directory depth.
--max-file-size BYTESSkip files larger than N bytes (default: no limit).
--thoroughRead every file in full (disables content sniffing).
--threads NWorker threads (default: CPU count).
-q, --quietSuppress the progress line.
--fail-on-foundExit 2 if any high-confidence finding exists.
--list-targetsPrint the embedded target certificates and exit.
--no-colorDisable ANSI colors in the report (auto-off when not a TTY).
--from-json FILERe-render the grouped report from a saved --json file (no scan).
--html FILEAlso write a self-contained colored HTML report.

Exit codes: 0 success, 2 high-confidence finding present (with --fail-on-found), 3 could not read the --from-json file.

The report

The default output is a remediation plan, not a file dump. Findings are collapsed into the things you actually act on, with the right command for each:

① CONTAINS THE COMPROMISED CERTIFICATE — act on these
   CLEAR   Browser cache • cached downloads (Firefox/Chrome)      6 file(s)
   REMOVE  Temporary files • /tmp                                29 file(s)
Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    1.0k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    647
  • 3

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    421
  • 4

    jumpserver

    jumpserver/jumpserver

    JumpServer is an open-source Privileged Access Management (PAM) platform that provides DevOps and IT teams with on-demand and secure access to SSH, RDP, Kubernetes, Database and RemoteApp endpoints through a web browser.

    389
  • 5

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    333
  • 6

    SafeLine

    chaitin/safeline

    Self-hosted WAF and reverse proxy that filters malicious HTTP traffic, blocks SQL injection, XSS, and bot attacks, with rate limiting and dynamic HTML/JS encryption.

    331

Explore all tools

Browse our collection of tools

View all tools →