2020-10-19 13:39:41 +00:00
title : 'Binary Padding'
id : 95361ce5-c891-4b0a-87ca-e24607884a96
status : experimental
description : 'Adversaries may use binary padding to add junk data and change the on-disk representation of malware. This rule detect using dd and truncate to add a junk data to file.'
# For this rule to work you must enable audit of process execution in OpenBSM, see
# https://osquery.readthedocs.io/en/stable/deployment/process-auditing/#macos-process-socket-auditing
author : 'Igor Fits, Mikhail Larin, oscd.community'
date : 2020 /10/19
references :
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1027.001/T1027.001.md
logsource :
product : macos
category : process_creation
detection :
selection1 :
2021-02-24 22:57:26 +00:00
Image|endswith :
2020-10-21 15:25:22 +00:00
- '/truncate'
CommandLine|contains :
2020-10-19 13:39:41 +00:00
- '-s'
selection2 :
2021-02-24 22:57:26 +00:00
Image|endswith :
2020-10-21 15:25:22 +00:00
- '/dd'
CommandLine|contains :
2020-10-19 13:39:41 +00:00
- 'if='
filter :
2020-10-21 15:25:22 +00:00
CommandLine|contains : 'of='
2020-10-19 15:19:38 +00:00
condition : selection1 or (selection2 and not filter)
2020-10-19 13:39:41 +00:00
falsepositives :
- 'Legitimate script work'
level : high
tags :
- attack.defense_evasion
- attack.t1027.001