Security - Is The Cryptographic Vulnerability Work Around A BIG LIE

Sep 23, 2010

This question is somewhat of a follow up to How serious is this new ASP.NET security vulnerability and how can I workaround it? So if my question seems to be broken read over this question and its accepted solution first and then take that into the context of my question.Can someone explain why returning the same error page and same status code for custom errors matters? I find this to be immaterial especially if this is advocated as part of the work around to it.Isn't it just as easy for the script/application to execute this attack and not specifically care whether or not it gets a http status code and more on the outcome? Ie doing this 4000 times you get redirected to an error page where on 4001 you stay on the same page because it didn't invalidate the padding?

I see why adding the delay to the error page is somewhat relevant but doesn't this also just add another layer to fool the script into thinking the site is an invalid target?What could be done to prevent this if the script takes into account that since the site is it's running the AES encryption that it ignores the timing of error pages and watches the redirection or lack of redirection as the response vector? If a script does this will that mean there's NO WAY to stop it?Edit: I accept the timing attack reduction but the error page part is what really seems bogus. This attack vector puts their data into viewstate. There's only 2 cases. Pass. Fail.

Either Fail, they're on a page and the viewstate does not contain their data. No matter what you do here there is no way to remove the fail case because the page just will never contain their inserted data unless they successfully cracked the key. This is why I can't justify the custom errors usage having ANY EFFECT AT ALL.Or Pass, they're on a page and the viewstate contains their inserted data.Summary of this vulnerability

The cipher key from the WebResoure.axd / ScriptResource.axd is taken and the first guess of the validation key is used to generate a value of potential key with the ciphered text.This value is passed to the WebResource.axd / ScriptResource.axd at this point if the decryption key was guessed correctly their response will be accepted but since the data is garbage that it's looking for the WebResource.axd / ScriptResource.axd will return a 404 error.If the decryption key was not successfully guessed it will get a 500 error for the padding invalid exception. At this point the attack application knows to increment the potential decryption key value and try again repeating until it finds the first successful 404 from the WebResource.axd / ScriptResource.axd

View 4 Replies

Similar Messages:

Wcf - Security Vulnerability (Cryptographic Oracles) And Web Services?

Sep 20, 2010

Just reading about this ASP.NET security vurnerability. Just wondering if this could be used to attack a WCF service hosted under IIS to get to its web.config or if its a pure ASP.NET vurnerability

View 3 Replies

Security Vulnerability (Cryptographic Oracles) - Why Html Redirect For Pre 3.5 SP1

Sep 21, 2010

Why does the recent ASP.NET security vurnerability specify an html error page to redirect to pre ASP.NET 3.5 SP1 but an aspx page for later versions?

View 1 Replies

Security :: Getting Cryptographic Failure Error?

Mar 11, 2010

i am trying to create a strong name for giving the below code----

AssemblyKeyFile(@"UsersABCDocumentsVisual Studio 2008ProjectscodeaccesssecuritycodeaccesssecurityinDebugABC.snk")]

when i am compiling project i am getting this error........

Error 1 Cryptographic failure while signing assembly 'C:UsersABCDocumentsVisual Studio 2008ProjectscodeaccesssecuritycodeaccesssecurityobjReleasecodeaccesssecurity.exe' -- 'Error reading key file 'UsersABCDocumentsVisual Studio 2008ProjectscodeaccesssecuritycodeaccesssecurityinDebugABC.snk'
-- The system cannot find the path specified. '

View 1 Replies

RedirectMode In Security Vulnerability?

Sep 20, 2010

In Scott Guthries blog on the ASP.NET Security vulnerability noted here he says that for ASP.NET 3.5 SP1+ the following attribute should be set in the custom errors section


What is the significance of this in relation to the vulnerability and why only 3.5 SP1 and above?

View 2 Replies

How Serious Is This New Security Vulnerability And How To Workaround It

Sep 15, 2010

I've just read on the net about a newly discovered security vulnerability in ASP.NET. You can read the details here. The problem lies in the way that ASP.NET implements the AES encryption algorithm to protect the integrity of the cookies these applications generate to store information during user sessions.This is a bit vague, but here is a more frightening part: The first stage of the attack takes a few thousand requests, but once it succeeds and the attacker gets the secret keys, it's totally stealthy.The cryptographic knowledge required is very basic.

All in all, I'm not familiar enough with the security/cryptograpy subject to know if this is really that serious.So, should all ASP.NET developers fear this technique that can own any ASP.NET website in seconds or what?How does this issue affect the average ASP.NET developer? Does it affect us at all?
In real life, what are the consequences of this vulnerability? And, finally: is there some workaround that prevents this vulnerability?EDIT: I'd like to summarize the responses I got so far.So, this is basically a "padding oracle" type of attack. @Sri provided a great explanation about what does this type of attack mean. Here is a shocking video about the issue!About the seriousness of this vulnerability: Yes, it is indeed serious. It lets the attacker to get to know the machine key of an application. Thus, he can do some very unwanted things.

