473,799 Members | 2,764 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Major security issue?

I have found what I believe to be a serious security
issue in ASP.Net. If you have:

1. Your website configured for anonymous access
2. Elect under web.config to set the sessionstate
attribute of cookieless to true

Anyone from any IP address or across another browser can
copy the URL and work within the session. My question
is "Why doesn't ASP.Net provide an option around ensuring
all requests for a user session originate from the same
IP address and/or same useragent?" I know that some
people sit behind firewalls, proxies and layer 4 devices
that could load balance and affect HTTP traffic, but it
honestly escapes me why I can access my web application
on any machine inside or outside of my network with just
the sessionid in the URL from even different browsers.
There must be a way to control this in the
configuration. Am I alone in find this troubling?
Nov 18 '05 #1
5 1105
It seems to me that this would be listed as a predictable downside to using
cookieless sessions. Verifying IPs and/or user agents wouldn't be any real
way to avoid this, so it makes sense to me that this wouldn't be the default
behavior for asp.net to check that. And if it were to check it, where would
it store this info? In session variables? Hmmph.

--

Ray at home
Microsoft ASP MVP
"Keith" <ke***@keithadl er.com> wrote in message
news:77******** *************** *****@phx.gbl.. .
I have found what I believe to be a serious security
issue in ASP.Net. If you have:

1. Your website configured for anonymous access
2. Elect under web.config to set the sessionstate
attribute of cookieless to true

Anyone from any IP address or across another browser can
copy the URL and work within the session. My question
is "Why doesn't ASP.Net provide an option around ensuring
all requests for a user session originate from the same
IP address and/or same useragent?" I know that some
people sit behind firewalls, proxies and layer 4 devices
that could load balance and affect HTTP traffic, but it
honestly escapes me why I can access my web application
on any machine inside or outside of my network with just
the sessionid in the URL from even different browsers.
There must be a way to control this in the
configuration. Am I alone in find this troubling?

Nov 18 '05 #2
This is predictable in an insecure product. I'm not
trying to act as if I discovered something new or Earth
shattering, but I am quite surprised there is nothing in
place in ASP.Net to protect user sessions from being
hijacked. It seems to me that the session IDs have been
problematic since ASP first came about. In ASP.Net they
are still for some reason handed out in a fashion that
means the same ID could be sent out to the same browser
even after a Session.Abandon (). It doesn't make sense
that Microsoft couldn't do something as simple as encrypt
the user agent and source IP into the session GUID if the
user wanted to lock the source and device of a request
down to a particular computer/network. From an
architectural standpoint I realize that this in itself
would add some overhead to IIS because every HTTP request
would have to be checked against a lookup, but with HTTP
keep-alives this check would only need to occur once on
the same connection. I also realize that someone could
use this to DoS a server by sending lots of HTTP requests
with random IDs that would have to decoded and matched up
against connections, but I'm sure that intrusion
detection systems could be made to deal with this issue.
The other option of course is to not use cookieless
sessions under the anonymous user configuration and rely
on an in-memory cookie which is obviously a little less
accessible. In either situation though, this seems like
an incredible option to not provide ASP users.
-----Original Message-----
It seems to me that this would be listed as a predictable downside to usingcookieless sessions. Verifying IPs and/or user agents wouldn't be any realway to avoid this, so it makes sense to me that this wouldn't be the defaultbehavior for asp.net to check that. And if it were to check it, where wouldit store this info? In session variables? Hmmph.

--

Ray at home
Microsoft ASP MVP
"Keith" <ke***@keithadl er.com> wrote in message
news:77******* *************** ******@phx.gbl. ..
I have found what I believe to be a serious security
issue in ASP.Net. If you have:

1. Your website configured for anonymous access
2. Elect under web.config to set the sessionstate
attribute of cookieless to true

Anyone from any IP address or across another browser can copy the URL and work within the session. My question
is "Why doesn't ASP.Net provide an option around ensuring all requests for a user session originate from the same
IP address and/or same useragent?" I know that some
people sit behind firewalls, proxies and layer 4 devices that could load balance and affect HTTP traffic, but it
honestly escapes me why I can access my web application
on any machine inside or outside of my network with just the sessionid in the URL from even different browsers.
There must be a way to control this in the
configuration. Am I alone in find this troubling?

.

Nov 18 '05 #3
"Keith" <ke***@keithadl er.com> wrote in message
news:7c******** *************** *****@phx.gbl.. .
This is predictable in an insecure product.
I can loosen all your lugnuts with a standard crossbar wrench, too. Does
that make your car an insecure product? If you think it does, use >=3 wheel
locks on each of your wheels.

I'm not
trying to act as if I discovered something new or Earth
shattering, but I am quite surprised there is nothing in
place in ASP.Net to protect user sessions from being
hijacked.
There is, real sessions, although that is arguable as well. And this has
nothing to do with what server-side technology you choose to use.
It seems to me that the session IDs have been
problematic since ASP first came about. In ASP.Net they
are still for some reason handed out in a fashion that
means the same ID could be sent out to the same browser
even after a Session.Abandon ().
Even if this happened, would it matter? It'd still be a new session.
It doesn't make sense
that Microsoft couldn't do something as simple as encrypt
the user agent and source IP into the session GUID if the
user wanted to lock the source and device of a request
down to a particular computer/network.
That data is meaningless though. When you have 1000 computers created from
the same image all sitting behind the same firewall, for example.

From an
architectural standpoint I realize that this in itself
would add some overhead to IIS because every HTTP request
would have to be checked against a lookup, but with HTTP
keep-alives this check would only need to occur once on
the same connection. I also realize that someone could
use this to DoS a server by sending lots of HTTP requests
with random IDs that would have to decoded and matched up
against connections, but I'm sure that intrusion
detection systems could be made to deal with this issue.
The other option of course is to not use cookieless
sessions under the anonymous user configuration and rely
on an in-memory cookie which is obviously a little less
accessible.
Cookieless sessions are just an alternative. If you're that worried about
them, don't use them. This is not a design flaw in ASP; this is just a
result of the technology that you're using and the way it works. If you
choose to use querystrings to identify users, it doesn't matter what kind of
server-side technology you use if you're catering to the cookie-paranoid
people.
In either situation though, this seems like
an incredible option to not provide ASP users.


I keep having flashbacks to "You are already logged into another
workstation" messages from Novell clients after your computer blue screens.
I don't know why, but I am. It's really foolish to build something into a
product that can often give false positives. What you're suggesting would
have that potential.

--

Ray at home
Microsoft ASP MVP

Nov 18 '05 #4
I replied to this on the other list, but thought I'd send it here as well.

We have used cookieless sessions and what you say is true, but we used SSL
to encrypt traffic, which as you know requires a connection to the same
client/server (ie. if connection broken, then the SSL session is invalid) so
this IP verification approach could still work but it assumes SSL, which of
course is really outside of ASP.NET's domain.

Further to this you could use client certs to verify integrity which
strictly doesn't stop people from hjacking a session (simply minimises it),
but there are just som many ways to approach this, each with positives and
negatives, that if the ASP.NET team adopted one approach, it would be
implicitly be advocating this one approach which may very well be flawed
under a number of different situations.

My 2 cents.

--
- Paul Glavich
"Keith" <ke***@keithadl er.com> wrote in message
news:7c******** *************** *****@phx.gbl.. .
This is predictable in an insecure product. I'm not
trying to act as if I discovered something new or Earth
shattering, but I am quite surprised there is nothing in
place in ASP.Net to protect user sessions from being
hijacked. It seems to me that the session IDs have been
problematic since ASP first came about. In ASP.Net they
are still for some reason handed out in a fashion that
means the same ID could be sent out to the same browser
even after a Session.Abandon (). It doesn't make sense
that Microsoft couldn't do something as simple as encrypt
the user agent and source IP into the session GUID if the
user wanted to lock the source and device of a request
down to a particular computer/network. From an
architectural standpoint I realize that this in itself
would add some overhead to IIS because every HTTP request
would have to be checked against a lookup, but with HTTP
keep-alives this check would only need to occur once on
the same connection. I also realize that someone could
use this to DoS a server by sending lots of HTTP requests
with random IDs that would have to decoded and matched up
against connections, but I'm sure that intrusion
detection systems could be made to deal with this issue.
The other option of course is to not use cookieless
sessions under the anonymous user configuration and rely
on an in-memory cookie which is obviously a little less
accessible. In either situation though, this seems like
an incredible option to not provide ASP users.
-----Original Message-----
It seems to me that this would be listed as a

predictable downside to using
cookieless sessions. Verifying IPs and/or user agents

wouldn't be any real
way to avoid this, so it makes sense to me that this

wouldn't be the default
behavior for asp.net to check that. And if it were to

check it, where would
it store this info? In session variables? Hmmph.

--

Ray at home
Microsoft ASP MVP
"Keith" <ke***@keithadl er.com> wrote in message
news:77******* *************** ******@phx.gbl. ..
I have found what I believe to be a serious security
issue in ASP.Net. If you have:

1. Your website configured for anonymous access
2. Elect under web.config to set the sessionstate
attribute of cookieless to true

Anyone from any IP address or across another browser can copy the URL and work within the session. My question
is "Why doesn't ASP.Net provide an option around ensuring all requests for a user session originate from the same
IP address and/or same useragent?" I know that some
people sit behind firewalls, proxies and layer 4 devices that could load balance and affect HTTP traffic, but it
honestly escapes me why I can access my web application
on any machine inside or outside of my network with just the sessionid in the URL from even different browsers.
There must be a way to control this in the
configuration. Am I alone in find this troubling?

.

Nov 18 '05 #5
Max
Yes, for testing purposes I've created a 10 line VB.NET program that simply
loops thru until it enters another user's session. It does work on a lot of
ASP.NET web sites that use cookieless sessions, but it's rather random and
you don't necessarily hit any confidential data. I'm not really sure what
the implications are. In any case, I don't use cookieless sessions for
authentication. lol!

-Max
"Keith" <ke***@keithadl er.com> wrote in message
news:77******** *************** *****@phx.gbl.. .
I have found what I believe to be a serious security
issue in ASP.Net. If you have:

1. Your website configured for anonymous access
2. Elect under web.config to set the sessionstate
attribute of cookieless to true

Anyone from any IP address or across another browser can
copy the URL and work within the session. My question
is "Why doesn't ASP.Net provide an option around ensuring
all requests for a user session originate from the same
IP address and/or same useragent?" I know that some
people sit behind firewalls, proxies and layer 4 devices
that could load balance and affect HTTP traffic, but it
honestly escapes me why I can access my web application
on any machine inside or outside of my network with just
the sessionid in the URL from even different browsers.
There must be a way to control this in the
configuration. Am I alone in find this troubling?

Nov 18 '05 #6

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

Similar topics

28
2805
by: grahamd | last post by:
Who are the appropriate people to report security problems to in respect of a module included with the Python distribution? I don't feel it appropriate to be reporting it on general mailing lists.
11
1802
by: TC | last post by:
Hello All, I have recently had the pleasure of installing Norton Internet Security 2005 and finding that I can no longer create or open a web-based application in Visual Studio .Net. The IDE just freezes. I tried fiddling with the configuration settings of the Norton Firewall but was not successful. I tried launching IIS from the Control Panel and it would not launch. I saw one article in Groups.Google from a previous post that the...
188
7259
by: christopher diggins | last post by:
I have posted a C# critique at http://www.heron-language.com/c-sharp-critique.html. To summarize I bring up the following issues : - unsafe code - attributes - garbage collection - non-deterministic destructors - Objects can't exist on the stack - Type / Reference Types
5
2793
by: Ken Cox [Microsoft MVP] | last post by:
MS has posted this here: http://www.asp.net/faq/ms03-32-issue.aspx Fix for: 'Server Application Unavailable' Error after Applying Security Update for IE ------------------------------------------------------------------------------- -
4
1131
by: Amir Ghezelbash | last post by:
Hi every one I have a major MAJOR MAJOR problem Ok I have been using cookies for my site for a while and now I have been trying to use session less cookies because I find them much faster Any way now the problem With session less cookies since ID is embedded within URL every time someone signs into their account and then logout if they send their link to someone else, that other person can login into their account without needing to...
9
5955
by: Tim Frawley | last post by:
I have converted a VB6 application to VB.NET. The old application made extensive use of the Clipboard for copying an Image Name so that it could be pasted into the image capture app when the user scans the image. My applications run as compiled assemblies from our Intranet server and I have setup a Main sub routine in the application with the following line: <STAThread()> Public Sub Main() Note: There is no timer in this application.
2
4759
by: Jef Driesen | last post by:
I'm working on a project where i need to exchange multidimensional data between C/C++ (row-major) and matlab (column-major). I understand the difference between those two mappings to linear memory. Suppose I need an S1 x S2 x ... x Sn dimensional array A. I can have the same layout in memory by reversing the dimensions: A... == A(Sn,...,S1) where I used the C/C++ notation for row-major and the matlab notation
10
1683
by: Richard MSL | last post by:
I am having problems working with .net security. I have been attempting to use the Microsoft .Net Framework 2.0 Configuration tool (version 2.0.50727.42), but it won't work for me. I have a simple test application that works, when I run to Manage Applications - View Assembly Dependencies, I get an error that says: Unfortunately, the .NET Framework Configuration tool cannot show this list of assembly dependencies for this application due...
1
3427
by: WebServiceSecurity | last post by:
The issue involves the following technologies: - 1. .NET 2.0 Framework 2. WSE2.0 (WS-Security) 3. X.509 certificates 4. BEA Weblogic 8.1.5
0
9687
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10482
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10225
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10027
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...
0
9072
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7564
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
6805
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
5585
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3759
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.