MYHOSPITALNOW.COM

Find Trusted Doctors & Hospitals

Discover healthcare providers, compare hospitals, and explore treatment options worldwide.

Free Treatment Quotes • Doctor Search • Hospital Comparison

Find Healthcare Options

www.myhospitalnow.com

OWASP: Introduction to OWASP Top 10 Security Risks

ResourceTitle
OWASP InjectionOWASP Injection
OWASP Broken AuthenticationOWASP Broken Authentication
OWASP Sensitive Data ExposureOWASP Sensitive Data Exposure
OWASP XML External EntitiesOWASP XML External Entities
OWASP Broken Access ControlOWASP Broken Access Control
OWASP Security MisconfigurationOWASP Security Misconfiguration
OWASP Cross-Site Scripting (XSS)OWASP Cross-Site Scripting (XSS)
OWASP Insecure DeserializationOWASP Insecure Deserialization
OWASP Using Components with Known VulnerabilitiesOWASP Using Components with Known Vulnerabilities
National Vulnerability DatabaseNational Vulnerability Database


Introduction to the OWASP Top 10 (2021)


Prereqs: Basic web app knowledge (HTTP, HTML/JS), command line familiarity
Goal: Understand the OWASP Top 10 2021 risks from attacker and defender perspectives, and practice the most common exploits safely in OWASP Juice Shop.


Learning Outcomes

By the end, youโ€™ll be able to:

  • Explain what OWASP is and why the Top 10 matters.
  • Install and run OWASP Juice Shop in a safe lab.
  • Describe each 2021 Top 10 category, how attackers exploit it, and how to mitigate it.
  • Perform and defend against common Injection and XSS attacks.
  • Build practical controls: least privilege, logging & monitoring, CSP, patch management, and secure defaults.

Module 1 โ€” Meet OWASP

What is OWASP?
The Open Web Application Security Project is a nonprofit community improving software security through projects like:

  • OWASP Top 10 (this course)
  • OWASP Juice Shop (intentionally vulnerable app for practice)
  • ModSecurity Core Rule Set (CRS) (WAF rules)
  • OWASP API Security Top 10

Why the Top 10?
Itโ€™s a consensus view of the most critical web app risks. Use it for threat modeling, secure coding standards, training, and security testing scope.


Module 2 โ€” Lab Setup: OWASP Juice Shop (Docker on Kali/Ubuntu)

Time: 10โ€“15 minutes

Step 1: Install Docker

sudo apt update
sudo apt install -y docker.io
sudo systemctl enable --now docker
Code language: CSS (css)

Step 2: Run Juice Shop

sudo docker pull bkimminich/juice-shop
sudo docker run -d -p 8080:3000 --name juice bkimminich/juice-shop

Step 3: Access the app

  • Browse to http://<your-public-ip>:8080 (or http://localhost:8080 if local)
  • Youโ€™re ready to practice! (Never expose this to the public internet.)

Tip: If docker run fails for permissions, prepend sudo.


Module 3 โ€” 2017 โ†’ 2021 Changes (Quick Map)

  • Broken Access Control rose to #1.
  • Sensitive Data Exposure recategorized as Cryptographic Failures.
  • Broken Authentication โ†’ Identification & Authentication Failures.
  • XXE folded into Security Misconfiguration.
  • XSS folded into Injection.
  • Insecure Deserialization โ†’ Software & Data Integrity Failures.
  • Using Components with Known Vulnerabilities โ†’ Vulnerable & Outdated Components.
  • New on list: Server-Side Request Forgery (SSRF).

Use this when updating legacy checklists and training.


Module 4 โ€” The OWASP Top 10 (2021), Explained

For each risk: Attacker View โ†’ What Can Go Wrong โ†’ Defenses


1) Broken Access Control

Attacker view: Force-browsing to privileged URLs (/admin), IDOR (changing ?userId=123 to 124), abusing missing server-side checks.

What goes wrong: Users read/modify other usersโ€™ data, escalate privileges.

Defenses

  • Enforce server-side authorization checks on every request.
  • Least privilege roles & permissions; deny by default.
  • Use framework authz annotations/policies; test IDOR explicitly.
  • Invalidate JWTs on logout; donโ€™t trust client-side claims alone.
  • Log & alert on access denials and unusual patterns.

2) Cryptographic Failures

Attacker view: Sniff data in transit, harvest plaintext secrets at rest, exploit weak ciphers/outdated TLS.

