Skip to content

Check file with revoked cert and countersign raise COUNTERSIGNER_ERROR #55

@Gixal9

Description

@Gixal9

I try to check file which cert was revoked. If I check it without allow_fetching, then signify says that sign is OK
But if i use that flag, I'm getting error AuthenticodeVerificationResult.COUNTERSIGNER_ERROR An error occurred while validating the countersignature: allow_fetching must be False when moment is specified, when I except smth like "Certificate was revoked by signer"

My code

from polysignify.authenticode import AuthenticodeFile

with open("/home/skyman/projects/crypto/signify/e1dcbfcbf8f2fb7bb938fdcc9e2fef1d316bc794", "rb") as f:
    file = AuthenticodeFile.detect(f)
    res, err = file.explain_verify(
        verification_context_kwargs={"allow_fetching": True, "revocation_mode": "hard-fail"}
        )
    print(res, err)

How do I suppose to check file likes this? I'm sure that ceri is revoked, it can be checked by ocsp

Becouse file is malicious, I attach link to virustotal, u can download it by their API. I'm not sure then Gitgub provide an opportunity to attach malicious files
https://www.virustotal.com/gui/file/833bee7594823e69abe05034c1efa58a15f0bb9f54cf9e42b25954108bce97a4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions