2022-11-27 19:19:27 +01:00
title : Binary Padding - MacOS
2020-10-19 16:39:41 +03:00
id : 95361ce5-c891-4b0a-87ca-e24607884a96
2021-11-27 11:33:14 +01:00
status : test
2022-10-25 09:30:05 +02:00
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.
2020-10-19 16:39:41 +03:00
references :
2022-07-11 14:11:53 +01:00
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1027.001/T1027.001.md
2023-02-17 23:16:28 +05:30
- https://linux.die.net/man/1/truncate
- https://linux.die.net/man/1/dd
2022-10-25 09:30:05 +02:00
author : 'Igor Fits, Mikhail Larin, oscd.community'
2024-08-12 12:02:50 +02:00
date : 2020-10-19
modified : 2023-02-17
2022-10-25 09:30:05 +02:00
tags :
2026-04-29 01:20:23 +02:00
- attack.stealth
2022-10-25 09:30:05 +02:00
- attack.t1027.001
2020-10-19 16:39:41 +03:00
logsource :
2022-07-11 14:11:53 +01:00
product : macos
category : process_creation
2020-10-19 16:39:41 +03:00
detection :
2023-02-17 21:36:54 +01:00
selection_truncate :
2022-07-11 14:11:53 +01:00
Image|endswith : '/truncate'
2023-02-17 18:22:26 +05:30
CommandLine|contains : '-s +'
2023-02-17 21:36:54 +01:00
selection_dd :
2022-07-11 14:11:53 +01:00
Image|endswith : '/dd'
2023-10-18 11:53:44 +02:00
CommandLine|contains :
2023-02-17 21:36:54 +01:00
- 'if=/dev/zero' # if input is not /dev/zero, then there is no null padding
- 'if=/dev/random' # high-quality random data
- 'if=/dev/urandom' # low-quality random data
condition : 1 of selection_*
2020-10-19 16:39:41 +03:00
falsepositives :
2022-07-11 14:11:53 +01:00
- Legitimate script work
2020-10-19 16:39:41 +03:00
level : high