PKILab API

Check a signed file or certificate from your own tools: one HTTP request returns the signer, its CRL revocation status, and whether the Cert Graveyard knows it as an abused certificate.

Quick start

No account or API key is needed. Upload a signed file and read the JSON back:

curl -F "file=@signed_sample.exe" https://pkilab.certgraveyard.org/api/v1/check

The response tells you who signed it, whether the signing certificate has been revoked, and whether it appears in the Cert Graveyard. It also includes a report_url linking to the full Certificate Inspector report for the same upload.

Endpoint

POST https://pkilab.certgraveyard.org/api/v1/check

Extracts the certificate chain from the input, picks the certificate that signed the content, and checks it. The signing certificate is the leaf of the primary Authenticode chain; timestamp countersignature certificates are ignored. If the input has no leaf (for example, a single root certificate), the first certificate found is used.

Any format the Certificate Inspector accepts works here: PE (EXE, DLL, SYS, OCX), MSI, CAB, APPX/MSIX, Mach-O, P7X, P7B/P7C, DER, PEM/CRT/CER, signed PowerShell/JS/VBS scripts, and signed RDP files.

Sending input

Send the input in one of three ways. They are checked in this order.

1. Multipart upload recommended

A multipart/form-data request with the file in a field named file. The filename's extension picks the parser; files with an unknown extension (such as defanged .bin samples) are identified by their magic bytes.

curl -F "[email protected]" https://pkilab.certgraveyard.org/api/v1/check
Files named .exe, .dll, .sys or .ocx are read as a stream: only the PE headers and the signature block are parsed, so even very large binaries return quickly.
2. JSON with a PEM certificate

A JSON body (Content-Type: application/json) with a pem field holding one or more PEM-encoded certificates.

curl -H "Content-Type: application/json" \
     -d '{"pem": "-----BEGIN CERTIFICATE-----\nMIIF...\n-----END CERTIFICATE-----"}' \
     https://pkilab.certgraveyard.org/api/v1/check
3. Raw request body

The file's bytes as the request body. There is no filename, so the format is always detected from magic bytes. Useful when your HTTP client can't build multipart requests.

curl --data-binary "@sample.bin" \
     -H "Content-Type: application/octet-stream" \
     https://pkilab.certgraveyard.org/api/v1/check
Response

A successful check returns 200 OK with a JSON object:

{
  "source": "sample.exe",
  "certificate": {
    "cert_type": "leaf",
    "subject_cn": "Example Software LLC",
    "issuer_cn": "Example Code Signing CA R36",
    "serial_number": "0E:4B:2C:91:...",
    "not_before": "2025-03-14T00:00:00+00:00",
    "not_after": "2026-03-14T23:59:59+00:00",
    "thumbprint_sha256": "9F86D081884C7D659A2FEAA0C55AD015..."
  },
  "crl": {
    "status": "revoked",
    "detail": "Certificate serial is listed on the CRL.",
    "checks": [
      {
        "url": "http://crl.example-ca.com/CodeSigningCA.crl",
        "revoked": true,
        "revoked_at": "2025-09-02T15:21:07+00:00",
        "reason": "Key Compromise",
        "this_update": "2026-10-23T08:00:00+00:00",
        "next_update": "2026-10-30T08:00:00+00:00"
      }
    ]
  },
  "certgraveyard": {
    "status": "found",
    "result_count": 3,
    "malware_families": ["Lumma Stealer"]
  },
  "report_url": "https://pkilab.certgraveyard.org/inspect/result/3f1c9a52-..."
}
Top-level fields
FieldTypeDescription
sourcestringThe uploaded filename, or "pasted certificate" / "raw upload".
certificateobjectThe signing certificate that was checked (see below).
crlobjectCRL revocation result (see below).
certgraveyardobjectCert Graveyard lookup result (see below).
report_urlstring | nullLink to the full HTML Inspector report for this upload, including every certificate in the chain and all anomaly checks. null if the report could not be saved.
certificate
cert_typestringleaf, intermediate, root or timestamp. Almost always leaf for signed files.
subject_cnstring | nullSubject Common Name: who the certificate was issued to.
issuer_cnstring | nullIssuer Common Name: the CA that issued it.
serial_numberstringUppercase hex bytes separated by colons, e.g. 0E:4B:2C.
not_before, not_afterstringValidity period, ISO 8601 in UTC.
thumbprint_sha256stringSHA-256 of the DER-encoded certificate, uppercase hex with no separators.
crl

