Wednesday, February 18, 2026

๐Ÿ“— PHASE 2: Web Security Core (Month 3–4)

 

๐Ÿ“— PHASE 2: Web Security Core (Month 3–4)


๐Ÿ”ฅ OWASP Top 10 (Very Important)

1️⃣ SQL Injection

Vulnerable code:

SELECT * FROM users WHERE username = '$user';

Attack:

' OR '1'='1

Fix:

  • Prepared statements

  • Parameterized queries


2️⃣ XSS (Cross-Site Scripting)

Stored XSS:

  • Malicious script saved in DB

Reflected XSS:

  • Injected via URL

Fix:

  • Escape output

  • Use Content Security Policy


3️⃣ CSRF

User logged in → attacker forces request.

Fix:

  • CSRF tokens


4️⃣ Broken Authentication

Fix:

  • Strong hashing (bcrypt)

  • Secure session handling

No comments:

Post a Comment

UGC NET Paper 1 Crash Plan (20 May – 22 June)

  UGC NET Paper 1 Crash Plan (20 May – 22 June) ๐ŸŽฏ Goal Target: Strong score in Paper 1 through: PYQs MCQs Revision Mock Tests Fast concept ...