Skip to content

oleid: an issue in check_excel method #584

@ninoseki

Description

@ninoseki

Affected tool:
oleid

Describe the bug & How To Reproduce the bug

A direct check_excel() call causes a TypeError exception.

import oletools.oleid
from olefile import OleFileIO

with open("macro.xls", "rb") as f:
    data = f.read()
    ole_file = OleFileIO(data)

    oid = oletools.oleid.OleID(ole_file)

    oid.check_excel()

This script produces the following exception because of the wrong List append() usage. (https://github.com/decalage2/oletools/blob/master/oletools/oleid.py#L345-L346)

Traceback (most recent call last):
  File "test.py", line 10, in <module>
    oid.check_excel()
  File "/Users/foo/bar/oletools/oletools/oleid.py", line 345, in check_excel
    self.indicators.append('vba_macros', True,
TypeError: append() takes no keyword arguments

File/Malware sample to reproduce the bug

Any excel file with macro can reproduce this bug.

Version information:

  • OS: Mac
  • OS version: v10.15.5 - 64 bits
  • Python version: 3.8 - 64 bits
  • oletools version: 0.55.1 (and 0.56dev6)

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions