Cookies are an integral part of our online lives, yet they’re notoriously misunderstood. Some people think cookies are like spyware, some think they’re just used to pester you with pop-ups, and others think cookies are automatically malicious.
Let’s put an end to fear-mongering myths, and have a look at cookies, what they do, and why you should never let cybercriminals get their hands on your cookies. Cookie theft is known as cookie hijacking, and it spells disaster. Cookies are a gateway to your personally identifiable information, and anyone who has them can access your accounts.
The cybercriminal gang Lapsus$ Group made headlines in March 2022 when they used an InfoStealer malware variant to break into Vodafone Portugal’s systems. The variant accessed browser information, and used cookies to obtain employee credentials and bypass two-factor authentication. Luckily, the attackers didn’t leak any customer data, but they did steal internal source code.
Cybersecurity experts believe the Lapsus$ Group used the same tactic on NVIDIA’s systems to obtain certificates and steal employee information, as well as screenshots of source code. It’s clear cookie theft is an ongoing threat, and you need to protect yourself from it. Read on to find out what cookies are, how cybercrooks steal them, and how you can prevent cookie theft.
What Are Computer Cookies?
Before we dive in into cookie hijacking, let’s make sure we’re all familiar with cookies. They make us all think of the popular sweets, but computer cookies are actually an essential part of the digital world. They’re known under many names, including:
- 🍪 HTTP (Hypertext Transfer Protocol) cookie
- 🍪 Internet cookie
- 🍪 Web cookie
- 🍪 Computer cookie
- 🍪 Browser cookie
No matter what you call them, cookies store information your web browser saves. More specifically, they store the packets of data your device receives, and then send them back without altering them. Every time you visit a website, it places a cookie on your web browser. This helps the site remember you, your preferences, your account, and the ads you see, among other things.
Cookies can be broken into different categories.
|Group||Type of cookie|
|Lifespan||Session/temporary cookiesPermanent/persistent cookies|
|Domain||First-party cookiesThird-party cookies|
Let’s dive into more details.
Session cookies are sometimes called temporary cookies because they’re not designed to retain information for very long. Websites know to remember you every time you jump between web pages by using session cookies.
Session cookies only remember your information as long as you’re on a website. These cookies are never stored locally on your device. Once you close the tab, the cookies are deleted because they contain sensitive information about you, so they could pose a security risk.
Persistent cookies are meant to make surfing the world wide web more convenient. They remember your settings, preferences, passwords, and any other details with a Save or Remember pop-up.
While session cookies are automatically deleted after you close the tab, persistent cookies have an expiration date determined by the webserver. Only then does the owner destroy the cookie. Otherwise, persistent cookies are stored locally on your device, even if you close the browser or your device. You can, however, manually delete persistent cookies.
Any domain can store its own cookies. These are known as first-party cookies. They’re essential for the website’s performance, and because of this they’re active by default. Your browser won’t even let you disable or delete first-party cookies.
Only the website owner can access the information stored in these cookies, since they aren’t shared with vendors or advertisers. They generally store information about the web page’s performance, but can also contain your account details, language settings, shipping address, and other personally identifiable information.
First-party cookies only track you on the domain they were created. They’ll stop once you leave the website.
Third-party cookies are almost the same as first-party cookies, with one notable difference: they track you across all third-party domains that use the same tracking code. They’re primarily used to create targeted ads.
Let’s say you’re an avid bookworm. You regularly log in to Goodreads, follow the likes of Stephen King or Suzanne Collins on Twitter, and read the news on Kindle Unlimited. Third-party cookies track your activity across these different sites, which lets advertisers give you book ads on any ad-supported platforms like Instagram or YouTube.
Some browsers, including Firefox and Chrome, let you disable third-party cookies.
A supercookie is a type of tracking cookie. It contains a unique identifier header (UIDH), which your internet service provider (ISP) injects into your connection. Supercookies sit at a sweet spot between your device and the server you’re connected to.
Since a supercookie isn’t stored locally, you can’t delete it or otherwise modify it. Ad blockers or scripts are also powerless to disable supercookies. This is how your ISP can monitor your online browsing habits, no matter how often you clear your history.
Supercookies pose a huge security risk. If malicious actors get their hands on them, your browsing history will essentially be exposed. This is why in 2016, the Federal Communications Commission (FCC) hit telecom company Verizon with a $1.35 million fine for tracking its customers through supercookies and invading their privacy.
You can normally delete cookies. In fact, it’s recommended to do that regularly. Some tracking cookies aren’t easy to remove though. Dubbed zombie cookie, this cookie uses vulnerabilities in Adobe® Flash Player to restore itself after deletion. That’s why it’s sometimes called a Flash cookie.
Flash cookies are bigger than regular HTTP cookies. They’re also not stored in your browser, but in the Adobe® Flash directory, which makes them harder to detect. This is also why it’s very hard to delete them. Just like fictional zombies, zombie cookies are resurrected from death and will follow you for brains… or more specifically how your brain does stuff online. Yeah, that was a bad joke, but they do monitor you relentlessly!
This might seem like a lot to take in at a first read, so here’s a handy TL;DR recap for you.
|Cookie type||Purpose||Used by||Stored locally on your device|
|Session cookie||To remember the account you used to log in.To remember account-relevant details like your shopping cart and preferred language.||Online storesSocial media websitesForumsNews sitesBlogs (with comment sections)Competition websitesOnline banking||❌Session cookies are deleted after you close the tab|
|Persistent cookie||To remember passwords, preferences, and settings you save.||Google servicesAnalytics toolsSocial media websitesOnline storesOnline banking||✔️|
|First-party cookie||To measure a site’s performance, crashes, and other session data.To remember your preferences, like language and light or dark mode.||Any website can use first-party cookies||✔️|
|Third-party cookies||To help advertisers and analytics companies give you targeted ads and measure performance.To measure your online behavior for analytics, studies, or research.||Advertising pop-upsAnalytics toolsTracking toolsAd-supported websites||✔️|
|Supercookie||To monitor your browsing habits.||Your ISP||❌Supercookies are stored on your ISP’s servers.|
|Zombie cookie||To re-create other types of cookies.To monitor your activity even after you deleted cookies.||Web analytics toolsAdvertisersOnline stores||✔️|
With the amount of data contained in cookies, it’s no wonder cybercrooks want to steal them.
You can use CyberGhost VPN’s private browser for Windows to secure your online browsing and prevent unnecessary cookies and trackers. That limits the potential cookie data attackers can steal from you. On top of that, our private browser is regularly updated with the latest security features.
What Is Cookie Hijacking?
Cybercriminals can use your cookies to learn more about you and profit from your private details, so they’ll try to steal them. This type of attack is called cookie hijacking, cookie side-jacking, or session hijacking.
But before we go into detail about session hijacking, let’s see exactly how sessions and cookies work.
Every time you log in to an online account, the host’s server verifies your credentials and assigns you a session ID. You’ll usually see this ID in your URL as a string of numbers and/or letters. Sometimes it can include special characters. It can look something like this.
The session is active while you’re logged in. If you close the tab or log out, you’ll automatically delete your session cookies.
Having your own session ID is very useful. It lets you quickly and conveniently navigate web pages, but comes with security risks. A session ID is uniquely assigned to you, so if anyone can get their hands on it, they can impersonate you and log in to your account. Your session cookies contain your session ID, so that’s why cybercriminals are after these cookies.
There are 5 types of attacks cybercrooks use to steal your cookies.
- Brute force attacks
- Malware injections
- Cross-site scripting
- Packet sniffing
- Session fixation
Let’s go through them one by one.
Brute Force Attacks
Brute forcing is one of the oldest ways to compromise digital information. It involves guessing each individual character of your session ID string. As you can imagine it takes a while to carry out a brute force attack.
Some websites generate session IDs using predictable things like your IP address or your current time. This makes them easier to guess. Some websites also don’t use encryption protocols like TLS (Transport Layer Security) or SSL (Secure Sockets Layers), so snoopers can eavesdrop on your activity and hijack your session.
Some malware is programmed to spy on your traffic. The most famous ones are spyware and stalkerware, but adware, worms, and some ransomware variants can also monitor you.
For as long as a malicious code monitors your browser, it can copy your cookie information. That’s often how cybercriminals get their hands on your session ID.
As recently as 2021, Google’s Threat Analysis Group disrupted a malware campaign that targeted YouTube creators to steal their cookies. According to Google’s team, attackers used cookies to bypass multi-factor authentication (MFA).
Attackers use cross-site scripting (XSS) attacks to fool your device into executing malicious code. You won’t see any warnings or notices because the attack tricks your device to recognize the traffic as coming from a trusted server. When the script runs, attackers steal your cookies.
The most common example is attackers sending email with links to a trusted website that contains a malicious HTTP query parameter. It would look something like this:
Since you’ve used your trusted bank so many times, you tend to overlook the http part (it should be https) and you likely won’t know what the script parameter is. As soon as you click on the link, you compromise your cookies.
Attackers can use a packet sniffer to snoop on your session. A packet sniffer is software that lets you analyze and monitor network traffic. Network administrators often use it to diagnose issues, prevent the spread of malware and viruses, and clean up malicious code.
Cybercriminals use packet sniffers to spy on you and steal your browsing information. First they need to trick you into downloading the sniffer. They generally target organizations and corporations, but no one is really safe from cyber attacks.
This type of attack takes place most commonly on public Wi-Fi networks. Generally, these networks only use encryption on login pages. This means snoopers can’t see your password, so they resort to stealing your cookies, and get your session ID from there. Java apps like CookieCadger or DroidSheep make it child’s play for cybercrooks to sniff your traffic.
All web-based apps that create a session will use a management tool they store on a server. The attackers exploit your system’s vulnerabilities to hijack your session. They create a session and fixate a session ID for you. This way, they don’t need to steal your session ID to get your account details, they just need you to log in.
Attackers commonly pair session fixation with phishing scams. As soon as you click on a phony link, you’ll open the server’s login page in the browser. Because the attacker already fixated your session ID, the web app won’t create another one for you. The attacker can then easily get into your account.
Protect Your Online Sessions
No matter what type of attack cybercriminals prefer, the end result is always bad news for you. You need to put a stop to cookie theft and protect your browsing session.
1. Delete Your Cookies
The easiest way to protect yourself from cookie theft is by deleting them. Seems easy enough, right? Well, according to a study by JupiterResearch, only 17% of US internet users regularly clear their cookies.
I get that cleaning cookies is not very fun. It can also get a bit iffy. Do I also delete my browsing history? Cached images? Yeah, it’s a headache. Luckily, CyberGhost Cookie Cleaner exists.
Here’s how it works.
- Download CyberGhost Cookie Cleaner for free
- Choose what you want to delete
- Clear your cookies
It’s that easy. Other key features include:
- 🍪 A quick one-click clearing option
- 🍪 The option to create your own exception list
- 🍪 Complete removal of any type of website data
- 🍪 Improving your online anonymity by deleting trackers
2. Enforce HTTPS Connections
HTTP stands for Hypertext Transfer Protocol. The S at the end of HTTPS stands for Secure. Translate that to encryption, and you’ll see why you need HTTPS for your daily browsing.
HTTP connections make it laughably easy to steal cookies. It’s true that HTTP isn’t as common nowadays, but you should still be careful when you click links on social media, private messages, or emails. Shortened URLs can also be deceptive.
Make a habit of hovering over links before you click on them. This can reveal some nasty surprises.
You can see the real link leads to a fishy HTTP site. It’s most likely a phishing site or malware, so don’t click on suspicious links.
If you use CyberGhost VPN, you won’t have to worry about HTTP sites again. Simply use the option to automatically redirect your traffic to HTTPS. But if you visit a phishing site and enter your information voluntarily, cybercriminals can still steal your data.
3. Encrypt Your Data with CyberGhost VPN
Encryption is the best way to prevent cookie theft. HTTPS trumps HTTP when it comes to safety, but you can err on the side of caution and encrypt all your traffic.
A VPN is a great anonymization tool. CyberGhost VPN hides your IP address and redirects your traffic through an encrypted tunnel. This adds a layer of security and privacy to your connection.
[Embed: What is a VPN? The Ultimate, Easy-to-Understand Video Explanation | CyberGhost VPN]
CyberGhost VPN uses 256-bit AES encryption, the same one used by governments worldwide to protect sensitive national information. It makes your information indecipherable to anyone else but you. This way, cybercriminals won’t be able to steal your cookies or hijack your session.
4. Avoid Unsecure Wi-Fi Networks
Public Wi-Fi networks seem awfully convenient, but they pose a huge risk to your privacy. In order to be accessible to a general audience, public Wi-Fi has minimal security settings. Cybercriminals know this, which is why open Wi-Fi is a minefield of cyber threats. The most common ones include:
- 🍪 Network sniffing
- 🍪 Traffic monitoring
- 🍪 Man-in-the-Middle attacks
- 🍪 Malware infections
- 🍪 Cookie hijacking or session hijacking
If you have no other choice but to use an open network, you need to connect to CyberGhost VPN first. CyberGhost VPN hides your IP address and encrypts your connection. This will keep you safe on unsecured networks, because it makes your data unreadable to third parties. Cybercriminals will see your traffic as gibberish and won’t be able to steal your cookies or spy on you.
5. Use a Good Antivirus
Some types of malware like spyware or adware monitor your browsing session. They can also steal your cookies and hijack your session. It’s best to stop them in their tracks with an antivirus. Regularly run scans to make sure your system is safe, and never ignore potential threats. Immediately quarantine suspicious files.
If you’re on Windows, you can pair a VPN with an antivirus in the same app. Add the CyberGhost Security Suite to your VPN subscription (for free!) and get a world-class anti-malware and antivirus solution.
[Embed: CyberGhost SecuritySuite (VPN + Antivirus + Privacy Guard)]
Stay protected against all manner of cyber threats including:
- 🧹 Malware
- 🧹 Trojans
- 🧹 Spyware
- 🧹 Adware
- 🧹 Ransomware
You’ll also get access to our Security Updater to manage all your apps’ updates for you. It automatically notifies you of potentially outdated apps and when new security patches are available.
6. Don’t Click on Suspicious Links
Emails, private messages, social media posts, and even SMS contain links nowadays. This makes people less vigilant about where they click, and it’s a bad habit you need to break. Try to hover over the link until you get a preview. Then you can check for these 4 classic warning signs.
- 🚨 The link is HTTP not HTTPS
- 🚨 The link contains typos, like www.paypall.com instead of www.paypal.com
- 🚨 The link comes with an alarmist message like Your payment didn’t go through or Your account has been breached
You can also use an online URL checker to see if it was flagged for malware, but keep in mind these services aren’t always 100% accurate.
The (Not So Sweet) Bottom Line
Cookies make our daily surfing more convenient, but they hold a lot of private information. Anything that contains personally identifiable information is irresistible to cybercriminals who want to get their hands on your data. They’ll try to steal your cookies.
Of all the cookies we’ve discussed, cybercriminals want your session cookies the most. Session cookies contain your session ID which uniquely identifies your account every time you log in to an online service. If they get your session ID, they can compromise your account.
Cybercriminals are always experimenting with ways to steal your cookies, including attacks like:
- Brute force attacks
- Malware injections
- Cross-site scripting
- Packet sniffing
- Session fixation
Because there are 5 different types of attacks, you need to take multiple steps to protect yourself from these threats.
Start by using CyberGhost’s 3-in-1 cookie cleaner that lets you delete your cookies with just one click. Then you can keep sniffers and spies away with CyberGhost VPN’s military grade encryption and secure private browser. Lastly, use the Security Suite to protect yourself from malware, viruses, and other cyber threats.
Don’t let anyone get near your cookies ever again. Unless you bake them, of course!
What is cookie hijacking?
Cookie hijacking is a type of attack in which cybercriminals steal your session cookies. Session cookies are server-specific cookies that remember your information as long as you are logged into an account on a website. This attack is also called session hijacking, because attackers are after your session ID, which uniquely identifies you on the website’s servers.
By stealing your session ID from your cookies, they can log in to your accounts. Depending on what account they target, they can compromise your digital identity and financial security. Consider using a VPN like CyberGhost to secure your connection with military-grade encryption.
What can cybercriminals do with cookies?
Cookies can store a lot of your personal information, like your IP address, your username and/or password, your payment information, and many more. When cybercriminals steal them, they can compromise your accounts. If they compromise your social media accounts, they can impersonate you, and if they compromise your financial accounts, you’ll lose your hard-earned money.
Protect yourself by encrypting your traffic with CyberGhost VPN. We’ll hide your browsing activity and your cookies behind an impenetrable shield and keep you safe from cybercrooks. Try us out risk-free with our 45-day money-back guarantee.
Is cookie manipulation the same as cookie hijacking?
The two aren’t quite the same, but they’re closely related. Cookie hijacking is an attack in which cybercriminals steal your session cookies. Session cookies contain your session ID which is essentially what lets you log in to an online service. Cookie manipulation is the process through which they then forge cookies using your session ID to log in to your accounts.
You can protect yourself by regularly deleting your cookies. Use CyberGhost Cookie Cleaner for a quick one-click solution.
Does a VPN protect from cookie hijacking?
Yes. You can use CyberGhost VPN to redirect your traffic through an encrypted tunnel. This keeps your online activity away from prying eyes. If it’s impossible for snoopers to intrude on your sessions, it’s impossible for them to steal your cookies. CyberGhost VPN is also great for protecting your devices on unsecured open Wi-Fi networks and keeping traffic sniffers at bay.
Leave a comment
Posted on 11/01/2021 at 08:44
Posted on 11/01/2021 at 10:33
Hi, Zin Lay! Hope you’re enjoying our articles. 🙂