Local Storage Discovery (T1680) is a Discovery technique in which adversaries list local drives, disks and volumes, along with attributes such as total and free space and volume serial number. MITRE lists ESXi, IaaS, Linux, macOS and Windows as platforms.
How attackers use it
MITRE gives three purposes: preparing for ransomware-related encryption, supporting Lateral Movement, and acting as a precursor to Direct Volume Access (T1006).
The commands depend on the platform:
- ESXi. Hypervisor CLI (T1059.012) commands such as
esxclito list storage attached to the host, and to find.vmdkfiles. - Windows.
wmic logicaldisk getto find information about local and network drives, PowerShellGet-PSDrive, and Windows API functions such asGetDriveType. - Linux.
parted,lsblk,fdisk,lshwanddflist partitions, with size, type, file system and free space. - macOS.
diskutilto list disks, andsystem_profiler SPStorageDataTypefor details such as mount path, file system and drive type. - IaaS. Provider commands such as
describe volumein AWS,gcloud compute disks listin GCP andaz disk listin Azure.
The technique page lists a long set of malware and ransomware that enumerate volumes, read disk size or free space, or collect the volume ID.
How to detect it
The hard part is that every one of these commands is also legitimate. System inventory tools, backup software and admins use them daily. MITRE's detection strategy focuses on context:
- Windows. Drive enumeration with
Get-PSDrive,wmic logicaldiskor Win32 API calls by non-admin users, or outside baseline inventory scripts. - Linux. Unusual use of
lsblk,fdisk -l,lshw -class diskorpartedby non-admin users or in non-interactive shells. - macOS.
diskutil listorsystem_profiler SPStorageDataTyperun outside user login or unrelated to system inventory tools. - ESXi.
esxcli storageorvim-cmd vmsvc/getallvmsfrom unusual sessions, or from interactive shells unrelated to maintenance.
Build a baseline first. If a certain service account runs df every five minutes, that is background. If a web server account suddenly lists disks, that is a lead.
On its own, storage discovery is a low-severity signal. It becomes a strong one when it appears with other discovery commands, a new account, or the staging of data.
How to reduce the risk
MITRE lists no formal mitigation for this technique since it abuses legitimate features. The useful controls reduce what an adversary can do next:
- Limit shell access and interactive logins on servers and hypervisors.
- Use least privilege so that service accounts cannot reach every volume.
- Keep backups on storage that the compromised host cannot modify.
- Alert on discovery commands run by accounts that do not normally administer systems.
Check your own environment
These read-only commands show what an adversary would see, so you know what a baseline looks like.
Linux:
lsblk
df -h
macOS:
diskutil list
Windows PowerShell:
Get-PSDrive -PSProvider FileSystem
Then check:
- Which accounts and scripts routinely run these commands?
- Is command line logging enabled on your servers, so you could see who ran one?
- Are backup volumes writable from the hosts they protect?
Quick check
Why is this technique hard to alert on?
The same commands are used by admins, backup tools and inventory software. Detection depends on who runs them, from where, and alongside what else.
What might discovery of local storage lead to?
According to MITRE, ransomware-related encryption, lateral movement or Direct Volume Access.
Sources
- MITRE ATT&CK, Local Storage Discovery (T1680): https://attack.mitre.org/techniques/T1680