PKILab downloads every CRL Distribution Point listed in the certificate and looks for its serial number. OCSP is not queried by the API.

statusstring revoked the serial is on at least one CRL.
valid at least one CRL was fetched and the serial is not on it.
unknown the certificate lists no CRL, or none could be fetched or parsed.
detailstringA one-sentence explanation of the status.
checksarrayOne entry per CRL URL. Each has url and either the result (revoked, this_update, next_update, plus revoked_at and reason when revoked) or an error string if that CRL couldn't be fetched.
A valid CRL status means "not revoked", not "trustworthy". Many abused certificates are never revoked, and expired certificates are often removed from CRLs. Check certgraveyard and the full report too.
certgraveyard

The serial number is looked up in the Cert Graveyard, a database of code-signing certificates known to have signed malware. Only code-signing leaf certificates are looked up.

statusstring found the certificate is a known abused certificate.
not_found no record for this serial.
skipped not a code-signing leaf certificate, so no lookup was made.
unavailable the lookup failed; see reason.
result_countintegerOnly when found: number of Cert Graveyard records for this serial.
malware_familiesarray of stringsOnly when found: malware families signed with this certificate. May be empty.
reasonstringOnly when skipped or unavailable: why no result is available.
Errors

Errors return a JSON object with a single error message:

{ "error": "No certificates found in the supplied input." }
StatusMeaning
400No input was sent, or the file couldn't be parsed (for example, a PE file with no Authenticode signature).
413The upload is larger than the 900 MB limit.
422The input was parsed but contained no certificates.
429Rate limit reached. Wait before sending more requests.
500Unexpected server error. Try again; if it keeps happening, the sample may be triggering a parser bug worth reporting.
Limits & privacy
  • Rate limit: 40 requests per hour per IP address.
  • Size limit: 900 MB per request.
  • No authentication: the endpoint is public and needs no API key.
  • What is stored: PKILab keeps the extracted certificate data (not the file itself) so the report_url works, and logs the request's IP address and User-Agent for abuse prevention. Anyone with the report_url can view the report.
  • Outbound requests: checking a certificate makes PKILab fetch its CRLs and query the Cert Graveyard. CRL URLs pointing at private or loopback addresses are not fetched.
Client examples

Using requests:

import sys
import requests

API = "https://pkilab.certgraveyard.org/api/v1/check"

with open(sys.argv[1], "rb") as f:
    resp = requests.post(API, files={"file": f}, timeout=60)

data = resp.json()
if resp.status_code != 200:
    sys.exit(f"Error {resp.status_code}: {data['error']}")

cert = data["certificate"]
print(f"Signer:        {cert['subject_cn']}")
print(f"Issuer:        {cert['issuer_cn']}")
print(f"Serial:        {cert['serial_number']}")
print(f"CRL status:    {data['crl']['status']}")

graveyard = data["certgraveyard"]
if graveyard["status"] == "found":
    families = ", ".join(graveyard["malware_families"]) or "unknown family"
    print(f"Cert Graveyard: KNOWN ABUSED CERTIFICATE ({families})")
else:
    print(f"Cert Graveyard: {graveyard['status']}")

print(f"Full report:   {data['report_url']}")

PowerShell 7+ (-Form is not available in Windows PowerShell 5.1):

$result = Invoke-RestMethod -Method Post `
    -Uri "https://pkilab.certgraveyard.org/api/v1/check" `
    -Form @{ file = Get-Item ".\sample.exe" }

$result.certificate | Format-List
"CRL status:     $($result.crl.status)"
"Cert Graveyard: $($result.certgraveyard.status)"
"Report:         $($result.report_url)"

Standard library only, sending the raw file as the request body. Handy inside tools with an embedded Python interpreter that can't install packages.

import json
import urllib.error
import urllib.request

API = "https://pkilab.certgraveyard.org/api/v1/check"

def pkilab_check(data: bytes) -> dict:
    req = urllib.request.Request(
        API,
        data=data,
        method="POST",
        headers={"Content-Type": "application/octet-stream",
                 "User-Agent": "my-tool/1.0"},
    )
    try:
        with urllib.request.urlopen(req, timeout=60) as resp:
            return json.load(resp)
    except urllib.error.HTTPError as exc:
        return {"error": json.load(exc).get("error", str(exc))}

with open("sample.bin", "rb") as f:
    print(json.dumps(pkilab_check(f.read()), indent=2))