Config Files Anonymous Auth Enabled
Description
Detects when anonymous authentication is enabled in .NET configuration files, which allows unauthenticated users to access application resources. This creates a security risk by potentially exposing sensitive functionality without proper authentication controls.
Detection Strategy
• Scans .NET web.config files for authentication configuration sections
• Reports a vulnerability when finding <anonymousAuthentication enabled="true"> within an <authentication> tag
• The vulnerability location is reported at the 'enabled="true"' attribute position
Vulnerable code example
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<security>
<authentication>
<anonymousAuthentication enabled="true" /> <!-- Security risk: Allows anonymous access to web resources without authentication -->
</authentication>
</security>...✅ Secure code example
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<security>
<authentication>
<anonymousAuthentication enabled="false" /> <!-- Disable anonymous access to require proper authentication -->
<windowsAuthentication enabled="true" /> <!-- Enable Windows authentication for secure user identification -->
</authentication>...Search for vulnerabilities in your apps for free with Fluid Attacks' automated security testing! Start your 21-day free trial and discover the benefits of the Continuous Hacking Essential plan. If you prefer the Advanced plan, which includes the expertise of Fluid Attacks' hacking team, fill out this contact form.