Linkedin Tag

Back to blog

What is an attack vector and what are hidden ones

Monday, July 15th, 2024

Updated September 4th, 2024
Carlo D'Agnolo's profile picture

Carlo D'Agnolo

Marketing & Growth

An attack vector in cyber security 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 potentially harvest user input, add extra code, hijack events, modify the page, tamper with other code, and contact external domains, possibly leading to data exfiltration.

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

  1. Spotting events as they happen.

  2. Being able to proactively stop cyberattacks before they’re executed.

c/side 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.

c/side 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. Our proxy doesn’t add latency, and even often optimizes script performance, enhancing load times.

Read more on how we compare to the others here or get started with c/side 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 monitor and block these changes. c/side 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, potentially leading 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 utilize 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.

By doing all of the above and being aware of potential hidden attack vectors, you can better protect yourself and your users from any problems. If you have any concerns related to third-party scripts, you can start with c/side for free and protect yourself in minutes.

Carlo D'Agnolo's profile picture

More About Carlo

I'm in charge of marketing & growth at c/side, educating companies and users on the web about the dangers of third-party scripts and the broader client-side security risks.