Tech Trivia

Daily Trivia - Session Cookie Impersonation Attack

Daily Trivia - Session Cookie Impersonation Attack

Linus Tech Tips, the king of tech channels with 15 million subscribers, got hacked! Can you believe it? How could this happen to such a tech-savvy superstar?

Well, let me tell you all about it. Linus explained that the attacker used a session cookie impersonation attack to take over his channel. Wait, what’s a session cookie, you ask? Let me give you an analogy.

Imagine you’re a foodie and you love going to this restaurant. The waiter there can never remember your name or your face, but the food is so good that you don’t mind reminding him what your favorite dish is every time you visit. One day, the restaurant announces a special promotion where you can pre-buy a large amount of meals at a discount. You ask the waiter, “Hey, don’t you have face blindness? How will you know who I am?” The waiter pulls out a notebook and hands you a membership card. You can bring the card next time, and he’ll cross off your purchase in the notebook.

So, you take the deal and now you have a membership card. In the same way, when the World Wide Web was first created, HTTP was designed as a stateless protocol, just like the forgetful waiter. HTTP won’t be able to keep track of any prior visit information, so the browser needs to remind the webserver every time you connect to the website. To solve this issue, we invented something called cookies, which act as membership cards. The website checks your cookie information and updates its own database to identify who you are.

But here’s the catch: the cookie is stored in plain text and unencrypted. Anyone can steal your membership card and spend all your meals, and the waiter will just comply with the request because he only recognizes the membership card.

When you sign in to your account on a website, the website stores a session cookie, so the next time you visit the website, you don’t need to log in again. But what if someone gets hold of that session cookie? Then they can access your account without even hacking your password. And that’s exactly what happened to Linus’s channel.

So, what should you do if this happens to you? Immediately change your password and sign out of all accounts. This will force the website to expire the session cookie and request you to enter your password and log in again. And please be extra careful when clicking on files sent via email, even if they’re Word or PDF files. Don’t open those files on a PC where your sensitive account login information is stored.

I hope you learned something exciting today! Stay safe out there.

Trivia Image