473,403 Members | 2,354 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

False Alarm from Forms Security Validation

My ASP.NET web application has a flaw that produces false security-violation
alarms.

There are several categories of users for this web site, e.g. Colonels,
Sergeants, Private_1s,
and Private_2s. Colonels may visit any page in the web site. Sergeants may
visit only non-com
pages. The non-com pages consist of non-com-0, non-com-1, and non-com-2
pages. Private_1s may visit non-com-0 and non-com-1 pages. Private_2s may
visit non-com-0 and non-com-2 pages. In addition there is a login page that
may be visited by any user.

The natural flow is as follows. The user goes from the login page to an
Officer page or to the "home" non-com-0 page. Similarly from the "home"
non-com-0 page the user can click a link to go to a different non-com-0
page, a non-com-1 page, or a non-com-2 page (depending upon his rank). From
any of the web pages the user can click a link to return to the log-in page.
From any of the non-com-1 or non-com-2 pages, the user can click a different
link to return to the "home" non-com-0 page.

The method that I am using to do forms security validation comprises the
following.

(1) Use a session variable called WebRegionS that can assume any of the
enumeration literals { officer, non_com_0, non_com_1, non_com_2 }. The
application assigns a value to WebRegionS before redirecting to a web page
in which the category changes (e.g. from non_com_0 to non_com_1).

(2) Create a new class called basePage, which is derived from
System.Web.UI.Page, and derive all web application pages from basePage.

(3) basePage has a protected variable called WebRegionP, that assumes the
same enumeration literals as WebRegionS. In the web application page's
constructor an appropriate value is assigned to WebRegionP.

(4) basePage overrides OnInit(), in which it compares WebRegionS to
WebRegionP; if they are different, it redirects to a page that displays a
diagnostic.

The flaw in the above strategy is that the user can (and probably will) use
the browser's BACK button, instead of a link. If he does this to go back
from a non-com-1 page to a non-com-0 page, the BACK button does not induce a
server-side event, and there is no opportunity to set the session variable
WebRegionS back to non_com_0. Subsequently when the user clicks something
that causes a PostBack, basePage's OnInit() is invoked, a mismatch is
detected, and the user is redirected to the page that displays the
diagnostic.

An ideal solution would be to induce a server-side event when the user
clicks the browser's BACK button. Is this doable and easy?

I looked at ASP.NET's Forms Authentication facility (class
FormsAuthentication, <authorization> tags in Web.config,
Application_AuthenticateRequest() in Global.asax, GenericPrincipal, etc.).

This does not seem to be appropriate for this web application, primarily
because it would let the user jump to a page, without passing through
intermediate pages. For example, the "home" non-com-0 page sets session
variables whose values are used by code in the non-com-1 pages.

What strategy do other web-application programmer's use? Am I missing
something that is easy?

I apologize for the length of the above; I tried to keep it short and
simple. If you have read this, thank you for your patience.
Nov 19 '05 #1
0 1007

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

65
by: SamMan | last post by:
A question came up at work from one of our clients about forms on their site. The data from these forms are processed by a PHP script and if all goes well, a thank you screen appears. Sometimes,...
13
by: Ian Hickson | last post by:
A group of us have been unofficially working on a proposal of extensions to HTML4's Forms chapter, and would like to get input from a wider range of people now that we think our draft proposal is...
11
by: ElmoWatson | last post by:
I tried on the Security newgroup, as well as other places, and haven't gotten an answer yet - - I'm pulling my hair out over this one. I'm trying to get Forms Authentication working.....I can get...
1
by: JC | last post by:
I have several applications that use forms authentication and they are currently setup to use a single login page. Everything works fine under v1.0 of the framework and everything works fine if I...
7
by: Henry | last post by:
I am writing a Windows forms VB.Net/MS SQL application via VS 2003 that utilizes Crystal Reports. I want to be able to dynamically set the report data source at run time. I'm trying to change...
1
by: Peter Ravnholt | last post by:
Hello all, It seems that digitally signing XML documents using the SignedXml class has a bug - or at least a behavior I cannot explain. The problem occurs when I sign XML documents containing...
19
Atli
by: Atli | last post by:
Introduction At some point, all web developers will need to collect data from their users. In a dynamic web page, everything revolves around the users input, so knowing how to ask for and collect...
1
by: =?Utf-8?B?U2FtIE1jSW50eXJl?= | last post by:
I have a big problem - can anyone help a distressed woman here? I installed Zone Alarm Security Suite and then after a while I didn't like the software so I removed it properly, but then...
4
by: Bjorn Sagbakken | last post by:
In a web-application with login creds (user, pwd), these are checked against a user table on a SQL server. On a positive validation I have saved the userID, name, custno and role-settings in a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.