This page is not yet available in Spanish. We are working on its translation. If you have any questions or feedback about our current translation project, feel free to reach out to us!
You can monitor application security for .NET apps running in Docker, Kubernetes, Amazon ECS, and AWS Fargate.
Update your Datadog .NET library to at least version 2.2.0 (at least version 2.16.0 for Software Composition Analysis detection features) for your target operating system architecture.
To check that your service’s language and framework versions are supported for ASM capabilities, see Compatibility.
Enable ASM by setting the DD_APPSEC_ENABLED environment variable to true. For example, on Windows self-hosted, run the following PowerShell snippet as part of your application start up script:
Run the following PowerShell command as administrator to configure the necessary environment variables in the registry HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment and restart IIS.
$target=[System.EnvironmentVariableTarget]::Machine
[System.Environment]::SetEnvironmentVariable("DD_APPSEC_ENABLED","true",$target)
net stop was /y
net start w3svc
Or, for IIS services exclusively, on WAS and W3SVC with Powershell as an administrator, run:
Add the following line to your container Dockerfile:
ENVDD_APPSEC_ENABLED=true
Restart the application using a full stop and start.
After this configuration is complete, the library collects security data from your application and sends it to the Agent. The Agent sends the data to Datadog, where out-of-the-box detection rules flag attacker techniques and potential misconfigurations so you can take steps to remediate.
To see Application Security Management threat detection in action, send known attack patterns to your application. For example, trigger the Security Scanner Detected rule by running a file that contains the following curl script:
for ((i=1;i<=250;i++)); do # Target existing service’s routes curl https://your-application-url/existing-route -A dd-test-scanner-log; # Target non existing service’s routes curl https://your-application-url/non-existing-route -A dd-test-scanner-log; done
Note: The dd-test-scanner-log value is supported in the most recent releases.
A few minutes after you enable your application and send known attack patterns to it, threat information appears in the Application Signals Explorer and vulnerability information appears in the Vulnerability Explorer.