AxonITech AxonITech
Ex Swiss IT Gruppe
About Us Services Why Choose Us Contact Review FAQ Blog info@axonitech.com
Security Jan 8, 2026 10 min read

How to Perform a Website Security Audit in 2026: A Step-by-Step Guide

A comprehensive step-by-step guide to performing a website security audit. Covers SSL configuration, header security, vulnerability scanning, database security, and creating a remediation plan.

By AxonITech Team

A website security audit is not a luxury. It is a necessity. Every week brings news of another breach --- stolen customer data, defaced websites, ransomware attacks on small businesses. The uncomfortable truth is that most of these incidents exploit known vulnerabilities that a routine audit would have caught.

Whether you manage a small business website or a complex web application, this guide walks you through a comprehensive security audit process using industry-standard tools and methodologies.

Why Regular Security Audits Matter

The threat landscape evolves constantly. A website that was secure six months ago may have newly discovered vulnerabilities in its CMS, plugins, server software, or dependencies. Regular audits help you:

  • Identify vulnerabilities before attackers do --- Proactive detection is orders of magnitude cheaper than incident response
  • Maintain compliance --- PCI DSS, GDPR, HIPAA, and SOC 2 all require regular security assessments
  • Protect customer trust --- A single data breach can permanently damage your reputation
  • Reduce insurance premiums --- Many cyber insurance policies offer better rates for businesses with documented audit processes
  • Catch configuration drift --- Server settings and permissions change over time, often in ways that introduce risk

We recommend conducting a full audit quarterly, with automated scanning running continuously.

Step 1: SSL/TLS Configuration Review

SSL/TLS is your first line of defense for data in transit. A misconfigured certificate is not just a security risk --- it also hurts your SEO rankings and triggers browser warnings that drive visitors away.

What to Check

  • Certificate validity --- Is it expired or nearing expiration?
  • Certificate chain --- Is the full chain (root, intermediate, leaf) properly installed?
  • Protocol versions --- TLS 1.2 and 1.3 should be the only enabled protocols. TLS 1.0 and 1.1 are deprecated and must be disabled.
  • Cipher suites --- Weak ciphers (RC4, DES, 3DES, export ciphers) must be removed
  • HSTS header --- HTTP Strict Transport Security should be enabled with a minimum max-age of 31536000 (one year)
  • Certificate Transparency --- Verify your certificate is logged in CT logs

Tools

SSL Labs Server Test (ssllabs.com/ssltest) provides an A-F grade with detailed findings. Aim for an A+ rating.

# Command-line alternative using testssl.sh
./testssl.sh --severity HIGH https://yourdomain.com

# Check certificate expiry with OpenSSL
echo | openssl s_client -connect yourdomain.com:443 2>/dev/null | openssl x509 -noout -dates

Step 2: HTTP Security Headers

Security headers instruct browsers on how to handle your content and are one of the simplest yet most overlooked security controls.

Essential Headers

Header Purpose Recommended Value
Content-Security-Policy Prevents XSS and injection attacks Define allowed sources for scripts, styles, images
X-Content-Type-Options Prevents MIME-type sniffing nosniff
X-Frame-Options Prevents clickjacking DENY or SAMEORIGIN
Referrer-Policy Controls referrer information leakage strict-origin-when-cross-origin
Permissions-Policy Restricts browser feature access Disable unused features (camera, microphone, geolocation)
Strict-Transport-Security Forces HTTPS connections max-age=31536000; includeSubDomains; preload
X-XSS-Protection Legacy XSS filter 0 (deprecated; rely on CSP instead)

Tools

SecurityHeaders.com provides instant analysis. Mozilla Observatory (observatory.mozilla.org) offers a more comprehensive assessment including headers, TLS, and other best practices.

# Quick header check with curl
curl -I -s https://yourdomain.com | grep -iE "content-security|x-frame|x-content|strict-transport|referrer-policy|permissions-policy"

Step 3: Vulnerability Scanning

Automated vulnerability scanners identify known weaknesses in your web application, server software, and configurations.

OWASP ZAP (Zed Attack Proxy)

OWASP ZAP is the most widely used free, open-source web application security scanner. It crawls your site, tests for common vulnerabilities (SQL injection, XSS, CSRF, directory traversal), and generates detailed reports.