In posession of the app's machine key, the attacker can decrypt authentication cookies.
Even worse than that, he can generate authentication cookies with the name of any user. Thus, he can appear as anyone on the site. The application is unable to differentiate between you or the hacker who generated an authentication cookie with your name for himself.It also lets him to decrypt (and also generate) session cookies, although this is not as dangerous as the previous one.Not so serious: He can decrypt the encrypted ViewState of pages. (If you use ViewState to store confidental data, you shouldn't do this anyways!)Quite unexpected: With the knowledge of the machine key, the attacker can download any arbitrary file from your web application, even those that normally can't be downloaded! (Including Web.Config, etc.)

Here is a bunch of good practices I got that don't solve the issue but help improve the general security of a web application.You can encrypt sensitive data with Protected Configuration Use HTTP Only cookies Prevent DoS attacksNow, let's focus on this issue.Scott Guthrie published an entry about it on his blogScottGu's FAQ blog post about the vulnerabilityScottGu's update on the vulnerabilityMicrosoft has a security advisory about itUnderstanding the vulnerabilityAdditional information about the vulnerabilityhe solutionEnable customErrors and make a single error page to which all errors are redirected. Yes, even 404s.

ScottGu said that differentiating between 404s and 500s are essential for this attack.) Also, into your Application_Error or Error.aspx put some code that makes a random delay. (Generate a random number, and use Thread.Sleep to sleep for that long.) This will make it impossible for the attacker to decide what exactly happened on your server.Some people recommended switching back to 3DES. In theory, if you don't use AES, you don't encounter the security weakness in the AES implementation. As it turns out, this is not recommended at all.Some other

View 12 Replies

Invalid Viewstate Since Oracle Padding Vulnerability Security Patch

Sep 29, 2010

Since installing the security patch for the ASP.NET Oracle Padding vunerability any user that was keeping themselves logged in to our site is getting error messages when hitting any page.

The errors logged on the server are

System.Web.UI.ViewStateException: Invalid viewstate.
Client IP:
Port: 55796
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0
ViewState: l4nsXEvWcOwlDpmdbxw916bpHoPiqdBP7Syb+zCQAv44xv/r3oLtETKTL28/Gts6
Referer: Path: /product/4795/fender-usa-deluxe-stratocaster-mn-olympic-white-pearl

With custom errors switched off a user sees the following information

Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: [ViewStateException: Invalid viewstate.
Client IP:
Port: 3588
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB6.5; .NET CLR 2.0.50727; OfficeLiveConnector.1.3; OfficeLivePatch.0.0; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
ViewState: s0toPCu7bxkB7a3G+KTxawY3ILf1qunZyIqNBKg8xSoqY2BkWIUCJAHKFKo2RnJw
Path: /]

[HttpException (0x80004005): Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.]

System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError) +118
System.Web.UI.ViewStateException.ThrowMacValidationError(Exception inner, String persistedState) +13
System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +238
System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(String serializedState) +5
System.Web.Mvc.AntiForgeryDataSerializer.Deserialize(String serializedToken) +90

to delete all cookies and log back in, but obviously an average user, won't know to do this and I'm worried they will just think our site is broken.

View 3 Replies

C# - Cryptographic Licensing Module Not Working From Website?

Dec 2, 2010

We have developed a small method that pulls a cryptographic key from a signed xml document and then checks the signature using the SignedXml.CheckSignature method.

When run from a command line app the key validates properly. However as soon as I call it from a web app it stops working. Anybody know what could be happening?:

// Verify the signature of an XML file against an asymmetric
// algorithm and return the result.XmlDocument Doc, RSA Key
public static Boolean VerifyLicenceFile(string xmlLicFilePathArg)
bool isVerified = false;....

View 1 Replies

Cross Site Scripting Vulnerability?

Mar 25, 2010

We recently discovered that our web app was vulnerable to cross site scripting (XSS) attacks. We managed to manipulate our inputs to produce the following HTML:


Which executes an alert window when clicked.

