Repository navigation
feat(lesson): add SQL injection lesson and update tutorial guide (#84) - #131
Conversation
…ndewatnitrr#84) - Add comprehensive lesson-sql-injection.md covering SQLi fundamentals, code-vs-data separation, and database roles. - Cover in-band (error-based, union-based) and blind (boolean-based, time-based) SQLi mechanisms. - Include vulnerable PHP and Python code samples and step-by-step auth bypass (' OR '1'='1) walkthrough. - Introduce sqlmap automated testing strictly targeting 127.0.0.1 with low-risk non-destructive flags. - Incorporate existing repository lab (sql-injection-lab) with Docker and venv instructions. - Prioritize parameterized queries / prepared statements with remediated PHP (PDO) and Python implementations. - Detail defense-in-depth: allowlisting, escaping pitfalls, database hardening, and adaptive password hashing. - Update README.md tutorial guide to index the new SQL injection lesson.
|
@bhushan4work is attempting to deploy a commit to the amandewatnitrr's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@amandewatnitrr could u plz do a final review before merge ? |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
🟢 Approval recommended
It is a documentation-only addition whose lab references, links, and anchors I verified as accurate, with only a single optional note about the "secure" Python example using un-salted SHA-256.
1 open issue
What changed in this PR
This PR adds a comprehensive, educational SQL Injection (SQLi) lesson to the ethical-hacking/ tutorial series and links it from the README Tutorial Guide. It fills the web-application-security gap identified in issue #84, covering SQLi fundamentals, classifications (in-band, blind, OOB), vulnerable PHP/Python examples, an authentication-bypass walkthrough, safe local sqlmap usage, integration with the repository's existing sql-injection-lab, and defense-in-depth remediation. The lesson is documentation-only and introduces no runtime code changes.
Changes:
- New
ethical-hacking/lesson-sql-injection.md(754 lines) with a TOC, mermaid diagrams, code examples, and a quick-reference table. - README
Tutorial Guideupdated with a link to the new lesson. - Lesson references and cross-links the existing
sql-injection-lab(endpoints, run commands, smoke tests), which I verified against the actual lab code.
| File | Description |
|---|---|
ethical-hacking/lesson-sql-injection.md |
New foundational SQLi lesson; follows the existing lesson-dns.md/lesson-sni.md title+TOC convention, and its lab endpoint/command/data references match the real sql-injection-lab. |
README.md |
Adds a Tutorial Guide link to the new lesson; path and placement are correct. |
Review effort: Balanced
| def verify_password_hash(plain_password: str, stored_hash: str) -> bool: | ||
| # Example placeholder: in production use bcrypt.checkpw or argon2.PasswordHasher | ||
| import hashlib | ||
| # Simulating constant-time comparison | ||
| computed_hash = hashlib.sha256(plain_password.encode()).hexdigest() | ||
| return hmac.compare_digest(computed_hash, stored_hash) |

Summary
closes #84
How I Tested This
python3 mask_ip_addresses.py --checkpassed.upstream/maincontains only the two intended files.