r/code • • Dec 28 '21

Help please! Amazon hidden joke

found this on amazon html:

<!--       _
       .__(.)< (MEOW)
        ___)   
 ~~~~~~~~~~~~~~~~~~-->
<!-- sp:eh:jXMpHJh2wgfeCJnrJ/TQYmrT3DmN6PSf0Wz/FQYEEN8JfthmoOHZpnivzftzy3dgfoiFmbZIv0YP63qv/9/+dJ6LyPriqCH290CEWRauPlwTNP6C4RePFg== -->

clearly a duck cat... but what about the text below... looks like a hidden funny message. If anyone can tell us what its saying that would be great.

12 Upvotes

7 comments sorted by

6

u/wikes82 Dec 28 '21

it just randomly generated session key

3

u/costargc Dec 28 '21

😔here I was hopping for some cool Easter eggs

4

u/PM_ME_WITTY_USERNAME Dec 28 '21

Edit your post and mangle the session key

People use Google and Bing to crawl the web for people's session keys

If someone uses it to log on amazon they have access to a lot

1

u/costargc Dec 29 '21

Now I’m curious. What info can we get out it and how?

4

u/PM_ME_WITTY_USERNAME Dec 29 '21

You go on Amazon. You are unlogged.

To Amazon, you are nothing except an IP address. But your brother or your boss could be also browsing Amazon under the same IP address as you because you both are in the same building under the same network.

The issue is that if you add something to your cart, Amazon is going to needs to display the little "1 item in the cart" in the top right corner every time you refresh a page. They'd also like to now which items you've browsed, to remind you of them later. But if they only have your IP, do they just display that to everyone who has your IP address ?

So if your boss adds something to his cart suddenly you can see what's in the cart!

That's a privacy problem

To solve this, when Amazon (and every website since 1995) begins a conversation with you, it gives you a random number called a session key. It's going to be your identification number

Every time you send a request to Amazon, the session key is also sent with it. That way, Amazon can remember you with something other than your IP address

This is used on every website on the planet that is more complicated than "static content" (content that is the same for everyone. So, something like a blog)

If I happened to know your session key, what I could do is go on amazon, replace my session key with your session key in my cookies, and suddenly I'm logged in as you for the reminder of my session.

I won't be able to get your password, but I'll be logged in as you just the same. I'll have access to your credit card and I'll be able to make small purchases as well as change your password to keep your account for tomorrow

Just so you know, I looked it up and this thing isn't a session key. But it's a secret nonetheless and who knows what amazon uses it for

1

u/aykay55 Jan 10 '22

I don’t think sessions keys are stored in HTML are they? I thought there is a JS or similar script that checks the key within a cookie stored in your browser. If it’s not there it creates one for you.

1

u/PM_ME_WITTY_USERNAME Jan 10 '22 edited Jan 10 '22

Yeah you likely rather have a set-cookie in http requests, most do that.

But if there's a weird base64 value with high entropy called "key" somewhere in a meta tag of the html and you don't know what it does it's just wise to mangle it before copy pasting it online