Ravindra BagaleCourses & study guides मराठी Track your progress

29. OWASP Top 10 Web Vulnerabilities

Cyber Security

29.6 A07 Authentication and A02 Cryptographic Failures

Identification and authentication failures: weak passwords allowed, no lockout, session tokens that do not change after login, OTP/password reset flaws.

Fixes (much from Chapter 22): enforce strong passphrases, add rate-limiting/lockout and MFA, regenerate the session ID on login, expire sessions, and never reveal "user exists" on login errors.

session_regenerate_id(true);   // after a successful login, stop session fixation

Cryptographic failures: sensitive data sent or stored without proper encryption – plain HTTP (Chapter 24), passwords stored with md5, secrets in code.

Fixes: HTTPS everywhere (Chapter 13), password_hash() with bcrypt (Chapter 22), encrypt sensitive data at rest, and keep keys/secrets out of the codebase (use environment variables or a secrets manager, Chapter 30).

Ravindra Bagale's Tip

After a successful login, don't forget session_regenerate_id(true) – otherwise a session fixation attack becomes possible. And always store passwords with password_hash, and use HTTPS, not HTTP. Adopt these three habits and most authentication bugs are avoided.

Lab

On your reels app: confirm login uses password_hash/password_verify, add session_regenerate_id(true) after login, and confirm the site runs over HTTPS. Note whether login errors leak whether a username exists, and fix it to a generic message.

Extended teaching notes

Why this lesson matters

Part 11 turns tool skills into professional defensive practice: web risks, cloud, SOC work, hardening, cryptography, Indian law and careers. Every example below stays inside systems you own or public teaching material.

Indian company (sample data)

Suppose we are a junior security engineer at an Infosys or TCS client project. You take this lesson's checklist, map it to three production services (for example a Spring Boot API, a Node.js portal and a Python job), and open tickets with evidence and owners.

Global practice

Follow public guidance from OWASP, CERT-In, CISA and cloud provider Well-Architected / security pillars. Cite them in reports.

Everyday analogy

A cricket team that only practises hitting but never fielding loses matches. Offence skills in a lab exist to improve fielding in real systems.

Apply across stacks

Wherever code appears, ask the same questions.

Java / Spring Boot

Parameterise queries, encode output, limit Actuator, patch dependencies.

.NET

EF Core parameters, HTTPS, Data Protection API, patch NuGet.

Node.js

helmet, parameterized SQL, npm audit, lockfiles.

Python

ORM, autoescape, pip-audit, Bandit.

Go / PHP / Ruby

Safe templates, prepared statements, govulncheck / composer audit / Brakeman.

nginx / Apache / Tomcat

Hide versions, TLS, least-open ports.

MySQL / PostgreSQL / MongoDB / Redis

No public ports, auth on, least-privilege users.

AWS / Azure / GCP

Roles not keys, private data stores, cloud logs on.

Defender worksheet

  1. Write a 5-line summary.
  2. Name one related public breach or advisory.
  3. Practise one safe command on a lab you own.
  4. Write the fix for a teammate.

Recap

  • Permission first.
  • Fix over spectacle.
  • Evidence in notes.

Defender's worksheet (do this today)

  1. Write the lesson title and date.
  2. List three owned systems where it applies.
  3. Run one safe lab check and paste evidence.
  4. Write a two-sentence fix for a teammate.
  5. Note one CERT-In or CISA advisory that relates (title + date).

Indian workplace (sample)

At a Wipro or LTIMindtree client SOC, turn this lesson into one playbook step with an owner and a due date.

Global practice

Compare your notes with OWASP, CIS Benchmarks or a cloud Well-Architected security question. Write the overlap in five lines.

Family test

Explain the risk and the fix without jargon. If a parent or sibling can repeat the warning, you are ready to teach juniors.

Common mistakes

  • Skipping permission.
  • Tool collecting without fixing.
  • Publishing lab screenshots that contain secrets.
  • Treating encoding as encryption.

Recap

  • Evidence, fix, owner, date.
  • Own lab only.

Key terms for this page

  • Control: a safeguard (patch, config, process).
  • Finding: a weakness with evidence.
  • Remediation: the fix and how you verified it.
  • Scope: systems you are allowed to touch.
  • Least privilege: only the access required for the task.
  • Defence in depth: several controls in layers.