After HTMLEncoding using the AntiXSS the web app successfully encodes the output to look like this:
<a href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$CtlSearchList1$CtlListView1$DataGrid1$ctl03$ctl00','')">'); onclick=alert('This
is an XSS vulernability. An attacker could do anything here (redirect to another website, virus etc)');('.txt</a>

but the alert window still fires! What am I doing wrong?

View 3 Replies

Web Forms :: This Implementation Is Not Part Of The Windows Platform FIPS Validated Cryptographic Algorithms?

Feb 25, 2011

Our 2.0 app encountered the following error:

This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms.After adding the following in web.config -> <system.web> section:

<machineKey validationKey="AutoGenerate,IsolateApps" decryptionKey="AutoGenerate,IsolateApps" validation="3DES" decryption="3DES"/>

The error occurs in those pages that uses AJAX.

View 1 Replies

CAT.NET Is Reporting This As A Redirect Vulnerability Needing Remediation Via Encoding MyInt

Jan 5, 2011

2nd in an occasional series:

Here's the first one

Is CAT.NET correct that the following is a genuine vulnerability in ASP.NET or is it a false positive?

var myInt = Int32.Parse(txtUserInput.Text);

Response.Redirect(string.Format("myPage.aspx?myId={0}", myInt);

CAT.NET is reporting this as a redirect vulnerability needing remediation via encoding myInt.

View 3 Replies

Creating Custom Httphandler In Web.config: Am I At Risk Of Exposing A 'Padding Oracle' Vulnerability?

Oct 29, 2010

Considering the recent ASP.NET vulnerability, what should I look for in my httphandlers that would cause such a Padding Oracle vulnerability?

Asked in another way... what did MSFT do wrong and what did they fix in their handlers?

View 2 Replies

Security :: What Is Two Way Encryption And How Does That Work

Jul 27, 2010

what is two way encryption and how does that work ?

View 2 Replies

Security :: Rolemanagement Does Not Work In Iis?

Jun 7, 2010

i am having trouble running my application on iis when i enable rolemanagement. It works fine in the visual studio development server.

Is there anything i need to configure in iis to make that work?

This is the error page:

Server Error in '/testapp' Application.

Object reference not set to an instance of an object. Description: An unhandled exception occurred during the execution of the current web request. review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:


Stack Trace:


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

View 2 Replies

Sql - Web Application Security Don't Work On IIS 7?

Jan 20, 2011

i use visual studio 2010, SQL express 2008 on win server 2008

after running the wizard of security (created single user, set permissions like deny anonymous and allow the created user) and pressing F5 --> the site works just fine.

when i move the folder to IIS 7 and "convert to application" the login page appears but it wont accept the password i provided.

i was told that only Stackoverflow geniuses will answer this question.

i am using .Net 4, manged pipleine mode --> inegrated

IIS settings:

Anonymous Auth. --> Enabled
Forms Auth. --> Enabled
ASP.Net Impersonation, Basic Auth, Digest Auth, Windows Auth--> Disabled


<add name="ApplicationServices" connectionString="data source=.SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/>


the username exists in aspnet_Users table and the username "encrypted" in aspnet_Membership table

View 1 Replies

Security :: FileIOPermission CreateDirectory Does Not Work

Oct 13, 2010

There appears to be a recent issue with how CreateDirectory resolves FileIOPermission that is causing issues on our server.

Reading through some similar posts on the issue there is a lot of misinformation being given out, so I am hoping to get some kind of clarification.

Given the following setup:

1. Windows Server 2003 SP2 running IIS6 with latest version of .NET Framework 3.5 SP1 fully patched

2. A web site created under IIS6 running under Medium Trust and with the Network Service user being given Full Control over the virtual directory.

3. Running System.IO.Directory.CreateDirectory with the following code:


4. Fails with:


It appears CreateDirectory is breaking the permissions somehow, as the medium trust rules are as follows:

<IPermission version="1" Read="$AppDir$" Write="$AppDir$" Append="$AppDir$" PathDiscovery="$AppDir$"/>

These rules all point to being able to create directories within the virtual directory/application folder. In fact I am certain this has worked in the past, but recently has stopped working.

Note that this is not an NTFS permissions issue, files can be written,read and deleted in the virtual directory, only CreateDirectory is restricted somehow.

So what is going on, has a recent security update changed this functionality so that Medium Trust no longer has the ability to create directories?

View 6 Replies

Security :: Password Recovery Does Not Work?

Jan 28, 2010

I have the following code. I simply want to select the security question and answer from the DB and do something if the result is true.

This is my code:-


This code always returns the result of "Invalid User Credentials", so this means it does not recognize the values from the DB. When i put something in that SHOULD match i still get the same. I dont get an error message but the logic here is to select security question and answer where the question is equal to the dropdown box and the answer is equal to the textbox. If there is a match then do something..

But this does not work..

You can see what i mean here:-


If you select "What street did you grow up in?" from the dropdown and then put in "deeplish" in the security answer, the result should be "**EXISTS".

View 2 Replies

Security :: Work With The Users From The Different Web Application?

Feb 28, 2010

I need to retrieve the user data from the different web application. In the web.config I can specifydifferent profiles, but I cannot figure out how can I use it in the application. This is what I did:

<profile defaultProvider="i90PartnerProfileProvider">


View 3 Replies

Security :: Certificate Mapping Does Not Work?

Feb 26, 2010

We have two different users and we want to authenticate them through "IIS Client Certificate Mapping Authentication" in IIS 7. They have certificates issued by VeriSign.When user requests a website, a pop-up appears on their browser to select a certificate. User can see both certificates and selects one of them and hit ok.We could capture Certificate attributes using

following code

HttpClientCertificate cs = Request.ClientCertificate;
Response.Write("ClientCertificate Settings:<br>");
Response.Write("Certificate = " + cs.Certificate + "<br>");

until now every thig is fine.We mapped one of two certificates to an AD user using this
"Configuring One-to-One Client Certificate Mappings". am trying to print if user is authenticated or not using following code. and it is never authenticated. I don't know what mapping does. It seems it does nothing.Response.Write (Request.ServerVariables["LOGON_USER"]) ;
Response.Write ("<BR>") ;
Response.Write ("AUTH_USER: ") ;;
Response.Write ("<BR>") ;
Response.Write("IsAuthenticated :" + User.Identity.IsAuthenticated + "<br>");
Response.Write("HttpContext.Current.User.Identity :" + HttpContext.Current.User.Identity.IsAuthenticated + "<br>");
Response.Write("Request.IsAuthenticated :" + Request.IsAuthenticated + "<br>");

Can somebody help so that I can allow user only if he supplies a certificate that is mapped to a user. Currently any user having a certificate can get into the site, site is having anonymous authentication and certificate is required.

View 1 Replies

Security :: Work With The User Who Loggedin?

Dec 13, 2010

i'm working in my first integral website ,and i'm using the ASP.NET Login Controls but now i need to know how i can work with the user who loggedin ,i wanna visable his Data only not the all users data ,like for example the site is contain medical data for every user and when one user is logged in it will implement query to visual his Examination only.

View 7 Replies

Security :: Get Logged Doesn't Work On IIS?

Aug 17, 2010

I have a problem. I can't get current logged user to my application. Everything is fine on localhost. When I deployed an application

on IIS, it stopped working. I have Windows Authentication Enabled on my IIS. For every account which uses intranet, logged user is the same now, and it's an administration account.

Why application doesn't get real logged user, but administrator account ?

View 3 Replies

Security :: Both Old And New Password Work After The User Changes It?

Nov 14, 2010

I have an ASP.Net 4.0 application that is using Forms Authentication and ActiveDirectoryMembershipProvider. It authenticates against Active Directory running on Windows Server 2008 R2.I use ChangePassword control for changing passwords.When the user changes the password he can log on for some time with the old password. My client feels this is a security problem with the application. Is there any way to make sure the old password does not work after the user changes it?Also, if I do iisreset on the web server, the old password stops working. The password must be cached somewhere in the web app.

View 3 Replies

Security :: Impersonation To Work For DB On Separate Box?

Oct 19, 2010

I need to pass the credential of the logged in user to the DB, which is on a different server, is it that Impersation can only work if the DB is on the same machine as the web server? How can I flow the credential to the the server?

View 2 Replies

Security :: Remember Me Next Time Doesn't Work?

Oct 2, 2010

In the login control, the "Remember me next time" checkbox does not appear to work.

If I check it when logging in, when I log in the next time, even a minute later, I go to the login page again.

It seems the cookie is not being written to the client. Can't find it anywhere.

My web.config contains:


View 4 Replies

Does Security Trimming Work With Web Forms Routing?

May 31, 2010

In my web.config I have configured a SiteMapProvider with securityTrimmingEnabled="true" and on my main master page is an asp:Menu control bound to an asp:SiteMapDataSource. In addition I have configured restricted access to all pages in a subfolder "Admin" (using another web.config in this subfolder).

If I put a sitemapNode in Web.sitemap...

<siteMapNode url="~/Admin/Default.aspx" title="Administration" description="" >

... only users in role "Admin" will have the menu item related to that siteMapNode. So this is working fine and as intended.

Now I have defined a URL route in Global.asax to map the physical file to a new URL:

"Administration/Home", "~/Admin/Default.aspx");

But when I use this route-URL in the SiteMap file...

<siteMapNode url="Administration/Home" title="Administration" description="" >

... it seems that security trimming does not work: The menu item is visible for all users. (Access to the page is still restricted though, so selecting the menu item by non-Admin users does not navigate to the restricted page.)

Question: Is there any setting I've missed so far to make security trimming working with URL routing in ASP.NET 4.0 Web Forms? Did I do something wrong? Is there any work-around?

View 1 Replies

Copyrights 2005-15, All rights reserved