Adversaries may enumerate files and directories or search in specific device locations for desired information within a filesystem. Adversaries may use the information from File and Directory Discovery during automated discovery to shape follow-on behaviors, including deciding if the adversary should fully infect the target and/or attempt specific actions.
On Android, Linux file permissions and SELinux policies typically stringently restrict what can be accessed by apps without taking advantage of a privilege escalation exploit. The contents of the external storage directory are generally visible, which could present concerns if sensitive data is inappropriately stored there. iOS's security architecture generally restricts the ability to perform any type of File and Directory Discovery without use of escalated privileges.
| ID | Name | Description |
|---|---|---|
| S1095 | AhRat | |
| C0033 | C0033 |
During C0033, PROMETHIUM used StrongPity to collect file lists on the victim device.[2] |
| S0529 | CarbonSteal |
CarbonSteal has searched device storage for various files, including .amr files (audio recordings) and superuser binaries.[3] |
| S1225 | CherryBlos |
CherryBlos has accessed media files stored in external storage and has used optical character recognition (OCR) to recognize potential mnemonic phrases in pictures.[4] |
| S0505 | Desert Scorpion |
Desert Scorpion can list files stored on external storage.[5] |
| S9005 | DocSwap |
DocSwap has checked for the |
| S0550 | DoubleAgent |
DoubleAgent has searched for specific existing data directories, including the Gmail app, Dropbox app, Pictures, and thumbnails.[3] |
| S1092 | Escobar | |
| S0577 | FrozenCell |
FrozenCell has searched for pdf, doc, docx, ppt, pptx, xls, and xlsx file types for exfiltration.[9] |
| S0535 | Golden Cup |
Golden Cup can collect a directory listing of external storage.[10] |
| S0551 | GoldenEagle |
GoldenEagle has looked for .doc, .txt, .gif, .apk, .jpg, .png, .mp3, and .db files on external storage.[3] |
| S1077 | Hornbill |
Hornbill has a list of file extensions that it may use to log certain operations (creation, open, close, modification, movement, deletion) on files of those types.[11] |
| C0016 | Operation Dust Storm |
During Operation Dust Storm, the threat actors used Android backdoors capable of enumerating specific files on the infected devices.[12] |
| C0054 | Operation Triangulation |
During Operation Triangulation, the threat actors have obtained a list of files in a specified directory using the |
| S1241 | RatMilad |
RatMilad has listed files and pictures on the device starting from |
| S9030 | SameCoin |
SameCoin can use libexampleone.so to list files to be deleted.[15] |
| S0549 | SilkBean | |
| S0558 | Tiktok Pro |
Tiktok Pro can list all hidden files in the |
| S1216 | TriangleDB |
TriangleDB has obtained a list of files using the |
| S9006 | VajraSpy |
VajraSpy has searched for files with specific extensions, such as .txt, .jpg, .Om4a, .aac and .opus, before exfiltration.[17] |
| G0112 | Windshift |
Windshift has included file enumeration in the malicious apps deployed as part of Operation BULL and Operation ROCK.[18] |
| ID | Mitigation | Description |
|---|---|---|
| M1006 | Use Recent OS Version |
Security architecture improvements in each new version of Android and iOS make it more difficult to escalate privileges. Additionally, newer versions of Android have strengthened the sandboxing applied to applications, restricting their ability to enumerate file system contents. |
| ID | Name | Analytic ID | Analytic Description |
|---|---|---|---|
| DET0682 | Detection of File and Directory Discovery | AN1788 |
For Android, detect File and Directory Discovery by correlating analyst-visible device/network evidence and management state; use streaming or batched telemetry only where the documented collector is deployed. Correlate Application State via Android Enterprise / EMM [Managed package inventory/status and package metadata]; File Access via Application Vetting / Forensic Acquisition [Dynamic filesystem trace or acquired app-container/filesystem artifacts: opendir() or File.listFiles() on path IN $ExternalStoragePaths$ called > $FileEnumThreshold$ times within $EnumWindow$ by app NOT IN $FileEnumAllowList$]; Network Traffic Flow via Android Enterprise Network Logging / Enterprise VPN [DevicePolicyManager.retrieveNetworkLogs(): DnsEvent / ConnectEvent; VPN flow metadata]. Alert on a sequence or state change inconsistent with the device/app baseline, approved management policy, or expected user workflow; do not infer unobserved API calls, file/process activity, or payload content from management state alone. |
| AN1789 |
For iOS, detect File and Directory Discovery by correlating analyst-visible device/network evidence and management state; use streaming or batched telemetry only where the documented collector is deployed. Correlate Application State via Apple MDM [InstalledApplicationList / ManagedApplicationList]; Host Status via Apple MDM [DeviceInformation / SecurityInfo / ProfileList / restrictions and compliance queries]; Network Traffic Flow via Apple Network Extension / Enterprise VPN [NEFilterFlow / per-app VPN / secure-web-gateway flow metadata]. Alert on a sequence or state change inconsistent with the device/app baseline, approved management policy, or expected user workflow; do not infer unobserved API calls, file/process activity, or payload content from management state alone. |