Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

olevba: add projectcompatversion record #723

Merged
merged 3 commits into from
Jan 29, 2024

Conversation

kijeong
Copy link
Contributor

@kijeong kijeong commented Nov 9, 2021

Hello @decalage2,

Recently, while analyzing the PowerPoint document containing VBAs, I found that some errors were outputted in the olevba output result.

The error was better revealed by activating the oletools debug option(--loglevel debug).

It was, I think, due to the newly added PROJECTCOMPATVERSION Record on dir Stream.
So I added the PROJECTCOMPATVERSION processing code to olevba.py.

If this is okay, I hope it merges.

Tested PowerPoint Application version:
Microsoft® PowerPoint® Microsoft 365 MSO(version 2110 build 16.0.14527.20234) 64bit

Refs:
2.3.4.2.1.2 PROJECTCOMPATVERSION Record, https://docs.microsoft.com/en-us/openspecs/office_file_formats/ms-ovba/ed5d7ede-5d7d-4645-bba3-ddfd9bdc76ed, Perhaps this was issued in 2021-08-17.

Thank you for your work.😀

Best,
Kijeong

@kijeong kijeong changed the title Add/projectcompatversion record olevba: add projectcompatversion record Nov 9, 2021
@decalage2 decalage2 self-requested a review November 9, 2021 18:37
@decalage2 decalage2 self-assigned this Nov 9, 2021
@decalage2 decalage2 added this to the oletools 0.60 milestone Nov 9, 2021
@christian-intra2net
Copy link
Contributor

christian-intra2net commented Sep 15, 2023

I have just encountered a sample with the same problem and searching for clues found this PR. Reviewed the code here and tested it and everything checks out. Also includes a test sample and adjustments to the other tests, so I'm all in favour of merging this. Just needs a very simple rebase because of another unittest that has been added to master branch in the meantime.

Thanks at @kijeong , excellent work 👍

@decalage2
Copy link
Owner

Just checked different versions of MS-OVBA, and indeed PROJECTCOMPATVERSION was added in v11 published on the 17/08/2021.

Copy link
Owner

@decalage2 decalage2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for this fix!

@decalage2 decalage2 merged commit 5c03a4a into decalage2:master Jan 29, 2024
@gjvdkamp
Copy link

gjvdkamp commented Jan 30, 2024

I had the bug, tried this branch and it worked for me.
#808

@christian-intra2net
Copy link
Contributor

For some reason one change introduced here make one unittest fail. On my machine and on github's automated unittests the sample "olevba/sample_with_vba.ppt" olevba detects vba in this sample. However, the author of this PR seems to not have found VBA in this sample. Is it possible that system encoding plays a role here? Could you maybe re-check, @kijeong by running python3 -m unittest tests.oleid.test_basic.TestOleIDBasic.test_macros ?

@kijeong kijeong deleted the add/projectcompatversion_record branch June 24, 2024 00:21
@kijeong
Copy link
Contributor Author

kijeong commented Jun 24, 2024

For some reason one change introduced here make one unittest fail. On my machine and on github's automated unittests the sample "olevba/sample_with_vba.ppt" olevba detects vba in this sample. However, the author of this PR seems to not have found VBA in this sample. Is it possible that system encoding plays a role here? Could you maybe re-check, @kijeong by running python3 -m unittest tests.oleid.test_basic.TestOleIDBasic.test_macros ?

Just checked. I'm sorry.
I'll check again. I think the test case is a little different than when I made the merge request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants