cuckoosandbox / community

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

Fix #378 AttributeError in creates_service.py #406

Closed jcppkkk closed 6 years ago

jcppkkk commented 6 years ago

In case that call["arguments"].get("service_name", "") yields None e.g. call = {"arguments": {"service_name": None}}

Traceback (most recent call last):
  File "cuckoo/cuckoo/core/plugins.py", line 417, in call_signature
    if not signature.matched and handler(*args, **kwargs):
  File "cuckoo_data/signatures/windows/creates_service.py", line 26, in on_call
    service_name = call["arguments"].get("service_name", "").lower()
AttributeError: 'NoneType' object has no attribute 'lower'
jbremer commented 6 years ago

Thanks for the PR! Cherry-picked & unit tested.