Nowadays many websites used internet cookies which is in fact a piece of code or a script that can store user data and other preferences, it usually cannot be executed by itself think of it like your personal secretary who manages all your daily routine, meetings, agenda, reports etc. Since everything are connected to the internet, could internet cookies turns into A.I. smart enough to silently track and gain access to a nuclear silo or tactical sub and fires a nuclear warhead at random?

  • 8
    $\begingroup$ You want to program an AI on javascript? Good luck with that. $\endgroup$ – Mr Scapegrace Jan 27 '17 at 7:18
  • 2
    $\begingroup$ No. Cookies themselves cannot turn into an AI. By whom? Who executes these cookies? $\endgroup$ – Alexander von Wernherr Jan 27 '17 at 7:20
  • 1
    $\begingroup$ @MrScapegrace Then they're still plain text. You also need an interpreter / executor to run the cookiecontent. And who'd download a evilAIinterpreter.zip? $\endgroup$ – Alexander von Wernherr Jan 27 '17 at 7:31
  • 9
    $\begingroup$ "which is in fact a piece of code or a script" this is false. By design they are not, and browsers and OSes got good enough at preventing them from being maliciously (ab)use them in such way. Other attack vendors are more cost effective. $\endgroup$ – Mołot Jan 27 '17 at 7:41
  • 1
    $\begingroup$ @SRM Think about Lawful Evil in D&D :-) $\endgroup$ – Alexander von Wernherr Jan 27 '17 at 14:26

I think you misunderstand cookies, or how powerful they are.
Cookies are not executed. They hold text-data, and that text-data is read.

Taken from Wikipedia:
A cookie consists of the following components:

Zero or more attributes (name/value pairs). Attributes store information such as the cookie’s expiration, domain, and flags (such as Secure and HttpOnly).

So, no code that can turn into an AI, at least not with current technology and cookies.


As pointed out in comments, cookies are not executable code. Therefore, they are not executed. Discussion on Information Security.SE here. The big takeaway is that a bug that allowed execution of cookies as code would be a very big deal in computer security terms. It is almost certain that such a bug does not exists in any of the major browsers.

Another relevant factor is that cookies are not that big. It would be hard to get enough code into a single browser using cookies to run an 'AI', before hitting the browser's cookie limits.

There are ways around all these things, but at that point you are talking about a plain ol' computer virus, or worm, or SkyNet or something. So the answer is, there is no real way to make a distributed AI work the way you are describing.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.