Objective: Exfiltrate sensitive data, disrupt application availability, or manipulate application behavior via serilog-sinks-console
Goal: Exfiltrate sensitive data, disrupt application availability, or manipulate application behavior via serilog-sinks-console ├── 1. Exfiltrate Sensitive Data [HIGH RISK] │ ├── 1.1. Misconfigured Output Template [HIGH RISK] │ │ └── 1.1.1. Accidental Inclusion of Sensitive Properties [CRITICAL] │ ├── 1.2. Console Output Interception [HIGH RISK] │ │ └── 1.2.1.1. Shared Server Environment [CRITICAL] │ └── 1.3 Environment Variable Exposure [HIGH RISK] │ └── 1.3.1 Sensitive data logged via environment variables [CRITICAL] └── 2. Disrupt Application Availability └── 2.1. Denial of Service (DoS) via Excessive Logging └── 2.1.1. Uncontrolled Log Volume [CRITICAL]
Attack Tree Path: 1. Exfiltrate Sensitive Data [HIGH RISK]
- Overall Description: This is the most critical threat category, focusing on unauthorized access to sensitive information logged to the console.
Attack Tree Path: 1.1. Misconfigured Output Template [HIGH RISK]
- Description: The
outputTemplate
in Serilog configuration controls the format of log messages. If misconfigured, it can expose sensitive data.
Attack Tree Path: 1.1.1. Accidental Inclusion of Sensitive Properties [CRITICAL]
- Description: Developers might inadvertently include sensitive properties (e.g., passwords, API keys, PII) in the
outputTemplate
, either directly or by logging entire objects that contain sensitive data. * Action: Review and restrict properties included in the output template. Use structured logging and avoid logging raw objects directly. Use Serilog's destructuring operators (@, $) appropriately. * Likelihood: Medium (Common mistake) * Impact: High to Very High (Depends on the data) * Effort: Very Low (Just needs to read the logs) * Skill Level: Very Low (No special skills needed) * Detection Difficulty: Medium (Requires log review, might be missed)
Attack Tree Path: 1.2. Console Output Interception [HIGH RISK]
- Description: If an attacker can gain access to the console output, they can potentially see all logged information.
Attack Tree Path: 1.2.1.1. Shared Server Environment [CRITICAL]
- Description: In a shared server environment (e.g., a shared hosting provider, a multi-user system), other users or processes might have access to the console output of the application. * Action: Avoid using the console sink in shared server environments where other users/processes might have access to the console output. Use a more secure sink (e.g., file, database) with appropriate access controls. * Likelihood: Medium (If using a shared environment) * Impact: High to Very High (Full access to logged data) * Effort: Low (If already has access to the shared environment) * Skill Level: Low (Basic system access) * Detection Difficulty: Medium to High (Depends on monitoring)
Attack Tree Path: 1.3 Environment Variable Exposure [HIGH RISK]
- Description: Sensitive data stored in environment variables can be inadvertently logged.
Attack Tree Path: 1.3.1 Sensitive data logged via environment variables [CRITICAL]
- Description: Developers might log entire environment variables, or parts of them, which can contain secrets like API keys, database credentials, or other sensitive configuration data. * Action: Avoid logging entire environment variables. If necessary, sanitize or redact sensitive information before logging. * Likelihood: Medium (Common mistake) * Impact: High to Very High (Depends on the data in environment variables) * Effort: Very Low (Just needs to read the logs) * Skill Level: Very Low (No special skills needed) * Detection Difficulty: Medium (Requires log review, might be missed)
Attack Tree Path: 2. Disrupt Application Availability
- Overall Description: This category focuses on attacks that aim to make the application unavailable or unresponsive.
Attack Tree Path: 2.1. Denial of Service (DoS) via Excessive Logging
- Description: Excessive logging can consume system resources (CPU, memory, disk I/O), leading to performance degradation or application crashes.
Attack Tree Path: 2.1.1. Uncontrolled Log Volume [CRITICAL]
- Description: If logging levels are not properly configured (e.g., using
Debug
orVerbose
in production), or if the application generates an excessive number of log messages, it can overwhelm the system. * Action: Implement logging level controls (e.g.,MinimumLevel
in Serilog). Use appropriate logging levels (e.g.,Information
,Warning
,Error
) and avoid excessive logging at lower levels (e.g.,Debug
,Verbose
) in production environments. Consider using sampling or rate limiting if necessary. * Likelihood: Medium (If logging is not properly configured) * Impact: Medium (Performance degradation, potential unavailability) * Effort: Very Low (Just needs to trigger excessive logging) * Skill Level: Very Low (No special skills needed) * Detection Difficulty: Low to Medium (Performance monitoring should detect)