VirusTotal / yara

The pattern matching swiss knife
https://virustotal.github.io/yara/
BSD 3-Clause "New" or "Revised" License
7.95k stars 1.42k forks source link

Possile MD5 Skill Issue #2024

Open WinterLily opened 6 months ago

WinterLily commented 6 months ago

Describe the bug hash.md5 doesn't seem to be working, attempting to compile a rule (yara-python) throws 'yara.SyntaxError: ~/analyzeFile/yaraRules/sourceRules/./malware/RAT_CrossRAT.yar(19): invalid field name "md5"' To Reproduce Steps to reproduce the behavior:

  1. New Ubuntu 22.04 server,
  2. YARA built from source.
  3. yara-python module installed.
  4. Attempt to compile rule containing hash.md5(0, filesize) == "some_hash" condition.

Expected behavior Would expect the rule to compile.

Please complete the following information:

Additional context This also happens for sha1 and sha256 - I'm aware that OpenSSL has recently deprecated these, but I assume there is/will be some workaround so that hash-based rules continue to work?