From 7e3d271e5581aaa43470cd1e129870aa9da90fd3 Mon Sep 17 00:00:00 2001 From: Mys7ic Date: Fri, 27 Sep 2024 16:50:45 +0200 Subject: [PATCH] Add ASP.NET Core Development Environment Exposure --- .../microsoft/aspnetcore-dev-env.yaml | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 http/misconfiguration/microsoft/aspnetcore-dev-env.yaml diff --git a/http/misconfiguration/microsoft/aspnetcore-dev-env.yaml b/http/misconfiguration/microsoft/aspnetcore-dev-env.yaml new file mode 100644 index 0000000000..c87f76b6af --- /dev/null +++ b/http/misconfiguration/microsoft/aspnetcore-dev-env.yaml @@ -0,0 +1,33 @@ +id: aspnetcore-dev-env + +info: + name: ASP.NET Core Development Environment Exposure + author: Mys7ic + severity: info + tags: misconfig,aspnetcore,exposure + description: | + The ASP.NET Core application is running in Development mode, which could exposes detailed error messages and stack traces on the '/Error' page. + impact: | + Exposing detailed error messages and stack traces can reveal sensitive information such as server configurations, file paths, source code snippets, and other debug information. Attackers can use this information to identify vulnerabilities and compromise the application or underlying systems. + remediation: | + Set the 'ASPNETCORE_ENVIRONMENT' environment variable to 'Production' and ensure that detailed error messages are not exposed to end-users. + reference: + - https://docs.microsoft.com/en-us/aspnet/core/fundamentals/environments + metadata: + max-request: 1 + vendor: Microsoft + product: ASP.NET Core +requests: + - method: GET + path: + - "{{BaseURL}}/Error" + matchers-condition: or + matchers: + - type: word + words: + - "ASPNETCORE_ENVIRONMENT environment variable to Development" + - type: word + condition: and + words: + - "ASPNETCORE_ENVIRONMENT" + - ""