Skip to main content
Blog
Blog

What is an attack vector and what are hidden ones

An attack vector in cybersecurity is the way an attacker takes advantage of security weaknesses. Some are more obscure than others. One that's been our focus is third-party JavaScript. Since these scripts are installed by the website owner yet executed in the visitors' browsers, they're in a unique position. If something malicious occurs within these scripts, neither party is aware. The visitor is affected, and the website owner becomes liable. We've seen this too many times, for example, the

Jul 15, 2024 4 min read
What is an attack vector, common vs overlooked entry points

TL;DR: hidden client-side attack vectors

  • JavaScript is a vector: Attack vector conversations usually revolve around firewalls and phishing, but third-party JavaScript sits in the same privilege class as your own code and can harvest inputs, hijack events, and contact external domains while both you and the visitor stay unaware.
  • cside blocks, not just alerts: cside monitors 100% of third-party scripts and autonomously blocks malicious code before the browser renders it, rather than alerting you after execution the way most competing scanners do, and often serves approved scripts faster than a CDN.
  • Watched or just documented? Before your next security review, decide which hidden vectors, formjacking, session hijacking, clickjacking, DNS spoofing, or typosquatting, are being watched in real user browsers and which are only being covered by policy documents.

Short on time? See cside's in-browser Magecart and skimmer blocking. It covers everything below in one deployment.

An attack vector in cybersecurity is the way an attacker takes advantage of security weaknesses. Some are more obscure than others. One that's been our focus is third-party JavaScript.

Since these scripts are installed by the website owner yet executed in the visitors' browsers, they're in a unique position. If something malicious occurs within these scripts, neither party is aware. The visitor is affected, and the website owner becomes liable.

We've seen this too many times, for example, the British Airways Breach or more recently, the Polyfill incident.

A single attacker with bad intentions can harm thousands of businesses by breaking into a single component which is used as a dependency. Third-party code has the same privileges as internal code, allowing it to harvest user input, add extra code, hijack events, modify the page, tamper with other code, and contact external domains, which can lead to data exfiltration.

There are ways to protect your site against attacks from this angle. We've engineered our product cside to a degree where it's currently the strongest antidote possible by:

  1. Spotting events as they happen.
  2. Proactively stopping cyberattacks before they're executed.

cside does both, wrapped into one. We monitor 100% of 3rd-party scripts, and autonomously block malicious code before it gets rendered by the user's browser.

cside does:

  • Autonomous Blocking: We don't just alert you about potential threats. Our detection engine actively blocks suspicious scripts from loading, preventing any chance of attack before it reaches the end user.
  • Real-Time Monitoring: Every script request is monitored for anomalies. We track changes in script behavior and updates, instantly identifying and mitigating suspicious activities.
  • Optimization and Speed: We ensure that third-party scripts do not slow down your website. cside doesn't add latency, and even often optimizes script performance, enhancing load times.

Read more on how we compare to the othershere, or get started with cside in minutes, and for free.

Other hidden attack vectors

We've covered third-party scripts in some detail. What are some other common, yet more hidden, attack vectors found on websites?

Formjacking: This attack involves injecting malicious JavaScript code into payment forms to steal credit card information. It can go unnoticed for a long time, causing significant damage.

You can protect your site by securing coding practices and ensuring that forms are secure and validate input strictly, regularly scanning your site for unauthorized script changes, or continuously monitoring and blocking these changes. cside can help with that.

Session Hijacking: Attackers can steal session cookies to impersonate users and gain unauthorized access to their accounts. This is often achieved through methods like cross-site scripting (XSS) or sniffing unencrypted traffic.

Protect against this by always using HTTPS to encrypt data in transit, secure cookies with the HTTPOnly and secure flags, and implement short session timeouts and re-authentication methods.

Clickjacking: This technique tricks users into clicking on something different from what they perceive, which can lead to unauthorized actions or information disclosure.

You can mitigate the risks by using framebusting scripts to prevent your site from being framed and implementing the X-Frame Options header to protect your site from being embedded in iframes on other sites.

DNS Spoofing: DNS spoofing redirects traffic from legitimate websites to malicious ones. It can be used to steal sensitive information or spread malware.

Implement DNS Security Extensions (DNSSEC) to protect your DNS infrastructure, continuously monitor DNS records for unauthorized changes, and use secure DNS services.

Typosquatting: This involves registering domain names that are similar to legitimate ones, often used in phishing attacks.

Monitor similar domain registrations to at least know what's out there. DNSTwist is a free tool to do this. Also, educate your users about which domains you own and use.

If you have any concerns related to third-party scripts, you can start with cside for free and protect yourself in minutes.

Simon Wijckmans
Founder & CEO

Founder and CEO of cside. Previously a product manager on Cloudflare Page Shield (now Cloudflare Client-Side Security). Co-chair of the W3C Anti-Fraud Community Group and a Forbes 30 Under 30 honoree. Building accessible security against client-side attacks, web security is not an enterprise-only problem.

Monitor and Secure Your Third-Party Scripts

Gain full visibility and control over every script delivered to your users to enhance site security and performance.

Start free, or try Business with a 14-day trial.

cside dashboard interface showing script monitoring and security analytics
Related Articles
Book a demo

Want to walk through this with an engineer?

Thirty minutes, on your own site. Not a slide deck.

We'll show you:

Which third-party scripts are running on your site right now
Where you stand on PCI DSS 6.4.3 and 11.6.1
How much of your traffic is bots and AI agents

Rather just send a question?

Finding open slots…

Real humans only. We'd know.

Having trouble booking? Open scheduler in a new tab

What are you trying to solve?

Tell us in a line and we'll come back with something useful, not a generic pitch.

We usually help with:

Seeing which third-party scripts run on your site
PCI DSS 6.4.3 and 11.6.1 evidence
Bots, AI agents and account takeover

Prefer to just book a time? Pick a slot instead