Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Calling Cookie Experts...

Calling Cookie Experts...

Scheduled Pinned Locked Moved The Lounge
asp-netcomsysadminsecurityquestion
13 Posts 10 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    code frog 0
    wrote on last edited by
    #1

    So for like the Nth time I've wondered about browser based cookies. I read this article http://www.codeproject.com/aspnet/aspnetcookies.asp[^]which talks some about cookie management and I can see how cookies must be handled. But from a security standpoint. When I go to a site and someone cookies my browser what all can they do? I'm guessing you can store whatever data in the cookie you want. Like you could have: cookie.name //where this is the name of perhaps the day of the week. cookie.date //where this is the current date. cookie.server //where this is the I.P. of the server I mean you can probably save a bunch of stuff in a cookie but I imagine there is a size limit. So what can spyware guys do with cookies? Can they retreive information from you? When I tell a site (like CP) to remember me they are just writing my username and password to the cookie right? Could someone on another site (say I mis-typed the url and did code-project.com) check for that cookie and get my username and password? I'm mainly wondering this because cookies are a bit strange as a concept and I'm trying to learn more about them. Like they cannot automatically upload data to a site right? The page you visit has to know the cookies name and then request it... From a security perspective I'm just curious about cookies in general. Admittedly cookies are the least of my concerns (I hope) so call this a curiosity...

    Some assembly required. Code-frog System Architects, Inc.

    L R J A S 7 Replies Last reply
    0
    • C code frog 0

      So for like the Nth time I've wondered about browser based cookies. I read this article http://www.codeproject.com/aspnet/aspnetcookies.asp[^]which talks some about cookie management and I can see how cookies must be handled. But from a security standpoint. When I go to a site and someone cookies my browser what all can they do? I'm guessing you can store whatever data in the cookie you want. Like you could have: cookie.name //where this is the name of perhaps the day of the week. cookie.date //where this is the current date. cookie.server //where this is the I.P. of the server I mean you can probably save a bunch of stuff in a cookie but I imagine there is a size limit. So what can spyware guys do with cookies? Can they retreive information from you? When I tell a site (like CP) to remember me they are just writing my username and password to the cookie right? Could someone on another site (say I mis-typed the url and did code-project.com) check for that cookie and get my username and password? I'm mainly wondering this because cookies are a bit strange as a concept and I'm trying to learn more about them. Like they cannot automatically upload data to a site right? The page you visit has to know the cookies name and then request it... From a security perspective I'm just curious about cookies in general. Admittedly cookies are the least of my concerns (I hope) so call this a curiosity...

      Some assembly required. Code-frog System Architects, Inc.

      L Offline
      L Offline
      Luke Murray
      wrote on last edited by
      #2

      The browser will send the cookie back to any sites that match the domain set for it. when you create a cookie, you can say what domain/level it belongs to. i.e the cookie may below to codeproject.com so the browser will only send it to pages under that no code-project.com. You can also tell the cookie to be sent to any domain or do a sub folder only. So a site like code project would most likely store a hash of you user, password, maybe other things. which it matches against something on the server so the password is not just clearly stored in the cookie. (just guessing here). Each cookie is a key=value pair. Um... they also can have time limits, but again it's up to the browser to discard expired cookies, not you or the site. So really you hope your browser isnt doing anything dodgy. what else. Cookie get sent back to the page in the HTTP header. the page does not have to do anyting with it though. Ad site etc. could use them to track your spending habits. I.e you go the somesite.com they have ads thats are like now when your browser downloads someadserver.com/ad.page?1896287 they can set a cookie and then set the mime type to a jpeg to make the images display. so then next time you go to another site that uses the same adserver that cookie will be sent back, so they can identify you. Then if you ever click on an ad they could store that your 'cookie number' likes computer software, so next time you visit the ad server can display more software ads. Thats my understanding. Hope it helps, I wrote quick so there is most likely holes etc missing. Cheers, Luke

      1 Reply Last reply
      0
      • C code frog 0

        So for like the Nth time I've wondered about browser based cookies. I read this article http://www.codeproject.com/aspnet/aspnetcookies.asp[^]which talks some about cookie management and I can see how cookies must be handled. But from a security standpoint. When I go to a site and someone cookies my browser what all can they do? I'm guessing you can store whatever data in the cookie you want. Like you could have: cookie.name //where this is the name of perhaps the day of the week. cookie.date //where this is the current date. cookie.server //where this is the I.P. of the server I mean you can probably save a bunch of stuff in a cookie but I imagine there is a size limit. So what can spyware guys do with cookies? Can they retreive information from you? When I tell a site (like CP) to remember me they are just writing my username and password to the cookie right? Could someone on another site (say I mis-typed the url and did code-project.com) check for that cookie and get my username and password? I'm mainly wondering this because cookies are a bit strange as a concept and I'm trying to learn more about them. Like they cannot automatically upload data to a site right? The page you visit has to know the cookies name and then request it... From a security perspective I'm just curious about cookies in general. Admittedly cookies are the least of my concerns (I hope) so call this a curiosity...

        Some assembly required. Code-frog System Architects, Inc.

        R Offline
        R Offline
        Roger Wright
        wrote on last edited by
        #3

        Don't Panic. Cookies are text files - no executables there. They're also domain-specific; only the domain that created the cookie receives it. Cookies are an attempt to add state to a TCP connection which is, by definition, stateless. You can block them using settings in your browser, but that will create more overhead when you repeatedly visit the same site. "...a photo album is like Life, but flat and stuck to pages." - Shog9

        R 1 Reply Last reply
        0
        • C code frog 0

          So for like the Nth time I've wondered about browser based cookies. I read this article http://www.codeproject.com/aspnet/aspnetcookies.asp[^]which talks some about cookie management and I can see how cookies must be handled. But from a security standpoint. When I go to a site and someone cookies my browser what all can they do? I'm guessing you can store whatever data in the cookie you want. Like you could have: cookie.name //where this is the name of perhaps the day of the week. cookie.date //where this is the current date. cookie.server //where this is the I.P. of the server I mean you can probably save a bunch of stuff in a cookie but I imagine there is a size limit. So what can spyware guys do with cookies? Can they retreive information from you? When I tell a site (like CP) to remember me they are just writing my username and password to the cookie right? Could someone on another site (say I mis-typed the url and did code-project.com) check for that cookie and get my username and password? I'm mainly wondering this because cookies are a bit strange as a concept and I'm trying to learn more about them. Like they cannot automatically upload data to a site right? The page you visit has to know the cookies name and then request it... From a security perspective I'm just curious about cookies in general. Admittedly cookies are the least of my concerns (I hope) so call this a curiosity...

          Some assembly required. Code-frog System Architects, Inc.

          J Offline
          J Offline
          Jeremy Falcon
          wrote on last edited by
          #4

          I mean you can probably save a bunch of stuff in a cookie but I imagine there is a size limit. If memory serves me correct (and it hasn't been lately :)), it's 8K per cookie. At least on the older browsers. Could someone on another site (say I mis-typed the url and did code-project.com) check for that cookie and get my username and password? Nope. Cookies belong to the domain whether or not you specify it. From a security perspective I'm just curious about cookies in general. Admittedly cookies are the least of my concerns (I hope) so call this a curiosity... Information-wise, anything can be stored. They are often used to collect demographics about frequency of visits, what you like to shop for, etc. I'm sure there are some malicious uses, I just can't think of any off the top of my head. Jeremy Falcon

          1 Reply Last reply
          0
          • C code frog 0

            So for like the Nth time I've wondered about browser based cookies. I read this article http://www.codeproject.com/aspnet/aspnetcookies.asp[^]which talks some about cookie management and I can see how cookies must be handled. But from a security standpoint. When I go to a site and someone cookies my browser what all can they do? I'm guessing you can store whatever data in the cookie you want. Like you could have: cookie.name //where this is the name of perhaps the day of the week. cookie.date //where this is the current date. cookie.server //where this is the I.P. of the server I mean you can probably save a bunch of stuff in a cookie but I imagine there is a size limit. So what can spyware guys do with cookies? Can they retreive information from you? When I tell a site (like CP) to remember me they are just writing my username and password to the cookie right? Could someone on another site (say I mis-typed the url and did code-project.com) check for that cookie and get my username and password? I'm mainly wondering this because cookies are a bit strange as a concept and I'm trying to learn more about them. Like they cannot automatically upload data to a site right? The page you visit has to know the cookies name and then request it... From a security perspective I'm just curious about cookies in general. Admittedly cookies are the least of my concerns (I hope) so call this a curiosity...

            Some assembly required. Code-frog System Architects, Inc.

            J Offline
            J Offline
            Jeremy Falcon
            wrote on last edited by
            #5

            Oh, and if you intend to work with cookies on the client (the old-fashioned way) with JavaScript, then use my code and vote me a gazillion 5s. :laugh: http://www.codeproject.com/jscript/parse.asp[^] If there's a bug in it, just blame someone else (kidding). Jeremy Falcon

            1 Reply Last reply
            0
            • C code frog 0

              So for like the Nth time I've wondered about browser based cookies. I read this article http://www.codeproject.com/aspnet/aspnetcookies.asp[^]which talks some about cookie management and I can see how cookies must be handled. But from a security standpoint. When I go to a site and someone cookies my browser what all can they do? I'm guessing you can store whatever data in the cookie you want. Like you could have: cookie.name //where this is the name of perhaps the day of the week. cookie.date //where this is the current date. cookie.server //where this is the I.P. of the server I mean you can probably save a bunch of stuff in a cookie but I imagine there is a size limit. So what can spyware guys do with cookies? Can they retreive information from you? When I tell a site (like CP) to remember me they are just writing my username and password to the cookie right? Could someone on another site (say I mis-typed the url and did code-project.com) check for that cookie and get my username and password? I'm mainly wondering this because cookies are a bit strange as a concept and I'm trying to learn more about them. Like they cannot automatically upload data to a site right? The page you visit has to know the cookies name and then request it... From a security perspective I'm just curious about cookies in general. Admittedly cookies are the least of my concerns (I hope) so call this a curiosity...

              Some assembly required. Code-frog System Architects, Inc.

              A Offline
              A Offline
              Aamir Butt
              wrote on last edited by
              #6

              [sniff] Programming Question [/sniff] BTW, thanx for the topic. Web programming has always been an unseen land for me, so any info about it is good for me. Can't help you though :( Regards, Aamir

              C P 2 Replies Last reply
              0
              • C code frog 0

                So for like the Nth time I've wondered about browser based cookies. I read this article http://www.codeproject.com/aspnet/aspnetcookies.asp[^]which talks some about cookie management and I can see how cookies must be handled. But from a security standpoint. When I go to a site and someone cookies my browser what all can they do? I'm guessing you can store whatever data in the cookie you want. Like you could have: cookie.name //where this is the name of perhaps the day of the week. cookie.date //where this is the current date. cookie.server //where this is the I.P. of the server I mean you can probably save a bunch of stuff in a cookie but I imagine there is a size limit. So what can spyware guys do with cookies? Can they retreive information from you? When I tell a site (like CP) to remember me they are just writing my username and password to the cookie right? Could someone on another site (say I mis-typed the url and did code-project.com) check for that cookie and get my username and password? I'm mainly wondering this because cookies are a bit strange as a concept and I'm trying to learn more about them. Like they cannot automatically upload data to a site right? The page you visit has to know the cookies name and then request it... From a security perspective I'm just curious about cookies in general. Admittedly cookies are the least of my concerns (I hope) so call this a curiosity...

                Some assembly required. Code-frog System Architects, Inc.

                S Offline
                S Offline
                S Douglas
                wrote on last edited by
                #7

                code-frog wrote:

                cookies are the least of my concerns (I hope) so call this a curiosity...

                If you’re bored Wiki[^]


                ZeePain! wrote:

                This seems like one of those programs that started small, grew incrementally, building internal pressure, and finally barfed all over its source code sneakers. Or something.

                thedailywtf.com[^]

                1 Reply Last reply
                0
                • R Roger Wright

                  Don't Panic. Cookies are text files - no executables there. They're also domain-specific; only the domain that created the cookie receives it. Cookies are an attempt to add state to a TCP connection which is, by definition, stateless. You can block them using settings in your browser, but that will create more overhead when you repeatedly visit the same site. "...a photo album is like Life, but flat and stuck to pages." - Shog9

                  R Offline
                  R Offline
                  roel_
                  wrote on last edited by
                  #8

                  Cookies are an attempt to add state to a TCP connection which is, by definition, stateless. I'm taking it you meant to say "HTTP" where it says "TCP"?

                  R 1 Reply Last reply
                  0
                  • R roel_

                    Cookies are an attempt to add state to a TCP connection which is, by definition, stateless. I'm taking it you meant to say "HTTP" where it says "TCP"?

                    R Offline
                    R Offline
                    Roger Wright
                    wrote on last edited by
                    #9

                    Yup. It was really late...:sigh: "...a photo album is like Life, but flat and stuck to pages." - Shog9

                    1 Reply Last reply
                    0
                    • C code frog 0

                      So for like the Nth time I've wondered about browser based cookies. I read this article http://www.codeproject.com/aspnet/aspnetcookies.asp[^]which talks some about cookie management and I can see how cookies must be handled. But from a security standpoint. When I go to a site and someone cookies my browser what all can they do? I'm guessing you can store whatever data in the cookie you want. Like you could have: cookie.name //where this is the name of perhaps the day of the week. cookie.date //where this is the current date. cookie.server //where this is the I.P. of the server I mean you can probably save a bunch of stuff in a cookie but I imagine there is a size limit. So what can spyware guys do with cookies? Can they retreive information from you? When I tell a site (like CP) to remember me they are just writing my username and password to the cookie right? Could someone on another site (say I mis-typed the url and did code-project.com) check for that cookie and get my username and password? I'm mainly wondering this because cookies are a bit strange as a concept and I'm trying to learn more about them. Like they cannot automatically upload data to a site right? The page you visit has to know the cookies name and then request it... From a security perspective I'm just curious about cookies in general. Admittedly cookies are the least of my concerns (I hope) so call this a curiosity...

                      Some assembly required. Code-frog System Architects, Inc.

                      M Offline
                      M Offline
                      Marc Clifton
                      wrote on last edited by
                      #10

                      code-frog wrote:

                      So for like the Nth time I've wondered about browser based cookies.

                      I must be thinking of something else. I thought you were asking about brownies and baked cookies. :) Marc VS2005 Tips & Tricks -- contributions welcome!

                      G 1 Reply Last reply
                      0
                      • A Aamir Butt

                        [sniff] Programming Question [/sniff] BTW, thanx for the topic. Web programming has always been an unseen land for me, so any info about it is good for me. Can't help you though :( Regards, Aamir

                        C Offline
                        C Offline
                        code frog 0
                        wrote on last edited by
                        #11

                        Not a programming question though (here) it easily could be. I am a network administrator for several small businesses and one in particular has some interesting questions for me on security and they were wondering about cookies. I recommended "The Cookie Lady" they accused me of being "baked" and then I realized they meant browser cookies so I came here thinking programming-dorks will know if anybody does... I'm actually baking a browser cookie to take over the world. It will be a super-cookie made up of smaller cookies called "chips". My cookie will infect the world with cookie-lust and snow storms. Yeah, you caught me. I've been reading way to much Calvin & Hobbes lately. Just can't help myself... Calvin's my hero.:) It used to be Shog but then I saw where he made a programming mistake and admitted it publicly. I didn't know Shog made mistakes so now he's 2nd on "The All Time Hero List" and Calvin is back at #1.:cool:

                        Some assembly required. Code-frog System Architects, Inc.

                        1 Reply Last reply
                        0
                        • A Aamir Butt

                          [sniff] Programming Question [/sniff] BTW, thanx for the topic. Web programming has always been an unseen land for me, so any info about it is good for me. Can't help you though :( Regards, Aamir

                          P Offline
                          P Offline
                          peterchen
                          wrote on last edited by
                          #12

                          Aamir Butt wrote:

                          Programming Question

                          IMO not in the sense it is used here in "no programming questions". It is a pity that the "programming Question" ban seems to purge all technical topics from the lounge.


                          We say "get a life" to each other, disappointed or jokingly. What we forget, though, is that this is possibly the most destructive advice you can give to a geek.
                          boost your code || Fold With Us! || sighist

                          1 Reply Last reply
                          0
                          • M Marc Clifton

                            code-frog wrote:

                            So for like the Nth time I've wondered about browser based cookies.

                            I must be thinking of something else. I thought you were asking about brownies and baked cookies. :) Marc VS2005 Tips & Tricks -- contributions welcome!

                            G Offline
                            G Offline
                            Gary Wheeler
                            wrote on last edited by
                            #13

                            Marc Clifton wrote:

                            brownies and baked cookies

                            You would say that as I finish my salad for lunch (Mr. Waistline hasn't been a good boy lately :sigh:).


                            Software Zen: delete this;

                            1 Reply Last reply
                            0
                            Reply
                            • Reply as topic
                            Log in to reply
                            • Oldest to Newest
                            • Newest to Oldest
                            • Most Votes


                            • Login

                            • Don't have an account? Register

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • World
                            • Users
                            • Groups