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

Error: unpack_from requires a buffer of at least 2 bytes. #6

Closed
clr2of8 opened this issue Apr 17, 2019 · 3 comments
Closed

Error: unpack_from requires a buffer of at least 2 bytes. #6

clr2of8 opened this issue Apr 17, 2019 · 3 comments
Assignees
Labels

Comments

@clr2of8
Copy link

clr2of8 commented Apr 17, 2019

Running pcodedump on VirusTotal sample db52f43dde8a8fff678640539011bff2882ab11d94537d84c6855c5ff1897f71
gives the following error. I can email you the sample if you don't have access to it.

Error: unpack_from requires a buffer of at least 2 bytes.
VarDefn VBA/Sheet2 - 1158 bytes

@bontchev
Copy link
Owner

I don't have download access to VirusTotal. Please either e-mail it to the e-mail address specified in my profile, or upload it to Hybrid-Analysis.

@malwageddon
Copy link

Not sure this is specific to my case, but i managed to fix this error by changing the following in 'disasmObject' function.

This:

flags = getWord(objectTable, offs, endian)
hlName = getWord(objectTable, offs + 6, endian)

to this:

flags = getWord(indirectTable, offs, endian)
hlName = getWord(indirectTable, offs + 6, endian)

@bontchev
Copy link
Owner

OK, I have reviewed the sample that you sent me. Do not make the changes that you suggested. I haven't made the stupid mistake of addressing the wrong table. Instead, somebody has been actively using a design flaw of pcodedmp and has patched this document so that pcodedmp does not see the modules.

I'll send you a detailed description by e-mail. For now, I am closing the issue. The design flaw will have to be addressed, eventually, in order to handle such attacks, but it involves parsing a very complex and undocumented stream format and I really don't have the time for such an adventure right now.

@bontchev bontchev self-assigned this Jul 9, 2019
@bontchev bontchev added the bug label Jul 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants