Blocking attachments by hash

Only from your previous posts I have guessed you ask about mail :) .
So most likely about Proxmox Mail Gateway server.

As far as I know, PMG uses ClamAV, among others. So you can prepare for ClamAV a local signature with a hash of this attachment and ClamAV will recognize the file as "infected".
https://docs.clamav.net/manual/Signatures/HashSignatures.html

Anyway, I think you can ask questions about Proxmox Mail Gateway at its subforum:
https://forum.proxmox.com/forums/mail-gateway-installation-and-configuration.8/