Mini case study

Suppose we are a junior engineer at Zoho or Freshworks (sample data). A weekly review asks each person to present one control from their area. You pick a control from this lesson, show a before/after screenshot from a lab, and list the production ticket you would open. That habit builds both skill and credibility.

Real incident: Radware – an internal Cloud WAF admin API was open on the internet with no login, and customer cloud keys were exposed (Nov 2026)

1. What happened

In this lesson you learnt that A07 means the app does not check properly who is asking. Why does this case matter? Because here a security company left an admin API with no login at all, and it was reachable from the open internet.

  • Radware is a security company. It sells a Cloud WAF (web application firewall), bot protection and DDoS protection, and says it has more than 12,500 enterprise and telecom customers.
  • A Radware root cause report, seen by BleepingComputer, says that on 19 November 2026 an unauthorized party used an internal-only Cloud WAF management API. The API was reachable from the public internet and did not ask for any authentication.
  • Data that may have been read: customer contact details, and for some customers, the credentials used to send WAF logs to their own storage: AWS S3 access keys, Azure Blob Storage keys or SAS tokens, and SFTP logins.
  • Radware found the access about 10 hours after it started. It blocked the source IP and the API, and replaced all its internal account credentials.
  • The report says WAF protection kept working. Radware found no sign of access to customer app traffic, certificates or end-user data.
  • Radware told affected customers to rotate their log-export keys and read their storage access logs from 19 November. Some customers said AWS alerted them about an unknown IP trying to reach their log buckets. Radware was still investigating.

2. How the hack happened (public reporting only – high-level)

  1. Radware had a management API for its Cloud WAF. It was meant only for internal use.
  2. By mistake, this API was open to the whole internet.
  3. Worse, it had no authentication. Anyone who found it could send requests, with no password and no token.
  4. An outsider found it on 19 November and used it to read customer details and stored log-export keys.
  5. Stolen keys can be tried against the customers' own cloud storage. That is why some customers saw AWS alerts about an unknown IP.
  6. Radware noticed about 10 hours later and shut the door.

3. How to stop it / defend (this lesson: A07 authentication failures)

Why: "internal" is a label, not a lock. If an API can be reached and does not check who is calling, it is a public API.

What a team can do:

  1. Every API must ask for authentication, even internal and admin ones. Use tokens or keys, and check them on every request.
  2. Keep admin APIs off the internet. Put them on a private network, behind a VPN or an IP allow-list.
  3. Deny by default. The gateway should reject any request without a valid token, before it reaches the app.
  4. Look at yourself from outside. Keep a list of all your internet-facing hosts and APIs, and scan them often for anything that answers without login.
  5. Do not hand out secrets in API replies. Store keys encrypted, show them only once, and give each key the smallest access, for example "write logs only".
  6. Alert fast on unusual API use, like many requests from a new IP, so you find a problem in minutes, not hours.

Example: a simple "is any admin API open?" drill.

  1. Rule: no admin or internal API may answer a request from the internet without a valid login.
  2. Action: from a normal home network, call each admin API address on your list without a token.
  3. Check: every call must fail or be blocked. If one returns data, close it the same day.
  4. What it means: you find an open door before an outsider does.

4. How to take care so it won't happen again (checklist)

  • [ ] Every API, internal or not, checks login on every request.
  • [ ] Admin and management APIs are not reachable from the public internet.
  • [ ] We keep a list of internet-facing hosts and APIs and scan it often.
  • [ ] Keys we store for customers are encrypted, never shown again in API replies, and have the smallest access.
  • [ ] We alert on unusual API use and can block it quickly.
  • [ ] If you use a vendor that stores your cloud keys: rotate them after any vendor alert, and read your storage logs.

Source: BleepingComputer, "Radware discloses breach exposing customer cloud access keys", 24 November 2026 (quoting a Radware root cause analysis report shared with BleepingComputer; Radware had not made a public statement at that time).

Ravindra Bagale's Tip

Never trust the word "internal". Before any API goes live, ask one question: what happens if a stranger on the internet calls this with no token? If the answer is anything other than "blocked", it is not ready.

Check if you're safe: Password Strength Checker