{"id":"95361ce5-c891-4b0a-87ca-e24607884a96","title":"Binary Padding - MacOS","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.","author":"Igor Fits, Mikhail Larin, oscd.community","status":"test","level":"high","date":"2020-10-19","modified":"2023-02-17","tags":["attack.stealth","attack.t1027.001"],"technique_ids":["T1027.001"],"logsource":{"product":"macos","category":"process_creation"},"falsepositives":["Legitimate script work"],"references":["https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1027.001/T1027.001.md","https://linux.die.net/man/1/truncate","https://linux.die.net/man/1/dd"],"source_path":"rules/macos/process_creation/proc_creation_macos_binary_padding.yml","source_sha256":"2a59bb73937b43c124f64d64fe332ea5148a4f90af066bb46a50b01c31a75c2f","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/macos/process_creation/proc_creation_macos_binary_padding.yml","license":"Detection Rule License 1.1","license_url":"https://github.com/SigmaHQ/Detection-Rule-License/blob/main/LICENSE.Detection.Rules.md","yaml":"title: Binary Padding - MacOS\nid: 95361ce5-c891-4b0a-87ca-e24607884a96\nstatus: test\ndescription: 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.\nreferences:\n    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1027.001/T1027.001.md\n    - https://linux.die.net/man/1/truncate\n    - https://linux.die.net/man/1/dd\nauthor: 'Igor Fits, Mikhail Larin, oscd.community'\ndate: 2020-10-19\nmodified: 2023-02-17\ntags:\n    - attack.stealth\n    - attack.t1027.001\nlogsource:\n    product: macos\n    category: process_creation\ndetection:\n    selection_truncate:\n        Image|endswith: '/truncate'\n        CommandLine|contains: '-s +'\n    selection_dd:\n        Image|endswith: '/dd'\n        CommandLine|contains:\n            - 'if=/dev/zero' # if input is not /dev/zero, then there is no null padding\n            - 'if=/dev/random' # high-quality random data\n            - 'if=/dev/urandom' # low-quality random data\n    condition: 1 of selection_*\nfalsepositives:\n    - Legitimate script work\nlevel: high\n","validation":"yaml_parsed_not_backend_compiled_or_live_validated","techniques":[{"key":"enterprise/T1027.001","id":"T1027.001","name":"Binary Padding","page":"techniques/enterprise/T1027.001/"}],"data_path":"data/detection-rules/95361ce5-c891-4b0a-87ca-e24607884a96.json","kind":"sigma"}
