Hands-On OWASP Top 10: Web Application Vulnerability Assessment with OWASP Juice Shop + Video

Listen to this Post

Featured Image

Introduction:

The OWASP Top 10 represents the most critical security risks to web applications, serving as a foundational framework for security professionals and developers alike. In a recent hands-on training session at RabTech Academy, participants conducted a comprehensive vulnerability assessment on the OWASP Juice Shop application—an intentionally insecure web application designed for security training. This practical exercise demonstrates how ethical hackers and security analysts identify, exploit, and remediate common web vulnerabilities, including SQL injection, cross-site scripting (XSS), broken object-level authorization (BOLA), and sensitive data exposure.

Learning Objectives & Secrets:

  • Objective 1: Master the identification and exploitation of SQL Injection vulnerabilities, including authentication bypass techniques and data extraction methods using tools like SQLMap and manual payload crafting.
  • Objective 2 Secret Tips: For Stored XSS testing, always test multiple payload variants across different input fields—try <script>alert('XSS')</script>, image onerror handlers, and encoded variants to bypass weak input filters. Document each successful payload with screenshots for proof-of-concept (PoC) reporting.
  • Objective 3 Secret Tips: When testing Broken Object Level Authorization (BOLA), systematically increment or decrement object IDs in API requests (e.g., /api/users/1, /api/users/2) while using different user sessions to identify unauthorized access patterns.

You Should Know:

  1. SQL Injection Authentication Bypass – Manual & Automated Exploitation

SQL Injection remains one of the most prevalent web application vulnerabilities, allowing attackers to interfere with the queries an application makes to its database. In the Juice Shop exercise, the classic `’ OR 1=1–` payload was used to bypass authentication mechanisms. Here’s a step-by-step guide to test and exploit SQL injection vulnerabilities:

