Executive Summary

Understanding application security vulnerabilities from a defensive perspective is critical for SOC Analysts and Security Engineers. This writeup breaks down key OWASP Top 10 vulnerabilities, detection signatures, and remediation practices for modern web environments.


1. A01:2021 – Broken Access Control

Flaws allowing users to access unauthorized resources or perform actions outside their intended permissions (e.g., IDOR, privilege escalation).

Defensive Detection Rule (Log Pattern)

Monitor web application access logs for HTTP 403 / 401 status code spikes originating from single IP addresses attempting sequential resource IDs:

BASH
# Grep access logs for unauthorized IDOR enumeration
grep -E "GET /user/profile\?id=" /var/log/nginx/access.log | grep -E " (401|403) "

[!NOTE] Key Detection Strategy: Aggregate 401 and 403 responses in your SIEM grouped by source IP and path pattern to alert on automated IDOR brute-force attempts.

2. A03:2021 – Injection (SQLi & Command Injection)

Unsanitized user inputs passed directly into database queries or operating system shell execution contexts allow remote code execution or data exfiltration.

Mitigation Pattern (Prepared Statements in Node.js)

JavaScript

CODE
// SECURE: Parameterized Query using pg pool
const { Pool } = require('pg');
const pool = new Pool();

async function getUser(userId) {
  const query = 'SELECT id, username, email FROM users WHERE id = $1';
  const res = await pool.query(query, [userId]);
  return res.rows[0];
}

3. Threat Hunting & SOC Log Analysis

Blue teams should implement automated SIEM alert rules targeting:

  • Unusual web traffic spikes and high-frequency parameter fuzzing.

  • Payload encoding signatures in incoming request strings (e.g., %27, UNION SELECT).

  • Unexpected web server worker processes spawning underlying shell subprocesses.

[!TIP] Always enforce strict parameterized queries at the data layer and correlate application logs with process-creation events on web servers to detect successful injection execution!