UGN Security

Do cookies have a TTL

Posted By: spectre

Do cookies have a TTL - 03/15/02 04:39 PM

Do cookies function with a TTL kinda the way a packet does over the internet. its sent to u then starts counting down to when it should delete itself (if thats what its supposed to do).

also, i have noticed that all cookies have

Cookie:[email protected]

Cookie being the focus here. I tried renaming something else (another file) to be Cookie:[email protected]______ but had a problem: cannot save files with a : in the name. Also, cookie seems to be considered a drive almost of its own. anyone have any ideas here?
Posted By: AK

Re: Do cookies have a TTL - 03/15/02 08:05 PM

cookies stay until you clear ur cache.
Posted By: spectre

Re: Do cookies have a TTL - 03/15/02 08:37 PM

hotmail cookies dont. or @ least they deactivate themselves.
Posted By: SilentRage

Re: Do cookies have a TTL - 03/16/02 02:43 PM

yes. Cookie's can be set to be set to delete themselves on a given date/time. They can be set as 'volatile' in which they get deleted when you close your browser. They can be set permenently as well.

All temporary files including cookies are special files. You cannot manipulate them in the normal way. If you want to modify them, I don't know how you can do it... easily (/me has the beginnings of a wicked idea if it's worth modifying a cookie - hrm, maybe for insecure websites). But usually, all you can do is delete them, or move/copy them to another location.
Posted By: dashocker

Re: Do cookies have a TTL - 03/17/02 10:24 PM

Posted By: SilentRage

Re: Do cookies have a TTL - 03/18/02 01:30 PM

Here's my "wicked idea" on how to modify a cookie:

Webserver Software (Get Apache!)
Some webdesign exp with modifying cookies
aaaaaaaaaaaand.. windows!

Alrighty, let's pick a target for testing purposes. How bout Great! Goto your hosts.sam file (modify any other hosts.x files found in your windows dir to be safe) and open it in Notepad. Add another entry for It's contents should now look like this: localhost

Reboot your computer so that the changes take effect.

Good! Install your webserver software if you don't already have it. Configure a site for Then make your index page to modify the cookie's contents. Run the webserver.

Now open your favorite web browser and connect to The cookie's contents have been changed!

Why does this work?

Well, this is how domains are usually resolved:

Program asks windows for the IP associated with a domain
Windows looks in the hosts file for the IP
If windows doesn't find it, it queries the DNS server for the IP

So when you changed the hosts file, now whenever you connect to - you are connecting to and your running webserver! Since IE sees that you're connecting to that domain, it modifies the proper cookie associated with that domain. You are PERFECTLY imitating that website.

Why is this worth your time?

Dunno. laugh But if a website was setup kinda weak, then maybe you can exploit some vulnerability by doing the unexpected and modifying the cookie.
© 2018 UGN Security Forum