OWASP Top 10 Security Lab

A06

Vulnerable and Outdated Components

Identify and exploit known vulnerabilities in software components

What are Vulnerable and Outdated Components?

You are likely vulnerable if you do not know the versions of all components you use (both client-side and server-side). This includes components you directly use as well as nested dependencies. If software is vulnerable, unsupported, or out of date, including the OS, web/application server, database management system (DBMS), applications, APIs, runtime environments, and libraries.

🎯 Common Vulnerable Components

  • JavaScript Libraries: jQuery, Angular, React with known XSS vulnerabilities
  • Web Frameworks: Struts, Spring, Django with RCE vulnerabilities
  • Content Management: WordPress, Drupal plugins with authentication bypass
  • Operating Systems: Unpatched Linux, Windows with privilege escalation flaws
  • Database Systems: MySQL, PostgreSQL with injection vulnerabilities
  • Web Servers: Apache, Nginx with remote code execution flaws
  • Runtime Environments: Java, .NET, Python with deserialization issues

⚠️ Attack Impact

  • Remote code execution through framework vulnerabilities
  • Data theft via database component exploitation
  • Complete system compromise through OS vulnerabilities
  • Cross-site scripting through vulnerable JavaScript libraries
  • Authentication bypass in CMS plugins
  • Privilege escalation through service vulnerabilities

🔍 Component Discovery Techniques

# Web Component Fingerprinting # HTTP Headers X-Powered-By: PHP/7.2.0 Server: Apache/2.4.29 (Ubuntu) X-Generator: WordPress 4.9.8 # JavaScript/CSS Analysis <script src="/js/jquery-1.8.3.min.js"></script> <script src="/js/bootstrap-2.1.1.js"></script> <link href="/css/bootstrap.min.css" rel="stylesheet"> # URL Patterns /wp-admin/ (WordPress) /administrator/ (Joomla) /admin/login.php (Custom CMS) # System Service Discovery nmap -sV target.com # SSH OpenSSH 7.4 (CVE-2018-15473) # Apache 2.4.29 (CVE-2019-0211) # MySQL 5.7.0 (CVE-2019-2914) # Package Management dpkg -l | grep -E "(apache|mysql|php)" rpm -qa | grep -E "(httpd|mariadb)"

🔎 Vulnerability Research Process

# CVE Database Lookup 1. Identify component and version 2. Search CVE database: https://cve.mitre.org 3. Check National Vulnerability Database: https://nvd.nist.gov 4. Review exploit databases: https://exploit-db.com # Example Research Flow Component: jQuery 1.8.3 CVE Search: "jQuery 1.8.3 vulnerabilities" Found: CVE-2019-11358 (Prototype Pollution) CVSS Score: 6.1 (Medium) Exploit Available: Yes # Automated Scanning Tools npm audit (Node.js) composer audit (PHP) bundle audit (Ruby) pip-audit (Python) OWASP Dependency Check Snyk vulnerability scanner

🛡️ Mitigation Strategies

  • Inventory Management: Maintain complete software bill of materials (SBOM)
  • Regular Updates: Establish automated patching for critical components
  • Vulnerability Scanning: Continuous monitoring with automated tools
  • Dependency Management: Pin versions and test updates in staging
  • Legacy Isolation: Segment and monitor unsupported components
  • Alternative Solutions: Replace end-of-life components
// Secure Dependency Management (package.json) { "dependencies": { "express": "^4.18.2", // Latest secure version "helmet": "^6.0.1", // Security headers "rate-limiter": "^1.3.1" // Rate limiting }, "scripts": { "audit": "npm audit --audit-level moderate", "update": "npm update && npm audit fix" } } # Automated Security Scanning (CI/CD) - name: Security Audit run: | npm audit --audit-level high snyk test --severity-threshold=high owasp-dependency-check --project myapp