Detection rules › Elastic
Execution of a Binary Dropped via Microsoft BSDTAR Archive Tool
Identifies the execution of a PE File that was written by the Windows native TAR utility. Adversaries may compress malicious content to bypass existing ingress tool transfer restrictions.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Stealth | |
| Command & Control |
Rule body
[rule]
description = """
Identifies the execution of a PE File that was written by the Windows native TAR utility. Adversaries may compress
malicious content to bypass existing ingress tool transfer restrictions.
"""
id = "5b856290-d3f5-4b2f-9f49-e753ce4ade28"
license = "Elastic License v2"
name = "Execution of a Binary Dropped via Microsoft BSDTAR Archive Tool"
os_list = ["windows"]
version = "1.0.25"
query = '''
sequence with maxspan=5m
[file where process.executable : "?:\\Windows\\Sys*\\tar.exe" and file.Ext.header_bytes : "4d5a*"] by file.path
[process where event.action == "start" and not process.code_signature.trusted == true and
process.executable : "C:\\*" and
not process.hash.sha256 :
("762abab44d25a0e6441600f6ad3a08e8f07016774608d80edc71b5b90b1ac5d8",
"70d994f269c652a3a5fb639251f8247a6d914bfde068eb807f6023909de89530",
"68b41beae36e4aa7ba4237b6067ed36dc0c6e0d9d5453fd8d61af335d0efd37f",
"70d994f269c652a3a5fb639251f8247a6d914bfde068eb807f6023909de89530",
"e8368338fe5d2f0cc7529df9f3684ea6d79a627d2cc33b1685b8f7adcfa952ae",
"82909875e911bb7b5c31a3338449368f62e1ff7cbc09829ed72e31789b1a0712",
"40d20e6dfb0654419b289c71f3d048202550d462df1c41675b0c5f18b6bada14") and
not process.executable : ("?:\\Program Files\\*", "?:\\Program Files (x86)\\*")] by process.executable
'''
min_endpoint_version = "7.15.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 1
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1218"
name = "System Binary Proxy Execution"
reference = "https://attack.mitre.org/techniques/T1218/"
[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1105"
name = "Ingress Tool Transfer"
reference = "https://attack.mitre.org/techniques/T1105/"
[threat.tactic]
id = "TA0011"
name = "Command and Control"
reference = "https://attack.mitre.org/tactics/TA0011/"
[internal]
min_endpoint_version = "7.15.0"
Stages and Predicates
Ordered sequence: each step below must occur in order within 5m, correlated by file.path, process.executable.
Stage 1: file
[file where process.executable : "?:\\Windows\\Sys*\\tar.exe" and file.Ext.header_bytes : "4d5a*"] by file.path
Stage 2: process
[process where event.action == "start" and not process.code_signature.trusted == true and
process.executable : "C:\\*" and
not process.hash.sha256 :
("762abab44d25a0e6441600f6ad3a08e8f07016774608d80edc71b5b90b1ac5d8",
"70d994f269c652a3a5fb639251f8247a6d914bfde068eb807f6023909de89530",
"68b41beae36e4aa7ba4237b6067ed36dc0c6e0d9d5453fd8d61af335d0efd37f",
"70d994f269c652a3a5fb639251f8247a6d914bfde068eb807f6023909de89530",
"e8368338fe5d2f0cc7529df9f3684ea6d79a627d2cc33b1685b8f7adcfa952ae",
"82909875e911bb7b5c31a3338449368f62e1ff7cbc09829ed72e31789b1a0712",
"40d20e6dfb0654419b289c71f3d048202550d462df1c41675b0c5f18b6bada14") and
not process.executable : ("?:\\Program Files\\*", "?:\\Program Files (x86)\\*")] by process.executable
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.code_signature.trusted | eq | true | excludes:process.code_signature.trusted field:"process.code_signature.trusted" value:"true" |
process.executable | starts_with | ?:\Program Files\, ?:\Program Files (x86)\ | excludes:process.executable field:"process.executable" value:"?:\Program Files\" field:"process.executable" value:"?:\Program Files (x86)\" |
process.hash.sha256 | eq | 762abab44d25a0e6441600f6ad3a08e8f07016774608d80edc71b5b90b1ac5d8, 70d994f269c652a3a5fb639251f8247a6d914bfde068eb807f6023909de89530, 68b41beae36e4aa7ba4237b6067ed36dc0c6e0d9d5453fd8d61af335d0efd37f, 70d994f269c652a3a5fb639251f8247a6d914bfde068eb807f6023909de89530, e8368338fe5d2f0cc7529df9f3684ea6d79a627d2cc33b1685b8f7adcfa952ae, 82909875e911bb7b5c31a3338449368f62e1ff7cbc09829ed72e31789b1a0712, 40d20e6dfb0654419b289c71f3d048202550d462df1c41675b0c5f18b6bada14 | excludes:process.hash.sha256 |
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | eq |
| field:"EventType" kind:eq value:"start" |
file.Ext.header_bytes | wildcard |
| field:"file.Ext.header_bytes" kind:wildcard value:"4d5a*" |
process.executable | wildcard |
| field:"Image" kind:wildcard |