.DS_Store file
- CWE 425
- WASC 34
Predictable Resource Location occurs when an application uses easily guessable or sequential identifiers for resources such as files, URLs, session IDs, or database entries. This allows attackers to enumerate, access, or manipulate sensitive resources without proper authorization. Commonly exploited in web applications, this vulnerability arises from using incremental IDs, predictable filenames, or simple naming conventions without implementing access control checks.
Common patterns leading to predictable resource locations:
- Sequential or incremental file names (e.g.,
invoice1.pdf,invoice2.pdf) accessible via URLs. - Predictable API endpoints or URL paths.
- Session identifiers or tokens generated in a predictable manner.
- Lack of authorization checks for resource access, assuming obscurity is sufficient.
Impacts:
- Unauthorized Access: Attackers can access confidential resources by guessing resource identifiers.
- Information Disclosure: Sequential or predictable resources may expose sensitive data such as invoices, user profiles, or configuration files.
- Privilege Escalation: Predictable endpoints or session IDs can be abused to gain higher-level access.
- Facilitates Enumeration: Attackers can systematically enumerate available resources to identify vulnerabilities.
Detection indicators:
- Resources accessible via URLs with incremental or predictable identifiers.
- Absence of access control checks on resources.
- Automated security scanners identifying sequential or guessable resource patterns.
Remediation
Mitigation focuses on making resource identifiers unpredictable and enforcing strict access control:
Use Randomized Identifiers
Implement GUIDs, UUIDs, or cryptographically secure random tokens for resource names and session IDs.Enforce Access Control Checks
Do not rely solely on obscurity; verify that users have proper authorization to access any resource.Avoid Predictable Naming Patterns
Do not use sequential numbering, timestamps, or simple naming schemes for sensitive resources.Limit Resource Exposure
Restrict access to sensitive directories and files via authentication and authorization mechanisms.Secure API Design
Validate that API endpoints enforce authentication and authorization regardless of identifier predictability.Monitor and Audit Resource Access
Log and review access attempts to detect enumeration or unauthorized access.Regular Security Testing
Include checks for predictable resource locations in penetration testing and automated scanning.
References
Search Vulnerability
You may also see
- Readable .htaccess file
- apc.php page
- Webalizer script
- phpinfo page
- Apache perl-status Enabled
- Apache server-info Enabled
- Apache server-status Enabled
- JetBrains .idea project directory
- AWStats script
- elmah.axd Detected
- Core dump checker PHP script
- trace.axd Detected
- .DS_Store file
- Macromedia Dreamweaver database scripts
- Help file
- robots.txt Detected
- Sitemap Detected
- crossdomain.xml Detected
- Silverlight Client Access Policy
- Laravel log file
- Code Repository
- Configuration File
- Administration page
- Predictable Resource Location
- Code Repository
- Configuration File
- Administration page