Defenses

  • TLS everywhere; enable HSTS header.
  • Strong algorithms & key sizes; rotate keys.
  • Never log secrets; use KMS/secret managers.
  • Donโ€™t decryptโ†’re-encrypt across untrusted hops; keep data encrypted end-to-end where feasible.
  • Classify data; encrypt sensitive data at rest and in transit.

3) Injection (SQL/NoSQL/OS/LDAP + XSS included)

Attacker view: Craft input that alters interpreter behavior:

  • SQL: ' OR 1=1--
  • OS: ; curl http://attacker/โ€ฆ
  • LDAP/NoSQL: unescaped filters
  • XSS (now under Injection): run arbitrary JS in the victim browser.

Defenses

  • Parameterized queries / prepared statements.
  • Input validation (allow-list) + output encoding.
  • For XSS: CSP (no inline scripts), escape context-specifically (HTML/JS/URL).
  • Run app with least OS/database privileges.

4) Insecure Design

Attacker view: Exploit flawed business logic (e.g., coupon misuse, weak workflow checks).

Defenses

  • Threat model early (STRIDE, abuse cases).
  • Security requirements & secure design patterns (reference architectures).
  • Break glass reviews for high-risk flows (auth, payments, exports).

5) Security Misconfiguration

Attacker view: Default creds, verbose errors, open S3 buckets, debug enabled in prod.

Defenses

  • Hardened baselines; disable defaults and services you donโ€™t use.
  • Infrastructure as Code with peer-reviewed templates.
  • Centralized config secrets; environment-specific safe defaults.
  • Patch and scan for drift; secure HTTP headers.

6) Vulnerable & Outdated Components

Attacker view: Race to exploit NVD/CVE disclosures and Shodan-exposed targets.

Defenses

  • SBOM + dependency inventory.
  • Automated dependency updates (Dependabot/Renovate).
  • Risk-based patch SLAs; block builds on critical CVEs.

7) Identification & Authentication Failures

Attacker view: Credential stuffing, weak passwords, long-lived sessions.

Defenses

  • MFA for all sensitive actions.
  • Strong password policy + breach checks.
  • Session timeouts, SameSite/HttpOnly/Secure cookies; donโ€™t expose session IDs in URLs.
  • Rate limiting login; lockout/cooldowns.

8) Software & Data Integrity Failures

Attacker view: Supply chain exploits (malicious updates, tampered packages).

Defenses

  • Signed artifacts (Sigstore/Cosign); verify on deploy.
  • Pin dependencies; restrict build permissions.
  • Immutable, reproducible builds.

9) Security Logging & Monitoring Failures

Attacker view: Operate without detection; persistence and lateral movement.

Defenses

  • Log auth, privileged actions, data access, and errors with timestamps and request IDs.
  • Centralize to a SIEM; alert on brute-force, access denials, anomaly spikes.
  • Incident response runbooks and regular drills.

10) Server-Side Request Forgery (SSRF)

Attacker view: Coerce server to fetch internal URLs (IMDS, admin consoles).

Defenses

  • Deny egress to internal networks; URL allow-lists.
  • Validate/normalize URLs server-side; disable redirects.
  • Use IMDSv2 / metadata service hardening in cloud.

Module 5 โ€” Hands-On Labs (Juice Shop)

Always attack only your lab environment.

Lab A: SQL Injection (Login Bypass)

  1. Open Juice Shop โ†’ Login.
  2. In Email: '+OR 1=1--
    Password: anything.
  3. Observe admin login (or enumerated user).

Why it works: The injected predicate forces the WHERE clause true; -- comments out the remainder.

Fix it (conceptually):

  • Use parameterized queries.
  • Sanitize input and enforce types/length.
  • Minimize DB privileges (no writes for read-only flows).

Lab B: XSS (Reflected/DOM)

  1. Use the search field.
  2. Try a harmless payload that proves script execution (e.g., DOM-based XSS using an injected element).

Defenses to discuss:

  • Encode output per context.
  • CSP with no inline scripts; script-nonce.
  • Validate and reject unexpected characters for specific fields.

Module 6 โ€” Secure Defaults in Cloud (Mini Demo Plan)

Example: S3 bucket hardening checklist

  • Block public access (account & bucket level).
  • Default encryption (SSE-S3 or SSE-KMS).
  • Least-privilege bucket policies and IAM roles.
  • Versioning & access logging enabled.

(Adapt similar hardening for web servers, DBs, object stores.)


Module 7 โ€” Quick Checks (Assessments)

