Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

jpalanco/simplest-vulnerable-asp.net

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Vulnerable ASP.NET Core Application

Caution

DANGER: INTENTIONALLY VULNERABLE APPLICATION

This application contains multiple intentional security vulnerabilities.

  • DO NOT deploy this to a production environment.
  • DO NOT run this on a public network.
  • DO NOT use the code patterns found here in real applications.

It is designed strictly for educational and testing purposes only.

Overview

This project is an ASP.NET Core 6 MVC application designed to demonstrate common web application vulnerabilities. It serves as a training ground for developers and security professionals to understand how these vulnerabilities work and how to identify them.

Vulnerabilities Implemented

1. SQL Injection (SQLi)

  • Login Bypass: Authentication logic uses string concatenation, allowing attackers to bypass login without a valid password.
  • Data Extraction: Search functionality allows UNION-based attacks to extract data from other tables.

2. Cross-Site Scripting (XSS)

  • Reflected XSS: Search query input is reflected back to the user without encoding.
  • Stored XSS: Comments section saves unsanitized input to the database, which is then rendered to all users.

3. Remote Code Execution (RCE)

  • Command Injection: A ping utility that concatenates user input into a shell command.
  • Insecure Deserialization: Uses the deprecated and dangerous BinaryFormatter to deserialize uploaded files.

4. Software Composition Analysis (SCA)

  • Vulnerable Dependencies: The project intentionally references outdated NuGet packages with known CVEs (e.g., Newtonsoft.Json 12.0.1).

Getting Started

Prerequisites

  • .NET 6.0 SDK

Running the Application

  1. Navigate to the project directory:

    cd VulnerableApp
  2. Build the project:

    dotnet build
  3. Run the application:

    dotnet run
  4. Open your browser and navigate to http://localhost:5000 (or the port shown in the console).

Educational Use

Each vulnerability page includes:

  • A description of the vulnerability.
  • The vulnerable code snippet.
  • An interactive form to exploit the vulnerability.

Disclaimer

The authors of this project are not responsible for any misuse of this application. It is provided "as is" for educational purposes only.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published