# Run ZAP in headless mode with automated scan
docker run -t ghcr.io/zaproxy/zaproxy:stable zap-baseline.py \
  -t https://yourdomain.com \
  -r report.html

# For a more thorough active scan
docker run -t ghcr.io/zaproxy/zaproxy:stable zap-full-scan.py \
  -t https://yourdomain.com \
  -r full-report.html

Nmap (Network Mapper)

Nmap scans your server for open ports and services, revealing potential attack surfaces.

# Scan for open ports and service versions
nmap -sV -sC -oN scan-results.txt yourdomain.com

# Check for common vulnerabilities using Nmap scripts
nmap --script vuln yourdomain.com

Key findings to look for:

  • Unnecessary open ports (only 80, 443, and your SSH port should be externally accessible for a web server)
  • Outdated service versions with known CVEs
  • Default service banners revealing software versions

Burp Suite

Burp Suite (Community Edition is free) provides an intercepting proxy for manual testing. It is particularly valuable for:

  • Testing authentication flows (login, password reset, session management)
  • Identifying injection points that automated scanners miss
  • Analyzing API request/response patterns
  • Testing access control (can a regular user access admin endpoints?)

Step 4: Outdated Software Detection

Outdated software is the leading cause of website compromises. Every component must be checked:

  • CMS version --- WordPress, Joomla, Drupal, or any framework you use
  • Plugins and extensions --- Every third-party plugin is a potential vulnerability
  • Server software --- Apache, Nginx, OpenLiteSpeed, PHP, Node.js
  • Operating system --- Kernel and system packages
  • Dependencies --- npm, Composer, pip packages
# Check PHP version
php -v

# Check for outdated Composer packages
composer outdated --direct

# Check for outdated npm packages
npm audit
npm outdated

# Check OS packages (Debian/Ubuntu)
apt list --upgradable

Dependency Vulnerability Databases

  • npm audit --- Built-in Node.js vulnerability checker
  • Snyk --- Multi-language dependency scanner
  • WPScan --- WordPress-specific vulnerability database
  • CVE Details (cvedetails.com) --- Search for known vulnerabilities by software name and version

Step 5: File and Directory Permissions

Incorrect file permissions are a common misconfiguration that can allow attackers to read sensitive files, upload malicious code, or modify existing files.

Linux/Unix Web Server Standards

# Directories should be 755 (owner: rwx, group: rx, others: rx)
find /var/www/html -type d -not -perm 755 -exec ls -ld {} \;

# Files should be 644 (owner: rw, group: r, others: r)
find /var/www/html -type f -not -perm 644 -exec ls -l {} \;

# Configuration files with credentials should be 600 (owner only)
chmod 600 config/mail.php
chmod 600 .env

# Ensure web server user owns the files
chown -R www-data:www-data /var/www/html

What to Verify

  • No files or directories with 777 permissions (world-writable)
  • Configuration files containing credentials are not readable by the web server group
  • Upload directories do not allow script execution
  • .git, .env, node_modules, vendor, and other sensitive directories are not publicly accessible
  • Backup files (.bak, .sql, .zip) are not stored in web-accessible locations

Step 6: Database Security

The database is where your most valuable data lives. A compromised database is the worst-case scenario.

Checklist

  • No root access from application --- Your application should use a dedicated database user with only the permissions it needs (typically SELECT, INSERT, UPDATE, DELETE on specific tables)
  • Remote access disabled --- Unless specifically required, MySQL/PostgreSQL should only listen on localhost (127.0.0.1)
  • Strong passwords --- Database user passwords should be at least 20 characters, randomly generated
  • Parameterized queries --- All database queries must use prepared statements or parameterized queries to prevent SQL injection
  • Backups encrypted --- Database backups should be encrypted at rest and in transit
  • Audit logging --- Enable query logging for administrative actions
-- Check MySQL user privileges (look for excessive permissions)
SELECT user, host, Super_priv, Grant_priv, File_priv FROM mysql.user;

-- Verify no anonymous users exist
SELECT user, host FROM mysql.user WHERE user = '';

-- Check if remote root access is disabled
SELECT user, host FROM mysql.user WHERE user = 'root' AND host NOT IN ('localhost', '127.0.0.1', '::1');

