Skip to content

Olevba not expecting optional ProjectCompatVersion record #833

@Beakerboy

Description

@Beakerboy

Affected tool:
olevba

Describe the bug
MS-OVBA defines an optional attribute in the Dir Stream called the ProjectCompatVersion record. If this record is present in the dir stream, I receive the following error:

Type: OLE
WARNING  invalid value for PROJECTLCID_Id expected 0002 
got 004A
WARNING  invalid value for PROJECTLCID_Lcid expected 040
9 got 0003
WARNING  invalid value for PROJECTLCIDINVOKE_Id expected
 0014 got 0002
WARNING  invalid value for PROJECTCODEPAGE_Id expected 0
003 got 0014
WARNING  invalid value for PROJECTCODEPAGE_Size expected
 0002 got 0004
WARNING  invalid value for PROJECTNAME_Id expected 0004 
got 0000
ERROR    PROJECTNAME_SizeOfProjectName value not in rang
e [1-128]: 131075
ERROR    Error in _extract_vba

How To Reproduce the bug
Version 0.0.10 of this file has the optional record, version 0.0.11 does not.

wget https://github.com/Beakerboy/VBA-CI-CD-Test/releases/download/0.0.10/Addin.xlam
mv Addin.xlam Addin.0.0.10.zip
unzip Addin.0.0.10.zip -d Addin.0.0.10
olevba -a Addin.0.0.10/xl/vbaProject.bin

Expected behavior
The file should parse fine with the presence of the optional record.

Version information:

  • OS: Linux
  • OS version: Debian 11
  • Python version: 3.11.2
  • oletools version: 0.60.1

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions