Forms authentication / cookies

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default Forms authentication / cookies

    Hi!

    I'm just curious about the use of cookies in forms authentication. The
    username and roles are stored in the encrypted cookie, but if a user manages
    to crack this cookie - will he be able to modify his own username and roles?
    Why doesn't ASP.NET simply use an ordinary session, with nothing but a
    session id to send to the client?


    Sincerely,
    Nils Magnus Englund


    Nils Magnus Englund Guest

  2. Similar Questions and Discussions

    1. Forms authentication then redirection to a secure web with NT authentication?
      Hi, I want to allow access to particular secured intranet web sites. These intranet are stored in sharepoint (2003 version) Actually I've...
    2. Problem with Forms Authentication cookies
      Hi, We're having an issue with Forms Authentication cookies being treated as expired / invalid, and being deleted. This is causing our intranet...
    3. Authentication ticket, cookieless, forms authentication?
      Hi. I want to use Forms Authentication, cookieless. The issue is setting the Authentication Ticket without using cookies (!) That is, the...
    4. Sharing Authentication cookies between 1.0 and 1.1
      Hello all, I am having a problem getting two IIS applications to share a single authentication cookie. One app uses the 1.0 Framework and other...
    5. Authentication cookies and Web services
      Hey. This is a newbie Q on web service authentication. I'm using a web service behavior to call a web service from the browser. This user has...
  3. #2

    Default Re: Forms authentication / cookies

    If you use forms attribute protection="All" in the web.config, there is
    little risk of someone being able to crack or modify their own cookie.
    However, if a user ever obtains the machine key, they can create a valid
    authentication cookie to authenticate as any user. For this reason you
    should always have ASP.NET auto generate the machine key (set in
    machine.config) rather than using a hard-coded key.

    A related issue is that if you do not use the machine key attribute
    IsolateApps in machine.config, a user could potentially create a cookie on
    web site and use that to authenticate to another on the same machine.

    ASP.NET does not maintain any session information on the server, and that
    definitely has an effect on security. There are problems with doing that,
    however, and I'm sure the ASP.NET team made a deliberate decision to do that
    based on managing all their priorites.

    I cover forms authentication and session tokens extensively in my new book,
    "Hacking the Code" (ISBN: 1932266658) which should be available later this
    month.


    Mark Burnett
    Windows Server MVP - IIS


    "Nils Magnus Englund" <nils.magnus.englund@orkfin.no> wrote in message
    news:Oe8Z5G4JEHA.3184@TK2MSFTNGP10.phx.gbl...
    > Hi!
    >
    > I'm just curious about the use of cookies in forms authentication. The
    > username and roles are stored in the encrypted cookie, but if a user
    manages
    > to crack this cookie - will he be able to modify his own username and
    roles?
    > Why doesn't ASP.NET simply use an ordinary session, with nothing but a
    > session id to send to the client?
    >
    >
    > Sincerely,
    > Nils Magnus Englund
    >
    >

    M. Burnett Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139