Skip to content

Latest commit

 

History

History
93 lines (81 loc) · 6.08 KB

File metadata and controls

93 lines (81 loc) · 6.08 KB

Attack Tree Analysis for filp/whoops

Objective: Expose sensitive application data or achieve code execution by exploiting Whoops' error handling and information disclosure capabilities.

Attack Tree Visualization

                                      Expose Sensitive Data or Achieve Code Execution via Whoops [CN]
                                                      |
                                      ---------------------------------------------------
                                      |
                      1.  Excessive Information Disclosure [CN]
                                      |
                      -----------------------------------
                      |                 |
          1.1 Stack Trace Leak [HR]   1.2 Environment Exposure [HR]
                      |                 |
          -------------------   -------------------
          |       |       |     |       |       |
      1.1.1   1.1.2   1.1.3 1.2.1   1.2.2   1.2.3
      Trigger  Parse   Use   Expose  Expose  Use
      Error   Stack   Leaked  Server  Loaded  Env.
      to      Trace   Info   Config  Modules Vars
      Reveal          to      (e.g.,   (e.g.,  to
      Source          Aid   DB      PHP    Gain
      Code            Further  Creds)  Version)Access
      Struct.         Attacks
        [HR]    [HR]    [HR]    [HR]     [HR]    [HR]
  • Description: This is the attacker's ultimate objective. All attack paths within this sub-tree lead to this outcome.
  • Mitigation Focus: Preventing any of the child nodes from being successfully exploited will prevent this goal from being achieved.
  • Description: This represents the primary attack vector, focusing on Whoops' tendency to reveal sensitive information when misconfigured or when errors occur.
  • Mitigation Focus:
    • Disable Whoops in production environments.
    • Configure Whoops to redact sensitive information (stack traces, environment variables, request data).
    • Implement robust error handling to prevent uncontrolled error propagation.
  • Description: This path involves exploiting Whoops' stack trace display to gain insights into the application's source code and structure.
  • 1.1.1 Trigger Error to Reveal Source Code Structure [HR]
    • Description: The attacker intentionally causes an application error (e.g., providing invalid input, requesting a non-existent resource) to trigger Whoops' error handling and display a stack trace.
    • Likelihood: High (if Whoops is enabled in production or misconfigured)
    • Impact: Medium to High (reveals code structure, file paths, and potentially sensitive data within the code)
    • Effort: Low
    • Skill Level: Low
    • Detection Difficulty: Medium
  • 1.1.2 Parse Stack Trace to Identify Vulnerabilities [HR]
    • Description: The attacker analyzes the revealed stack trace to identify potential vulnerabilities, such as outdated libraries, insecure coding practices, or logic flaws within the application's code.
    • Likelihood: Medium (depends on attacker skill and the presence of vulnerabilities)
    • Impact: High (successful identification leads to targeted exploitation)
    • Effort: Medium
    • Skill Level: Medium
    • Detection Difficulty: High
  • 1.1.3 Use Leaked Information to Aid Further Attacks [HR]
    • Description: The attacker leverages the information gained from the stack trace (vulnerabilities, code structure, etc.) to craft more specific and effective attacks against the application.
    • Likelihood: High (if vulnerabilities are found)
    • Impact: High (can lead to complete compromise)
    • Effort: Variable (depends on the vulnerability)
    • Skill Level: Variable (depends on the vulnerability)
    • Detection Difficulty: Variable (depends on the subsequent attack)
  • Description: This path focuses on exploiting Whoops' potential to display sensitive environment variables and server configuration details.
  • 1.2.1 Expose Server Configuration (e.g., DB Credentials) [HR]
    • Description: The attacker triggers an error that causes Whoops to display server configuration information, potentially including database credentials, API keys, or other secrets stored in environment variables.
    • Likelihood: Medium (if Whoops is misconfigured and sensitive data is in environment variables)
    • Impact: High (direct access to sensitive data)
    • Effort: Low
    • Skill Level: Low
    • Detection Difficulty: Medium
  • 1.2.2 Expose Loaded Modules (e.g., PHP Version) [HR]
    • Description: Whoops reveals the versions of loaded software components (e.g., PHP, web server, libraries), which allows the attacker to identify known vulnerabilities associated with those specific versions.
    • Likelihood: High (if Whoops is enabled and not configured to hide this)
    • Impact: Medium (facilitates vulnerability research)
    • Effort: Low
    • Skill Level: Low
    • Detection Difficulty: Medium
  • 1.2.3 Use Environment Variables to Gain Access [HR]
    • Description: The attacker directly uses the exposed sensitive environment variables (e.g., database credentials) to gain unauthorized access to the application or its resources.
    • Likelihood: Medium (depends on the sensitivity of the exposed variables)
    • Impact: High (can lead to direct access or further exploitation)
    • Effort: Low (if credentials are exposed)
    • Skill Level: Low to Medium
    • Detection Difficulty: High