5 questions

  1. Which control best prevents IDOR?
    a) CSP b) Server-side authorization per object c) Captcha
    Ans: b
  2. Storing SSNs in plaintext violates which category most directly?
    Ans: Cryptographic Failures
  3. The most reliable fix for SQL injection is:
    Ans: Parameterized queries
  4. Which header helps reduce XSS impact?
    Ans: Content-Security-Policy (CSP)
  5. Which is a hallmark of SSRF?
    Ans: Server makes requests to internal resources on attackerโ€™s behalf

Module 8 โ€” Operationalizing the Top 10

Team Playbook

  • Build time: lint/scan deps; block high CVEs; unit tests for authz and validation.
  • Pre-prod: DAST on key flows; threat model delta changes.
  • Prod: SIEM alerts, WAF with CRS, rate limits, auth anomalies.
  • Governance: Update secure coding standards to 2021 categories; training + labs quarterly.

Headers Starter Pack (examples)

Strict-Transport-Security: max-age=31536000; includeSubDomains
Content-Security-Policy: default-src 'self'; object-src 'none'; base-uri 'self'
X-Content-Type-Options: nosniff
Referrer-Policy: no-referrer
Permissions-Policy: geolocation=(), camera=()
Code language: HTTP (http)

Cheatsheets & Job Aids

Injection Defense (DB)

  • Prepared statements only
  • ORM escaping rules respected
  • Input allow-lists, length limits
  • Read-only DB roles for read paths

Auth & Session

  • MFA + breached password checks
  • Short session TTL; refresh tokens rotated
  • Cookies: Secure; HttpOnly; SameSite=Strict

Access Control

  • Enforce server-side, per-object checks
  • Deny-by-default routes
  • Role reviews every release

Logging & IR

  • Centralize logs with request IDs
  • Alert on 401/403 spikes, failed logins, admin actions
  • Incident runbooks and on-call

Conclusion & Next Steps

  • Keep practicing in OWASP Juice Shopโ€”repeat the labs and try new challenges.
  • Fold these controls into your pipelines: dependency updates, IaC hardening, authz tests, and headers.
  • Stay engaged with your local OWASP chapter and the broader community.

Stretch Goals

  • Add WAF (ModSecurity CRS) in front of Juice Shop and observe blocked payloads.
  • Implement CSP nonces and measure what breaksโ€”then fix it the right way.
  • Generate an SBOM and track CVEs over time.

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services โ€” all in one place.

Explore Hospitals
I'm Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms. I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.

Related Posts

PropRaahi: How a New Property Research Platform Is Tackling India’s Biggest Real Estate Problems

From confusing property documents and hidden costs to unreliable information and buyer uncertainty, PropRaahi wants to make property buying in India more transparent, informed, and buyer-friendly. India’s…

Read More

Why Engineers Click Through Compliance Training โ€“ and What DevOps Teams Can Do About It

Ask a room of engineers about their annual compliance module and you will hear the same story: a slide deck on data protection, a few multiple-choice questions,…

Read More

Could An AI Chatbot Help Your Business Deliver Better Customer Support? What To Know About Implementing One

Customers don’t always have the time or patience to wait for answers. From checking delivery times and asking about a service to trying to resolve a problem,…

Read More

How to stop support escalations eating your engineering time

Nobody decides that engineers should do support. It happens one message at a time. A ticket looks odd, L1 isn’t sure, and someone pings the developer who…

Read More

Best Print Driver Management Software for IT Teams in 2027: 7 Tools Compared

Microsoft’s end-of-servicing plan for legacy third-party printer drivers is reshaping how IT teams handle print management. From January 15, 2026, no new printer drivers are published to…

Read More

Switching EOR Providers: How to Protect Your Employees and Keep Work on Track

Changing an employment provider can affect payroll, employee records, benefits and day-to-day support. Without careful planning, even a necessary transition can create uncertainty for international employees. A…

Read More
Subscribe
Notify of
guest
1 Comment
Newest
Oldest Most Voted
Skylar Bennett
Skylar Bennett
11 months ago

This blog gives a very clear and practical introduction to the OWASP Top 10 and why these risks matter for every modern application team. I like how it explains not just the names of vulnerabilities like injection, broken access control, and security misconfiguration, but also connects them to real-world impact on data, users, and business trust. The focus on secure coding practices, regular testing, and integrating OWASP guidelines into the SDLC and DevSecOps pipelines makes the content especially useful for developers, testers, and security teams. Overall, itโ€™s a solid starting point for anyone serious about building and maintaining secure web applications.

1
0
Would love your thoughts, please comment.x
()
x