Step 7: API Security

If your website exposes APIs (whether for internal use, mobile apps, or third parties), they require dedicated testing.

Common API Vulnerabilities

  • Broken authentication --- API keys or tokens that do not expire, lack rate limiting, or are transmitted in URLs
  • Excessive data exposure --- Endpoints returning more data than the client needs (e.g., including password hashes in user profile responses)
  • Broken object-level authorization --- Changing an ID in a request to access another user's data (IDOR vulnerabilities)
  • Rate limiting --- APIs without rate limiting are vulnerable to brute-force attacks and abuse
  • Input validation --- APIs that accept and process unsanitized input

Testing Approach

# Test for IDOR: request your own resource, then change the ID
curl -H "Authorization: Bearer YOUR_TOKEN" https://api.domain.com/users/123
curl -H "Authorization: Bearer YOUR_TOKEN" https://api.domain.com/users/124

# Test rate limiting: send rapid requests
for i in $(seq 1 100); do
  curl -s -o /dev/null -w "%{http_code}\n" https://api.domain.com/login \
    -d "user=test&pass=test"
done

# Check for information leakage in error responses
curl -v https://api.domain.com/nonexistent-endpoint

Step 8: Access Control and Authentication Review

Review every authentication and authorization mechanism on your site:

  • Password policies --- Minimum length (12+ characters recommended), complexity requirements, breach database checking (Have I Been Pwned API)
  • Multi-factor authentication --- Is MFA available and enforced for admin accounts?
  • Session management --- Session tokens should be regenerated after login, have reasonable expiry times, and use secure cookie flags (HttpOnly, Secure, SameSite)
  • Admin panel access --- Is the admin login page publicly accessible? Consider IP restrictions or VPN requirements.
  • Brute-force protection --- Account lockout or progressive delays after failed login attempts
  • Password reset flow --- Tokens should be single-use, time-limited, and invalidated if the user changes their password

Step 9: Create a Remediation Plan

After completing the audit, compile all findings into a structured remediation plan.

Prioritize by Risk

  1. Critical --- Actively exploitable vulnerabilities that could lead to data breach or system compromise (SQL injection, RCE, exposed credentials). Fix immediately.
  2. High --- Vulnerabilities that require specific conditions to exploit but could cause significant damage (XSS, CSRF, weak authentication). Fix within one week.
  3. Medium --- Misconfigurations and missing hardening measures (missing headers, verbose error messages, outdated non-critical software). Fix within one month.
  4. Low --- Best-practice recommendations and minor issues (information disclosure in headers, cookie flags). Fix within the quarter.

Document Each Finding

For every issue, record:

  • Description --- What the vulnerability is
  • Location --- Exact URL, file, or component affected
  • Evidence --- Screenshots, request/response data, or tool output
  • Impact --- What an attacker could achieve by exploiting this
  • Remediation steps --- Specific, actionable instructions to fix the issue
  • Assigned to --- Who is responsible for the fix
  • Deadline --- When the fix must be completed

Follow Up

Schedule a re-test after remediation to verify that fixes were implemented correctly and did not introduce new issues. This validation step is non-negotiable.

Building a Continuous Security Practice

A single audit is a snapshot. True security requires an ongoing program:

  • Automated scanning --- Run OWASP ZAP or similar tools weekly via CI/CD pipeline
  • Dependency monitoring --- Use Dependabot, Snyk, or npm audit in your build process
  • Log monitoring --- Centralize logs and alert on suspicious patterns (failed login spikes, unusual API usage)
  • Incident response plan --- Document who does what if a breach is detected
  • Security training --- Ensure your development team understands OWASP Top 10 and secure coding practices

Conclusion

A website security audit is methodical, not mysterious. By systematically working through SSL configuration, security headers, vulnerability scanning, software updates, permissions, database security, API testing, and access controls, you build a clear picture of your security posture and a prioritized plan to improve it.

The cost of a proactive audit is a fraction of the cost of a breach --- in money, time, and reputation. Make it a regular part of your operations.

AxonITech offers professional security audit services that cover every area outlined in this guide, plus advanced penetration testing for businesses that need deeper assurance. Contact us to schedule your assessment.

Tags: security audit vulnerability penetration testing
Share:
WhatsApp Email Start a Project