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

failure to parse formula in xlsb file #60

Open
enzok opened this issue Oct 19, 2020 · 4 comments
Open

failure to parse formula in xlsb file #60

enzok opened this issue Oct 19, 2020 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@enzok
Copy link

enzok commented Oct 19, 2020

This xlsb sample, ebbf15cc0bedec40e58146d369150ee3 (on VirusTotal), fails with the following error:

File "/usr/local/lib/python3.6/dist-packages/XLMMacroDeobfuscator/deobfuscator.py", line 1954, in process_file
excel_doc = XLSBWrapper(file_path)
File "/usr/local/lib/python3.6/dist-packages/XLMMacroDeobfuscator/xlsb_wrapper.py", line 11, in init
self._xlsb_workbook = open_workbook(xlsb_doc_path)
File "/usr/local/lib/python3.6/dist-packages/pyxlsb2/init.py", line 27, in open_workbook
return Workbook(XlsbPackage(name), *args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/pyxlsb2/workbook.py", line 29, in init
self._parse()
File "/usr/local/lib/python3.6/dist-packages/pyxlsb2/workbook.py", line 67, in _parse
rec.formula = Formula.parse(rec.formula_raw).stringify(self)
File "/usr/local/lib/python3.6/dist-packages/pyxlsb2/formula.py", line 16, in stringify
return tokens.pop().stringify(tokens, workbook)
IndexError: pop from empty list

@enzok
Copy link
Author

enzok commented Oct 19, 2020

rec = Name(name='dontdoit', formula_raw=b'\x1f\x00\x00\x80\xff\xff,\xc4\xc1', formula=None)

@DissectMalware
Copy link
Owner

This xlsb sample, ebbf15cc0bedec40e58146d369150ee3 (on VirusTotal), fails with the following error:

File "/usr/local/lib/python3.6/dist-packages/XLMMacroDeobfuscator/deobfuscator.py", line 1954, in process_file
excel_doc = XLSBWrapper(file_path)
File "/usr/local/lib/python3.6/dist-packages/XLMMacroDeobfuscator/xlsb_wrapper.py", line 11, in init
self._xlsb_workbook = open_workbook(xlsb_doc_path)
File "/usr/local/lib/python3.6/dist-packages/pyxlsb2/init.py", line 27, in open_workbook
return Workbook(XlsbPackage(name), *args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/pyxlsb2/workbook.py", line 29, in init
self._parse()
File "/usr/local/lib/python3.6/dist-packages/pyxlsb2/workbook.py", line 67, in _parse
rec.formula = Formula.parse(rec.formula_raw).stringify(self)
File "/usr/local/lib/python3.6/dist-packages/pyxlsb2/formula.py", line 16, in stringify
return tokens.pop().stringify(tokens, workbook)
IndexError: pop from empty list

Seems your pyxlsb2 is not the latest version. Can you update your pyxlsb2? Still you will get some errors...

I am working on pyxlsb2 to fix the issues.

@DissectMalware DissectMalware self-assigned this Oct 19, 2020
@DissectMalware DissectMalware added the bug Something isn't working label Oct 19, 2020
@enzok
Copy link
Author

enzok commented Oct 19, 2020

I tried updating pyxlsb2, but it says already up to date.

@enzok
Copy link
Author

enzok commented Oct 19, 2020

ok updated using github master zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants