Full course

Build Secure .NET Web Applications

This intensive course, ideal for .NET application developers, teaches methods and approaches for developing secure .NET web applications. It includes practical exercises based on .NET web applications.

Details

Course overview

This course is for .NET web developers who want to build and maintain secure applications on the current .NET stack. It looks at where vulnerabilities show up in ASP.NET Core MVC, Razor Pages and Web API projects, and at the framework features that prevent them. Each class of vulnerability is approached first from the attacker's side, on a realistic .NET application, then fixed with the tools a .NET developer already uses: parameterized access and LINQ with Entity Framework Core for injection, output encoding in Razor for XSS, ASP.NET Core Identity for authentication, the built-in Antiforgery and CORS middleware, the Data Protection API for tokens and cookies, and security headers (including a Content Security Policy) configured explicitly. In the exercises, participants exploit a flaw on a real codebase, fix it as they would in production and check that the fix holds. The course also covers the hosting layer, including Kestrel and IIS configuration and NuGet dependency hygiene, because secure code still needs a secure platform underneath. It suits .NET developers, tech leads and architects who want to write secure code and hold up in a security review.

Requirements

  • Basic knowledge of web application architecture and how the HTTP/HTTPS protocol works.

  • Working knowledge of C# and the .NET / ASP.NET Core ecosystem (MVC, Razor Pages or Web API).

  • No prior application security experience is required; the attacker's perspective is built up during the course.

Course content

  • Introduction to Application Security: fundamental concepts, the OWASP Top 10, and what "secure by default" means in the .NET ecosystem.

  • Secure Software Development Life Cycle (S-SDLC): integrating security into design, code review, CI/CD and testing for .NET projects.

  • Assessment methodologies (black box vs white box): comparing external testing with source-driven review of C#/.NET code.

  • Tools and resources: using Burp Suite to inspect ASP.NET Core traffic, plus the analyzers, libraries and guidelines that support secure .NET development.

  • Bug Bounties: how the programs work and how a company can adopt them, alongside penetration testing, to keep surfacing new vulnerabilities as part of a secure development process.


  • Principles of secure coding in .NET: defensive defaults, safe framework APIs, and avoiding dangerous patterns in C#.

  • Information Gathering & Configuration Management: preventing information leakage through error pages, verbose stack traces, and misconfigured appsettings and environment configuration.

  • Injection - vulnerabilities and defense: SQL injection and Cross-Site Scripting (XSS) in .NET, remediated with parameterized queries, Entity Framework Core / LINQ, and Razor output encoding.


  • Authentication - vulnerabilities and defense: common authentication flaws and secure implementation with ASP.NET Core Identity, sound password storage and account-protection flows.

  • Authorization - vulnerabilities and defense: role-, claim- and policy-based authorization, and preventing IDOR and privilege escalation.

  • Prevention of Application Logic attacks: securing multi-step workflows and business rules that automated scanners miss.

  • Cryptography - vulnerabilities and defense: correct use of the .NET Data Protection API for tokens and cookies, modern algorithms, and safe key and secret management with Secret Manager and Azure Key Vault.

  • REST API security: securing ASP.NET Core Web API endpoints, tokens and authorization for client and service-to-service access.


  • Data Validation - vulnerabilities and defense: model binding and validation, guarding against over-posting / mass assignment, and input sanitization.

  • Session Management - vulnerabilities and defense: CSRF and session fixation, mitigated with ASP.NET Core Antiforgery and secure cookie configuration.

  • Logging and monitoring: capturing security-relevant events for detection and incident response without leaking sensitive data.

  • Client-side - vulnerabilities and defense: CORS misconfigurations, Clickjacking, and hardening with security response headers, including a Content Security Policy.

  • Denial of Service - vulnerabilities and defense: application-level DoS conditions and mitigation, including rate limiting and request limits.

  • IIS Hardening & .NET runtime security: securing Kestrel/IIS hosting, and NuGet dependency and supply-chain hygiene.


Your instructor

  • TBD Senior Instructor

Related courses
  • new

    Full course

    Secure Coding with AI

    Defensive
    ~32 hours
    Online

    Use AI coding assistants securely, with Copilot, Codex, Claude Code and SAST tools, to find and fix vulnerabilities as you write code.

    DISCOVER MORE
  • best-seller

    Full course

    Build Secure Java Web Applications

    Defensive
    ~32 hours
    Online

    Secure coding for Java and Spring: prevent the common vulnerabilities with Spring Security and safe defaults.

    DISCOVER MORE
  • Full course

    Build Secure PHP Web Applications

    Defensive
    ~32 hours
    Online

    Secure coding for PHP web applications, focused on the OWASP Top 10 and how to prevent it.

    DISCOVER MORE
  • Full course

    Build Secure Web Applications

    Defensive
    ~32 hours
    Online

    Language-independent secure coding for the web: the main vulnerability classes and how to defend against them.

    DISCOVER MORE