Common Web Application Attacks & How to Prevent Them | Vooki Pro

Common web application attacks and quick steps to prevent them

Common Web Application Attacks & How to Prevent Them

The attacks that make the news are usually the largest or most sophisticated ones, but web applications of every size are attacked every day. The good news is that a small number of well-known attack types account for most incidents, and each has practical defences.

The most common attacks

SQL injection

Malicious SQL is inserted through form fields or parameters to read or change data in the database. With SQL injection, an attacker can obtain customer information such as passwords and contact details, change records such as prices, or destroy data.

Cross-site scripting (XSS)

The attacker injects code into the application that then runs in other users' browsers. XSS can be used to steal sessions and sensitive information, or to redirect users to malicious sites.

Distributed denial of service (DDoS)

Requests from thousands of addresses flood a site with traffic so the server cannot respond to real users. A DDoS attack can slow a site down or make it temporarily unavailable.

Cross-site request forgery (CSRF)

A logged-in user is tricked into opening a link or page that silently sends a request to your application using their session, for example to make a purchase or change account details.

Quick steps to prevent them

  • SQL injection: use parameterised queries for every database call, and give the application a database account with minimal privileges.
  • XSS: encode output for its context, validate input, and add a Content Security Policy.
  • DDoS: use a DDoS protection service or content delivery network, and apply rate limiting.
  • CSRF: use anti-CSRF tokens and SameSite cookies, and require confirmation for sensitive actions.
  • All of them: keep software up to date, and test your application regularly so you find the weaknesses before attackers do.

How Vooki Pro helps

  • Tests your application for each of these attacks automatically.
  • Gives remediation guidance for every finding.
  • Retest a finding after the fix to confirm the attack no longer works.

Frequently asked questions

What is the most effective single step?

Validating input and encoding output consistently prevents a large share of common attacks.

How do I know my defences work?

Test them: run a DAST scan after changes and retest each fix.

Try Vooki Pro free for 7 days

Check whether these attacks work against your application. The trial unlocks every feature for 7 days, and scanning runs on your own machine.

Get Vooki Pro →  ·  How to perform security testing (DAST)

Related: HTTP security headers: the essential list · Verifying security fixes with retesting