Step 1: Identify input fields that interact with a database—login forms, search bars, and URL parameters are prime candidates.
Step 2: Submit a single quote (') to trigger a database error, confirming the vulnerability.
Step 3: Use the payload `’ OR 1=1–` in the username field with any password to bypass authentication. The `–` comments out the rest of the SQL query, effectively making the condition always true.
Step 4: For advanced exploitation, use SQLMap—an automated tool for SQL injection discovery and exploitation:

sqlmap -u "http://juice-shop/login" --data="email=admin@juice-shop&password=admin" --level=5 --risk=3 --dbs

Step 5: Enumerate databases, tables, and columns to extract sensitive data:

sqlmap -u "http://juice-shop/login" --data="email=admin@juice-shop&password=admin" -D juice-shop --tables --dump

Step 6: Remediation involves implementing parameterized queries (prepared statements) to separate SQL logic from data. For example, in PHP:

$stmt = $conn->prepare("SELECT  FROM users WHERE email = ? AND password = ?");
$stmt->bind_param("ss", $email, $password);
$stmt->execute();
  1. Stored Cross-Site Scripting (XSS) – Detection and Mitigation

Stored XSS attacks occur when malicious scripts are permanently stored on target servers, such as in databases or comment fields, and executed when users access the affected pages. In the Juice Shop environment, participants tested input fields by injecting JavaScript payloads to confirm whether input sanitization was properly implemented.

Step 1: Locate any persistent input fields—user profiles, comments, or product reviews.

Step 2: Inject a test payload: ``.

Step 3: If the payload executes upon page reload, the application is vulnerable to Stored XSS.
Step 4: Test advanced evasion techniques by encoding payloads:

<img src=x onerror=alert('XSS')>

Step 5: Use Burp Suite to intercept and modify POST requests containing the payload, checking server-side sanitization.
Step 6: Remediation requires output encoding (HTML entity encoding) and contextual escaping. For web applications, use libraries like OWASP Java Encoder or Microsoft AntiXSS. In JavaScript frameworks like React, JSX automatically escapes content, reducing XSS risk.
Step 7: On Linux, you can use `curl` to test XSS via automated scripts:

curl -X POST http://juice-shop/api/Reviews -H "Content-Type: application/json" -d '{"comment":"<script>alert(1)</script>","productId":1}'

3. Directory Listing & Sensitive Data Exposure

Directory listing occurs when a web server allows users to view directory contents, potentially exposing sensitive files, configuration files, or backup data. The Juice Shop assessment revealed a directory listing vulnerability that exposed internal files.

Step 1: Use a web browser or tools like `wget` and `curl` to request directories that may not have an index file, e.g., http://juice-shop/assets/`.
Step 2: If a directory listing appears, navigate through the exposed structure to identify configuration files (
.env,config.json), backup files (.bak,.sql`), or source code.
Step 3: Use a tool like `gobuster` to brute-force hidden directories:

gobuster dir -u http://juice-shop -w /usr/share/wordlists/dirb/common.txt

Step 4: Remediation involves disabling directory indexing on web servers. For Apache, modify `.htaccess` or virtual host configuration:

Options -Indexes

For Nginx, use:

autoindex off;

Step 5: In Windows IIS, uncheck “Directory browsing” in the directory security settings.
Step 6: Ensure sensitive files are stored outside the web root or use appropriate access controls and encryption for storage.

  1. Broken Object Level Authorization (BOLA) – API Security Testing

BOLA (also known as Insecure Direct Object References – IDOR) occurs when an API does not properly enforce authorization checks on object IDs, allowing one user to access another user’s data. The Juice Shop API endpoints provided a practical environment to test this vulnerability.

Step 1: Intercept API requests using Burp Suite or OWASP ZAP—specifically requests that reference numeric or predictable object IDs (e.g., /api/users/1, /api/orders/123).
Step 2: Log in as a low-privilege user, capture a request to /api/users/1, and modify the ID to /api/users/2.
Step 3: If the response returns data for user 2, the endpoint is vulnerable to BOLA.
Step 4: Use Postman to automate BOLA testing by iterating through a range of IDs:

for (let i = 1; i <= 100; i++) {
pm.sendRequest(<code>/api/users/${i}</code>, (err, res) => {
console.log(res.json());
});
}

Step 5: Remediation includes implementing robust access control checks on the server-side, using randomized UUIDs instead of sequential integers, and enforcing role-based access control (RBAC). For example, in Node.js:

if (req.user.id !== req.params.userId && req.user.role !== 'admin') {
return res.status(403).json({ error: 'Forbidden' });
}

5. Tool Configuration & Reporting for Security Assessments

Effective vulnerability assessment involves proper configuration of security tools and systematic reporting. During the RabTech Academy training, participants used a combination of manual testing and automated tools to document findings.

Step 1: Configure Burp Suite with FoxyProxy browser extension to intercept HTTP traffic. Set up scope to focus only on `juice-shop` domains.
Step 2: Use OWASP ZAP’s automated scanner for comprehensive discovery, adjusting the scan policy for maximum coverage:

zap-cli quick-scan --spider -r http://juice-shop

Step 3: Document each vulnerability with a clear title, severity rating (CVSS score), description, proof-of-concept steps with screenshots, and remediation recommendations.
Step 4: For each vulnerability, generate a remediation code snippet—parameterized queries for SQL injection, output encoding for XSS, access control checks for BOLA, and server configuration changes for directory listing.
Step 5: Validate the fixes after remediation code is applied by re-testing the same endpoints with the same payloads to ensure vulnerabilities are closed.

What Undercode Say:

  • Key Takeaway 1: Practical hands-on experience with OWASP Juice Shop provides a realistic and safe environment to understand the impact of OWASP Top 10 vulnerabilities, bridging the gap between theoretical knowledge and real-world exploitation.
  • Key Takeaway 2: Remediation is as critical as exploitation—each vulnerability uncovered must be paired with a concrete, actionable fix, whether it’s parameterized queries, output encoding, or proper authorization logic, to build secure applications from the ground up.

Analysis: The recent hands-on training at RabTech Academy underscores the necessity of continuous, practical cybersecurity education in an era of escalating web application threats. While the OWASP Top 10 provides a robust framework, the real value lies in the execution—testing, failing, and fixing vulnerabilities in controlled environments like Juice Shop. The combination of manual testing (e.g., SQL payloads) and automated tools (SQLMap, Burp Suite) equips professionals with a dual approach: rapid discovery and deep validation. Furthermore, the emphasis on documentation and remediation code ensures that findings translate into meaningful security improvements, not just checkbox compliance. This exercise highlights that security is not a one-time event but an iterative process of assessment, remediation, and re-assessment.

Prediction:

+N The growing accessibility of vulnerable applications like OWASP Juice Shop for training will lead to a surge in skilled ethical hackers, increasing the overall security posture of organizations that prioritize such hands-on learning.
+N Automated tools combined with manual verification will become the industry standard, enabling faster, more accurate vulnerability discovery and reducing false positives in large-scale assessments.
-1 However, the same training that educates security professionals can also be weaponized by malicious actors; as these labs become more popular, attackers will have more opportunities to refine their skills, potentially leading to an increase in real-world attacks leveraging these techniques.
+1 Companies that adopt continuous security training and integrate it into their DevOps pipelines (DevSecOps) will outperform competitors in incident response speed and breach mitigation, driving a market shift toward security-first development cultures.

▶️ Related Video (84% Match):

🎯Let’s Practice For Free:

🎓 Live Courses & Certifications:

Join Undercode Academy for Verified Certifications

🚀 Request a Custom Project:

Secure, high-velocity infrastructure and disruptive technological engineering. Contact our engineering team for high-tier development and proprietary systems:
[email protected]
💎 Smart Architecture | 🛡️ Secure by Design | ⭐ Trusted by Thousands

IT/Security Reporter URL:

Reported By: https://lnkd.in/p/eGdjYbGg – Hackers Feeds
Extra Hub: Undercode MoN
Basic Verification: Pass ✅

🔐JOIN OUR CYBER WORLD [ CVE News • HackMonitor • UndercodeNews ]

💬 Whatsapp | 💬 Telegram

📢 Follow UndercodeTesting & Stay Tuned:

𝕏 formerly Twitter 🐦 | @ Threads | 🔗 Linkedin | 🦋BlueSky