AI Instructor Live Labs Included

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.

Intermediate
16h 15m
16 Lessons
Writing Secure Code in C# Badge

View badge details

About This Course

Learn to identify and fix security vulnerabilities in C# applications through hands-on exercises with intentionally vulnerable code. Each lesson teaches a security concept, then gives you a starter project with real vulnerabilities to find and fix. Topics cover the OWASP Top 10 for C#: injection prevention, authentication security, cryptography, data protection, secure file handling, secrets management, API security, and a capstone security audit.

Course Curriculum

16 Lessons
01
AI Lesson
AI Lesson

Input Validation & Injection Prevention

45m

Learn to identify SQL injection, command injection, XSS, and path traversal — the OWASP Top 10 injection attacks.

02
Lab Exercise
Lab Exercise

Input Validation - Lab Exercises

1h 15m 1 Exercises

Identify and fix SQL injection, command injection, XSS, and path traversal vulnerabilities in a C# application.

Fix Input Validation Vulnerabilities Find and fix 6 injection and input validation vulnerabilities ~30 min
03
AI Lesson
AI Lesson

Authentication & Password Security

45m

Learn proper password hashing, salting, bcrypt, timing attacks, and brute-force prevention.

04
Lab Exercise
Lab Exercise

Authentication Security - Lab Exercises

1h 15m 1 Exercises

Eliminate plaintext passwords, implement proper hashing with bcrypt, prevent timing attacks, and add brute-force protection.

Fix Authentication Vulnerabilities Eliminate plaintext passwords, implement bcrypt, fix timing attacks and add lockout ~30 min
05
AI Lesson
AI Lesson

Cryptography Fundamentals

45m

Learn correct usage of symmetric encryption, hashing vs encryption, and authenticated encryption.

06
Lab Exercise
Lab Exercise

Cryptography - Lab Exercises

1h 15m 1 Exercises

Correctly use symmetric encryption, asymmetric encryption, and cryptographic hashing. Avoid common cryptography mistakes like ECB mode, reused IVs, and missing authentication.

Fix Cryptography Vulnerabilities Fix ECB mode, reused IVs, wrong primitive choices, and add authenticated encryption ~30 min
07
AI Lesson
AI Lesson

Secure Data Handling

45m

Learn to prevent sensitive data exposure through logs, exceptions, debug output, and insecure storage.

08
Lab Exercise
Lab Exercise

Data Handling - Lab Exercises

1h 15m 1 Exercises

Prevent sensitive data exposure through logs, exceptions, debug output, and insecure storage. Classify data and apply appropriate protection.

Fix Data Handling Vulnerabilities Stop sensitive data leaking through logs, exceptions, ToString, and URLs ~30 min
09
AI Lesson
AI Lesson

Secure File Operations

45m

Learn to prevent path traversal, validate uploads, secure temp files, and handle TOCTOU race conditions.

10
Lab Exercise
Lab Exercise

File Operations - Lab Exercises

1h 15m 1 Exercises

Prevent path traversal attacks, validate file uploads properly, secure temporary files, and handle TOCTOU race conditions.

Fix File Operation Vulnerabilities Prevent path traversal, validate uploads properly, and fix race conditions ~30 min
11
AI Lesson
AI Lesson

Secrets Management

45m

Learn to eliminate hardcoded secrets and use proper configuration hierarchies.

12
Lab Exercise
Lab Exercise

Secrets Management - Lab Exercises

1h 15m 1 Exercises

Eliminate hardcoded secrets, use proper configuration hierarchies, and understand environment-based secrets management patterns.

Fix Secrets Management Vulnerabilities Remove hardcoded secrets and use proper configuration patterns ~30 min
13
AI Lesson
AI Lesson

Secure API Communication

45m

Learn TLS validation, HTTPS enforcement, safe deserialization, and proper credential handling in HTTP.

14
Lab Exercise
Lab Exercise

API Communication - Lab Exercises

1h 15m 1 Exercises

Secure HTTP client usage, certificate validation, request sanitization, and safe deserialization practices.

Fix API Communication Vulnerabilities Fix TLS validation, enforce HTTPS, secure headers, and safe deserialization ~30 min
15
AI Lesson
AI Lesson

Capstone Briefing — Security Audit

30m

Review all 7 security categories and understand the capstone security audit methodology.

16
Lab Exercise
Lab Exercise

Security Audit Capstone - Lab Project

1h 45m 1 Exercises

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.

Capstone: Full Security Audit Find and fix 10 vulnerabilities spanning all 7 security categories ~60 min
$19.99 / 3 months access

This course includes:

  • 24/7 AI Instructor Support
  • Live Lab Environments
  • 16 Hands-on Lessons
  • 3 Months Access
  • Completion Badge
  • Certificate of Completion
  • 7-Day Free Trial Available
Writing Secure Code in C# Badge

Earn Your Badge

Complete all lessons to unlock the Writing Secure Code in C# achievement badge.

Category
Skill Level Intermediate
Total Duration 16h 15m
Writing Secure Code in C# Badge
Achievement Badge

Writing Secure Code in C#

Awarded for completing the Writing Secure Code in C# course. Demonstrates ability to identify and fix security vulnerabilities including injection attacks, authentication flaws, cryptography misuse, data exposure, file operation risks, secrets management, and API security issues.

Course Writing Secure Code in C#
Criteria Complete all 8 lessons by finding and fixing 52 intentionally planted security vulnerabilities across injection prevention, authentication, cryptography, data handling, file operations, secrets management, API security, and a capstone security audit.
Valid For 730 days

Skills You'll Earn

C# Security OWASP Top 10 SQL Injection Prevention Cryptography Authentication Security Secure Coding Data Protection Secrets Management Security Auditing

Complete all lessons in this course to earn this badge