Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 a7ab1348a3c8549b…

MALICIOUS

Office (OOXML)

17.2 KB Created: 2021-02-26 10:57:37 UTC Authoring application: Microsoft Excel 16.0300 First seen: 2022-06-20
MD5: 905d87a06c8534dd8033f4bbc72ac47c SHA-1: 0bbc069cdb30175c01d1c8f00567e2ff546b9856 SHA-256: a7ab1348a3c8549b5b33eaf759b2bdba0e7a62001a1457d3e4b90258992603f7
208 Risk Score

Heuristics 6

  • VBA project inside OOXML medium 5 related findings OOXML_VBA
    Document contains a VBA project — VBA macros present
  • Potential Shell call in VBA critical OLE_VBA_SHELL
    Potential Shell call in VBA
    Matched line in script
    cmdResult = Shell("cmd.exe /k " & strPath, vbNormalFocus)
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
    Set fso = CreateObject("Scripting.FileSystemObject")
  • cmd.exe reference in VBA high OLE_VBA_CMD
    cmd.exe reference in VBA
    Matched line in script
    cmdResult = Shell("cmd.exe /k " & strPath, vbNormalFocus)
  • VBA p-code auto-exec with execution tokens high OLE_VBA_PCODE_AUTOEXEC_EXEC
    Triggers on the COMBINATION of two tokens co-occurring in the same compiled VBA/cache stream: an auto-execution entry point (Auto_Open / AutoOpen / Document_Open / Workbook_Open / Auto_Close / AutoClose) AND a shell/download/object-execution token (Shell, CreateObject, GetObject, PowerShell, cmd.exe, URLDownloadToFile, WinHttp, XMLHTTP, ADODB.Stream, ShellExecute, ExecuteExcel4Macro). Neither token alone fires it — it is the pairing that flags p-code-only or source-extraction-failure macro documents where the visible VBA source is unavailable. The matched tokens are named in the detail line below.
  • Auto_Open macro low OLE_VBA_AUTO
    Auto_Open macro
    Matched line in script
    Sub Auto_Open()

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) 1614 bytes
SHA-256: a19e8c69198b0e12e7ae0f61dab8c36362f88d5cae8d5c231437ef28b3fe5c08
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 Auto_Open()

' This is the virus (test!!!)
Dim EicarVirusString As String
EicarVirusString = "X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*"

' Create some filesystem objects
Dim fso As Object
Set fso = CreateObject("Scripting.FileSystemObject")

' Get TEMP folder location
TempFolder = fso.GetSpecialFolder(2)

' Create the file
strPath = TempFolder & "\eicar.com"
Dim oFile As Object
Set oFile = fso.CreateTextFile(strPath)

' Write the payload
oFile.Write EicarVirusString

' Close and cleanup
oFile.Close
Set fso = Nothing
Set oFile = Nothing

' Show warning
result = MsgBox("Hello, I have just created a test virus in your temp directory (" & strPath & "), and am about to run it. Just click OK and enjoy. You shoud either see a text message stating that EICAR has run, or (and that is intended) it should be deleted by your virus scanner.", vbCritical, "Test Virus Saved")
cmdResult = Shell("cmd.exe /k " & strPath, vbNormalFocus)


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 11776 bytes
SHA-256: c79a127339fa3096f4535b0232354efeb201b4f92f2126000b84fd7b3542f3a2