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 |
Defender observes an app (package/UID) issuing high-rate directory or content-index enumerations against external/shared storage or other apps’ Documents/Media providers (logcat:ContentResolver, logcat:StorageAccessFramework), followed within a short window by bulk READ handles or stat/list calls over many distinct paths (logcat:FileIO). Activity occurs without foreground UI or exceeds typical per-app baseline, indicating automated file/dir discovery rather than user-driven browsing. Correlate on package/UID/profile and time proximity. |
| AN1789 |
Defender observes an app (bundle/process) performing large-scope directory listings or metadata reads via FileProvider/NSFileManager against user-visible containers (Files app locations, iCloud/On-My-iPhone) or external providers, with rapid traversal across many folders while the app is backgrounded or without corresponding UI activity (unifiedlogs:FileProvider, unifiedlogs:FileIO). Optional signals include Photo library or document picker bulk enumeration absent recent user gesture. Correlate on bundle/process/profile and path volume within a bounded window. |