cuckoosandbox / community

Repository of modules and signatures contributed by the community
323 stars 175 forks source link

Update antivirus_irma.py #440

Open r00t0vi4 opened 5 years ago

r00t0vi4 commented 5 years ago

Some IRMA probes in 'report.json' may contain filed "status" with value equal to "-1". Json chunk containing "status":-1 does not contain "resuts" field (other chunks with different status value contains "result" field) This leads to the following error:

Failed to run 'on_complete' of the antivirus_irma signature
Traceback (most recent call last):
  File "/opt/cuckoo/venv/local/lib/python2.7/site-packages/cuckoo/core/plugins.py", line 414, in call_signature
    if not signature.matched and handler(*args, **kwargs):
  File "/opt/cuckoo/data/signatures/windows/antivirus_irma.py", line 33, in on_complete
    verdict = result["results"]
KeyError: 'results'

Some kind of check or exception handling is required here