NovaTech Consulting Blog

Le mie esperienze con le tecnologie Microsoft

Vulnerability in ASP.NET Could Allow Information Disclosure in veste SharePoint 2010

In questi giorni è stato rilevato un problema di sicurezza in ASP.NET che come ben sapete è la base costitutiva della interfaccia utente Web di tutte le versioni SharePoint.

In attesa di una fix strutturale Microsoft ha rilasciato dei workaround per tamponare il problema documentandoli in questa nota tecnica Microsoft Security Advisory (2416728) - Vulnerability in ASP.NET Could Allow Information Disclosure.

Tuttavia in SharePoint 2010 la procedura è lievemente diversa ed occorre seguire questi passi

  1. Browse to the SharePoint installation directory at %CommonProgramFiles%\Microsoft Shared\Web Server Extensions\14\template\layouts.
  2. Create a new file called error2.aspx in this directory with the following content:
    <%@ Page Language="C#" AutoEventWireup="true" %>
    
    <%@ Import Namespace="System.Security.Cryptography" %>
    
    <%@ Import Namespace="System.Threading" %>
    
    <script runat="server">
    
       void Page_Load() {
    
          byte[] delay = new byte[1];
    
          RandomNumberGenerator prng = new RNGCryptoServiceProvider();
    
          prng.GetBytes(delay);
    
          Thread.Sleep((int)delay[0]);
    
            
    
          IDisposable disposable = prng as IDisposable;
    
          if (disposable != null) { disposable.Dispose(); }
    
        }
    
    </script>
    
    <html>
    
    <head runat="server">
    
        <title>Error</title>
    
    </head>
    
    <body>
    
        <div>
    
            An error occurred while processing your request.
    
        </div>
    
    </body>
    
    </html>
  3. Navigate to %SystemDrive%\inetpub\wwwroot\wss\virtualdirectories.
  4. For each subfolder in this directory, do the following:
    1. Edit web.config
    2. Find the customErrors node and change it to; 

      <customErrors mode="On" redirectMode="ResponseRewrite"

      defaultRedirect="/_layouts/error2.aspx" />

    3. Save your changes
    4. Run iisreset /noforce

Altre informazioni a questi link:

Microsoft Security Advisory (2416728) - Vulnerability in ASP.NET Could Allow Information Disclosure
Security Advisory 2416728 Released – Microsoft Security Response Center Blog
Understanding the ASP.NET Vulnerability – Microsoft Security Research & Defense Blog
Important: ASP.NET Security Vulnerability – Scott Guthrie’s Blog
Frequently Asked Questions about the ASP.NET Security Vulnerability – Scott Guthrie’s Blog



Saluti

Mario Saccoia

 

 

Share this post :