Merge pull request #10859 from Mys7ic/main
Add ASP.NET Core Development Environment Exposurepatch-12
commit
0bce42ce92
|
@ -0,0 +1,40 @@
|
||||||
|
id: aspnetcore-dev-env
|
||||||
|
|
||||||
|
info:
|
||||||
|
name: ASP.NET Core Development Environment - Exposure
|
||||||
|
author: Mys7ic
|
||||||
|
severity: info
|
||||||
|
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
|
||||||
|
shodan-query: html:"ASPNETCORE_ENVIRONMENT"
|
||||||
|
verified: true
|
||||||
|
tags: misconfig,aspnetcore,exposure
|
||||||
|
|
||||||
|
http:
|
||||||
|
- method: GET
|
||||||
|
path:
|
||||||
|
- "{{BaseURL}}/Error"
|
||||||
|
|
||||||
|
matchers-condition: or
|
||||||
|
matchers:
|
||||||
|
- type: word
|
||||||
|
part: body
|
||||||
|
words:
|
||||||
|
- "<strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>"
|
||||||
|
|
||||||
|
- type: word
|
||||||
|
part: body
|
||||||
|
words:
|
||||||
|
- "ASPNETCORE_ENVIRONMENT"
|
||||||
|
- "<environment include=\"Development\">"
|
||||||
|
condition: and
|
Loading…
Reference in New Issue