Skip to content
Back to skills

T1027.001 Binary Padding

ASecurity

Adversaries may use binary padding to add junk data and change the on-disk representation of malware.

  • 3,518 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 3, 2026
securityrustgobashtestinggitsecurity

Security analysis

A100/100

Scanned September 3, 2026

npx -y skills add CyberStrikeus/CyberStrike --skill T1027.001_binary-padding --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of T1027.001 Binary Padding?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for T1027.001 Binary Padding
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/cyberstrikeus-t1027-001-binary-padding/badge)](https://www.skillsdirectory.com/skills/cyberstrikeus-t1027-001-binary-padding)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: "T1027.001_binary-padding"
description: "Adversaries may use binary padding to add junk data and change the on-disk representation of malware."
category: "configuration"
version: "18.1"
author: "cyberstrike-official"
tags:
  - mitre-attack
  - enterprise
  - t1027.001
  - defense-evasion
  - linux
  - windows
  - macos
  - sub-technique
technique_id: "T1027.001"
tactic: "defense-evasion"
all_tactics:
  - defense-evasion
platforms:
  - Linux
  - Windows
  - macOS
mitre_url: "https://attack.mitre.org/techniques/T1027/001"
tech_stack:
  - linux
  - windows
  - macos
cwe_ids:
  - CWE-693
chains_with:
  - T1027
  - T1027.002
  - T1027.003
  - T1027.004
  - T1027.005
  - T1027.006
  - T1027.007
  - T1027.008
  - T1027.009
  - T1027.010
  - T1027.011
  - T1027.012
  - T1027.013
  - T1027.014
  - T1027.015
  - T1027.016
  - T1027.017
prerequisites:
  - T1027
severity_boost:
  T1027: "Chain with T1027 for deeper attack path"
  T1027.002: "Chain with T1027.002 for deeper attack path"
  T1027.003: "Chain with T1027.003 for deeper attack path"
---

# T1027.001 Binary Padding

> **Sub-technique of:** T1027

## High-Level Description

Adversaries may use binary padding to add junk data and change the on-disk representation of malware. This can be done without affecting the functionality or behavior of a binary, but can increase the size of the binary beyond what some security tools are capable of handling due to file size limitations.

Binary padding effectively changes the checksum of the file and can also be used to avoid hash-based blocklists and static anti-virus signatures. The padding used is commonly generated by a function to create junk data and then appended to the end or applied to sections of malware. Increasing the file size may decrease the effectiveness of certain tools and detection capabilities that are not designed or configured to scan large files. This may also reduce the likelihood of being collected for analysis. Public file scanning services, such as VirusTotal, limits the maximum size of an uploaded file to be analyzed.

## Kill Chain Phase

- Defense Evasion (TA0005)

**Platforms:** Linux, Windows, macOS

## What to Check

- [ ] Identify if Binary Padding technique is applicable to target environment
- [ ] Check Linux systems for indicators of Binary Padding
- [ ] Check Windows systems for indicators of Binary Padding
- [ ] Check macOS systems for indicators of Binary Padding
- [ ] Assess detection coverage (1 detection strategies)

## How to Test

### Atomic Red Team Tests

The following tests are from [Atomic Red Team](https://github.com/redcanaryco/atomic-red-team) and provide actionable ways to test this technique:

### Atomic Test 1: Pad Binary to Change Hash - Linux/macOS dd

Uses dd to add a zero byte, high-quality random data, and low-quality random data to the binary to change the hash.

Upon successful execution, dd will modify `/tmp/evil-binary`, therefore the expected hash will change.

**Supported Platforms:** linux, macos

```bash
dd if=/dev/zero bs=1 count=1 >> #{file_to_pad} #adds null bytes
dd if=/dev/random bs=1 count=1 >> #{file_to_pad} #adds high-quality random data
dd if=/dev/urandom bs=1 count=1 >> #{file_to_pad} #adds low-quality random data
```

**Dependencies:**

- The binary must exist on disk at specified location (#{file_to_pad})

### Atomic Test 2: Pad Binary to Change Hash using truncate command - Linux/macOS

Uses truncate to add a byte to the binary to change the hash.

Upon successful execution, truncate will modify `/tmp/evil-binary`, therefore the expected hash will change.

**Supported Platforms:** linux, macos

```bash
truncate -s +1 #{file_to_pad} #adds a byte to the file size
```

**Dependencies:**

- The binary must exist on disk at specified location (#{file_to_pad})

### Manual Testing

If Atomic Red Team tests are not applicable, manually verify the technique by:

1. **Identify Attack Surface**: Determine if the target environment is susceptible to Binary Padding by examining the target platforms (Linux, Windows, macOS).

2. **Assess Existing Defenses**: Review whether mitigations for T1027.001 are in place. If defenses are absent or misconfigured, this technique may be exploitable.

3. **Execute Test**: Use tools and methods described in the MITRE ATT&CK page and external references below.

## Remediation Guide

No specific mitigations documented for this technique.

## Detection

### Detection Strategy for Obfuscated Files or Information: Binary Padding

## Risk Assessment

| Finding                             | Severity | Impact          |
| ----------------------------------- | -------- | --------------- |
| Binary Padding technique applicable | Low      | Defense Evasion |

## CWE Categories

| CWE ID  | Title                        |
| ------- | ---------------------------- |
| CWE-693 | Protection Mechanism Failure |

## References

- [ESET OceanLotus](https://www.welivesecurity.com/2018/03/13/oceanlotus-ships-new-backdoor/)
- [Securelist Malware Tricks April 2017](https://securelist.com/old-malware-tricks-to-bypass-detection-in-the-age-of-big-data/78010/)
- [VirusTotal FAQ](https://www.virustotal.com/en/faq/)
- [Atomic Red Team - T1027.001](https://github.com/redcanaryco/atomic-red-team/tree/master/atomics/T1027.001)
- [MITRE ATT&CK - T1027.001](https://attack.mitre.org/techniques/T1027/001)

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in security →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.