Threat Level: green Handler on Duty: Xavier Mertens

SANS ISC: Obfuscated Excel 4 Macros SANS ISC InfoSec Forums

Participate: Learn more about our honeypot network
https://isc.sans.edu/honeypot.html

Sign Up for Free!   Forgot Password?
Log In or Sign Up for Free!
Obfuscated Excel 4 Macros

2 readers (anonymous and Robert) submitted very similar malicious spreadsheets with almost no detections on VT: c1394e8743f0d8e59a4c7123e6cd5298 and a03ae50077bf6fad3b562241444481c1.

These files contain Excel 4 macros (checking with oledump.py here):

There are a lot of cells in this spreadsheet with a call to the CHAR function:

These CHAR formulas evaluate to ASCII characters, that are then concatenated together and evaluated as formulas:

I can extract the integer argument of each CHAR function like this with my tool re-search.py:

That can then be converted to characters using my tool numbers-to-string.py:

The string above is build-up of all the cells with function CHAR in the spreadsheet. That's why the produced string looks promising, but the characters don't seem to be in the right order.

Selecting characters on the same row doesn't help:

But selecting by column does reveal the formulas:

Analyzing obfuscated Excel 4 macros with a command-line tool like this can be difficult, and it can be easier to view the Excel 4 macro sheet inside a VM (this sheet was very hidden):

Didier Stevens
Senior handler
Microsoft MVP
blog.DidierStevens.com DidierStevensLabs.com

DidierStevens

449 Posts
ISC Handler
Thanks for the post Didier. Was having issues using tools, but thankfully another Slack member managed to figure out how to pull out some of the info and showed. Has anyone looked at the file downloaded? It appears currently to be a calc.dll POC hosted on github. Nothing malicious CURRENTLY, but makes me wonder the purpose of spamming out the xls. Perhaps looking to test it out etc. Any thoughts on it?

dsplice
dsplice

12 Posts
I saw similar samples too, there's a blog post here about it:
https://blog.intel471.com/2020/03/25/analysis-of-an-attempted-attack-against-intel-471/
DFIRguy

1 Posts

Sign Up for Free or Log In to start participating in the conversation!