Attackers abuse diskutil to interact with disks, volumes, and mounted storage on macOS systems. They may use it to inspect files, modify mounts, or assist with staging and persistence on a compromised host. Defenders should review unexpected administrative use, changes to mounted volumes, and disk-related activity from non-standard user sessions.
How attackers use diskutil to work with disks and mounted volumes
On macOS, diskutil is a legitimate administrative utility for inspecting disks, volumes, partitions, and mount state. Attackers abuse that normal capability to learn how storage is laid out, confirm which volumes are mounted, and identify places where they can stage tools or data without needing a custom binary.
That makes diskutil useful in post-compromise tradecraft because it blends into routine system administration. A command that enumerates disks or changes volume state can look ordinary unless defenders compare it with the user, session, and host context in which it ran.
Where this matters most is not the command itself, but the sequence around it. Attackers often pair storage inspection with file discovery, mount manipulation, or follow-on actions on external, removable, or network-backed volumes, which can help them move data, hide artifacts, or prepare persistence on a compromised endpoint.
What the abuse looks like in practice
Abuse usually starts with discovery. An attacker may query available disks, check volume identifiers, review mount points, or look for removable media and encrypted containers. That gives them a quick map of the host and helps them decide where to write files, what to tamper with, and whether a volume change is likely to attract attention.
It can also support staging. If an attacker can create, mount, rename, or remount storage in a way that is operationally valid but unusual for the user, they may place tools or payloads where casual inspection is less likely to notice them. On managed hosts, that can be combined with other dual-use utilities to keep activity looking like routine administration rather than intrusion activity. NHIMG’s Living off the Land Guide is useful background here because the same defender logic applies to many legitimate binaries that can be repurposed during an intrusion.
diskutil can also help an intruder manipulate storage state during persistence or cleanup. Changing what is mounted, when it is mounted, or how a volume is presented can affect visibility, script execution paths, and where evidence lands on disk. Even when the command is not the persistence mechanism itself, it can still support the access path an attacker is building.
What defenders should look for around diskutil abuse
The most useful signal is not “diskutil ran” on its own, but “diskutil ran in a context that does not fit the user, device role, or time of day.” Administrative storage work from a standard user session, especially if it is followed by unusual file creation or mount changes, deserves attention.
Review whether the command was launched from interactive shells, scripts, remote administration sessions, or post-exploitation tooling. Also compare the command line against expected help-desk, imaging, backup, or endpoint-management activity. If the host has no clear administrative task in progress, the same command can shift from benign to suspicious very quickly.
Changes to mounted volumes are especially important when they affect removable storage, external drives, disk images, or volumes that were not previously present. Watch for short-lived mounts, unexpected remounts, and storage actions that align with later process execution or data access. MITRE ATT&CK’s MITRE ATT&CK Enterprise Matrix is a strong companion reference for mapping that kind of post-compromise behavior to broader adversary technique patterns.
Risk and Threat Considerations
diskutil abuse is risky because it turns a normal macOS administration tool into a stealthy way to discover storage, prepare staging areas, and manipulate where data or tools reside. That can reduce the visibility of malicious activity and make it easier for an intruder to work inside trusted system boundaries.
Failure mechanism: The attacker relies on legitimate storage-management behavior to blend in, then uses mount-state changes, volume discovery, or disk-image handling to support staging, persistence, or concealment without introducing an obviously malicious executable.
Impact: Defenders may miss early signs of compromise, lose track of where tools or exfiltrated data were placed, or fail to notice that storage changes were part of a larger intrusion chain. If mounted volumes are abused, the attacker may also gain a cleaner path for moving data or preserving access across reboots and sessions.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
MITRE ATT&CK addresses the attack and risk surface, while NIST SP 800-53 Rev 5 sets the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| MITRE ATT&CK | T1218 — System Binary Proxy Execution | diskutil abuse is a dual-use utility pattern on macOS |
| T1083 — File and Directory Discovery | attackers use diskutil to enumerate mounted storage and volume layout | |
| T1036 — Masquerading | legitimate storage tools can blend in with admin workflows during intrusion | |
| Recommendation — Map diskutil activity to ATT&CK LOLBin-style abuse and hunt for post-compromise execution patterns. Correlate diskutil enumeration with discovery activity and follow-on staging behavior. Validate whether the command line and session context match approved administrative use. | ||
| NIST SP 800-53 Rev 5 | AU-6 — Audit Record Review, Analysis, and Reporting | storage-manipulation abuse is best detected through review of command and session logs |
| CM-7 — Least Functionality | restricting unnecessary storage administration reduces abuse opportunities | |
| Recommendation — Review diskutil events for anomalous user, host, time, and command-line context. Limit who can run storage-management commands and where elevated access is available. | ||
Practitioner Guidance
What to verify: Confirm whether the disk-related action matches a known administrative task, approved script, or managed endpoint workflow. If it does not, treat the session as suspicious until you can tie the command to a legitimate operator and ticket.
Decision rule: If diskutil activity is paired with unexpected mount changes, unusual volume creation, or file access from a non-standard user context, prioritize compromise assessment over simple command-line review. The storage action may be the enabling step, not the end goal.
What practitioners underestimate: Legitimate utilities often matter because they sit at the boundary between discovery and persistence. diskutil rarely looks alarming by itself, but on an already-compromised macOS host it can be part of a low-noise sequence that changes where evidence lives and how long access lasts.
Practitioner takeaway: Focus on the surrounding context, user, and mount-state changes, not just the command name, because that is what separates routine storage administration from attacker tradecraft.
Related resources from NHI Mgmt Group
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on October 20, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org