473,761 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.P age, 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
FormsAuthentica tion, <authorizatio n> tags in Web.config,
Application_Aut henticateReques t() in Global.asax, GenericPrincipa l, 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 1022

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

Similar topics

65
4500
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, when you go back to the form (by clicking the back button), the data is still there in the form fields. Other times it is not. The client would like to ensure the data remains, as they sometimes have multiple submissions to make with similar...
13
2061
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 reaching a stable stage: http://www.whatwg.org/specs/web-forms/2004-06-27-call-for-comments/ Some of the features we are proposing include new input control types for dates, times, e-mail addresses, and numbers; a new client-side validation...
11
3602
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 any requested page to automatically go to the Login.aspx page, AND, the ReturnURL querystring is correct in the address bar, but no matter what, I can't get it, once the user is authenticated, to redirect to the new page. It ALWAYS refreshes the...
1
2004
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 have all applications running under v1.1. However, I need the login page and a few apps to be running under using v1.0 with other applications running under v1.1. Now my authentication cookie is no longer being accepted anywhere other than by...
7
11249
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 the the reports "integrated security" from TRUE to FALSE via the "Set Location" dialog in the report designer with no success. It is not intuitive (at least not to me.) I get the following error:
1
4372
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 namespace prefixes and namespace references and then validate it. The validation always fails (returns false) in this case. When I remove the namespace prefixes and namespace references from the XML, signing and validating works fine.
19
248254
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 this data is essential to any developer. This article is a basic tutorial on how to user HTML Forms, the most common method of data collection. Assumptions - Basic HTML knowledge. - Basic PHP knowledge. HTML Forms A common and simple way of...
1
2049
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 discovered my wireless become limited access. I found out that I have two firewalls and have tried everything to remove Zone Alarm completely from the Windows Vista Security system but it is still stuck there and this is causing problems of being...
4
5326
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 userobject (custom build class) and added this to the session using as session variable like session For all other pages I have added a small test in the page_load event, basically testing if the session != null, but also checking if the...
0
9377
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9989
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9811
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7358
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6640
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5266
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3913
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3509
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2788
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.