Writing Secure Code in C#
Find and fix real security vulnerabilities in C# code. 8 hands-on lessons covering injection, auth, crypto, data protection, and more — each with vulnerable starter projects.
View badge details
About This Course
Course Curriculum
16 Lessons
Input Validation & Injection Prevention
Learn to identify SQL injection, command injection, XSS, and path traversal — the OWASP Top 10 injection attacks.
Input Validation - Lab Exercises
Identify and fix SQL injection, command injection, XSS, and path traversal vulnerabilities in a C# application.
Authentication & Password Security
Learn proper password hashing, salting, bcrypt, timing attacks, and brute-force prevention.
Authentication Security - Lab Exercises
Eliminate plaintext passwords, implement proper hashing with bcrypt, prevent timing attacks, and add brute-force protection.
Cryptography Fundamentals
Learn correct usage of symmetric encryption, hashing vs encryption, and authenticated encryption.
Cryptography - Lab Exercises
Correctly use symmetric encryption, asymmetric encryption, and cryptographic hashing. Avoid common cryptography mistakes like ECB mode, reused IVs, and missing authentication.
Secure Data Handling
Learn to prevent sensitive data exposure through logs, exceptions, debug output, and insecure storage.
Data Handling - Lab Exercises
Prevent sensitive data exposure through logs, exceptions, debug output, and insecure storage. Classify data and apply appropriate protection.
Secure File Operations
Learn to prevent path traversal, validate uploads, secure temp files, and handle TOCTOU race conditions.
File Operations - Lab Exercises
Prevent path traversal attacks, validate file uploads properly, secure temporary files, and handle TOCTOU race conditions.
Secrets Management
Learn to eliminate hardcoded secrets and use proper configuration hierarchies.
Secrets Management - Lab Exercises
Eliminate hardcoded secrets, use proper configuration hierarchies, and understand environment-based secrets management patterns.
Secure API Communication
Learn TLS validation, HTTPS enforcement, safe deserialization, and proper credential handling in HTTP.
API Communication - Lab Exercises
Secure HTTP client usage, certificate validation, request sanitization, and safe deserialization practices.
Capstone Briefing — Security Audit
Review all 7 security categories and understand the capstone security audit methodology.
Security Audit Capstone - Lab Project
Perform a full security audit on a vulnerable application. Find and fix 10 vulnerabilities spanning all 7 previous lessons. Your fixes are graded by the AI code reviewer.