AlexGoOn/the-most-vulnerable-dotnet-app
Über uns
Dieses Lern-Repository veranschaulicht die häufigsten Schwachstellen in .NET-Anwendungen.
Lernen und BildungGemessener Sternzuwachs
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- Verlauf wird gesammelt
Nettoänderungen in überlappenden Zeiträumen, keine Tagessummen. Fehlende Messwerte bleiben leer. Sterne zeigen Interesse, nicht Qualität.
README.md
OriginalThe Most Vulnerable .NET App - Educational Project
This application contains intentionally vulnerable code for educational purposes only!
This is an interactive educational project that demonstrates common security vulnerabilities in .NET applications. Each vulnerability is reproduced in a real working .NET environment where you can debug, explore, and understand what NOT to do, along with recommended secure practices.
Learning Process
- Learn by Example: See real vulnerable code in action
- Debug and Explore: Step through vulnerable code paths
- Learn Best Practices: Each example includes secure alternatives
- CWE (Common Weakness Enumeration) References: Every vulnerability links to official CWE documentation for pro insights
[!Note]
This repository compliments the following YouTube video: I Built the Most Insecure .NET App
Vulnerability Categories
Injection Attacks
SQL Injection (CWE-89)
Executing arbitrary SQL commands through string concatenation in queriesCommand Injection (CWE-78)
Executing system commands via Process.Start with user inputCode Injection (CSharpScript) (CWE-94)
Executing arbitrary C# code through dynamic script evaluationTemplate Injection (CWE-1336)
Injecting code into template engines (Razor, etc.)LDAP Injection (CWE-90)
Manipulating LDAP queries through unsafe search filtersXPath Injection (CWE-643)
Manipulating XPath queries to XML documentsXML Injection (CWE-91)
Injecting malicious XML contentCRLF Injection (CWE-93)
Injecting carriage return and line feed charactersExpression Language Injection (Dynamic LINQ) (CWE-917)
Injecting code into dynamic LINQ expressionsJSON Injection (CWE-91)
Manipulating JSON serialization/deserializationLog Injection (Log Forging) (CWE-117)
Injecting malicious data into logs through improper sanitization
Cross-Site Scripting (XSS)
Stored XSS (CWE-79)
Storing and displaying HTML content from database without sanitizationReflected XSS (CWE-79)
Displaying URL parameters without escaping in HTMLXSS With JS Interop (CWE-79)
Client-side JavaScript manipulation with user inputXSS via Attributes (CWE-79)
Injecting malicious code into HTML attributesXSS via SVG (CWE-79)
Embedding JavaScript in SVG filesXSS via File Upload (CWE-79)
Uploading HTML files with malicious scriptsXSS via CSS (CWE-79)
Using CSS expressions for code execution
Authentication & Authorization
Hardcoded Credentials (CWE-798)
Usernames and passwords hardcoded in source codeMissing Authorization Check (CWE-862)
API endpoints accessible without authorization checksBroken JWT Implementation (CWE-347)
JWT without signature validationPrivilege Escalation (CWE-269)
Modifying user role through form fieldInsecure Direct Object Reference (IDOR) (CWE-639)
Accessing other users' data by modifying ID parametersPassword Reset Poisoning (CWE-640)
Host header injection in password resetWeak Password Requirements (CWE-521)
Allowing weak passwords
Cryptography Issues
Weak Hashing (MD5/SHA1) (CWE-327)
Using cryptographically weak hashing algorithmsECB Mode Encryption (CWE-327)
Using Electronic Codebook modeInsufficient Key Length (CWE-326)
Using short encryption keys (DES, 3DES)No Salt in Password Hashing (CWE-759)
Hashing passwords without unique saltPredictable Random Numbers (CWE-338)
Using Random instead of cryptographically secure generatorImproper Certificate Validation (CWE-295)
Disabling SSL certificate validation
Sensitive Data Exposure
API Keys Exposure (CWE-798)
Exposing API keys in client-side codeSensitive Data in Logs (CWE-532)
Logging passwords, credit cards, tokensVerbose Error Messages (CWE-209)
Exposing stack traces and internal detailsDirectory Listing (CWE-548)
Exposing directory contentsSensitive Data in URLs (CWE-598)
Passing tokens/passwords in query strings
XML & Serialization
XXE (XML External Entity) (CWE-611)
Processing untrusted XML with external entitiesInsecure Deserialization (BinaryFormatter) (CWE-502)
Using BinaryFormatter with untrusted dataJSON Deserialization Attacks (CWE-502)
Type name handling in JSON.NETInsecure YAML Deserialization (CWE-502)
YAML deserialization vulnerabilitiesXML Bomb (Billion Laughs) (CWE-776)
Exponential entity expansion attack
File Operations
Path Traversal (CWE-22)
Reading arbitrary files through path manipulation (../)Arbitrary File Write (CWE-73)
Writing to arbitrary file locationsZip Slip (CWE-22)
Archive extraction with path traversal
Server-Side Request Forgery
Basic SSRF (CWE-918)
Fetching URLs provided by userSSRF via File Upload (CWE-918)
Processing files with external references
Business Logic Flaws
Mass Assignment (CWE-915)
Over-posting attack on model bindingNegative Quantities (CWE-20)
Accepting negative numbers in business logicInteger Overflow (CWE-190)
Arithmetic operations causing overflow
API Security
Missing Rate Limiting (CWE-799)
APIs without throttlingCORS Misconfiguration (CWE-942)
Overly permissive CORS policyCSRF (Cross-Site Request Forgery) (CWE-352)
Executing unauthorized actions on behalf of authenticated usersExcessive Data Exposure (CWE-213)
Returning more data than needed
How to Use This Project
- Browse the Categories: Start from the home page and explore vulnerabilities by category
- Read the Description: Each page explains the vulnerability and its impact
- Try the Attack: Use the provided attack payloads to see the vulnerability in action
- Debug the Code: Set breakpoints and step through the vulnerable code
- Study the Fix: Review the secure implementation recommendations
- Check CWE Links: Follow the CWE links for comprehensive security knowledge
Additional Resources
Contributing
This is an educational project. If you'd like to add more examples or enhance them, contributions are welcome!
Remember: The only way to truly understand security vulnerabilities is to see them in action. This project provides a safe, controlled environment to do exactly that. Happy learning!
Ähnliche Projekte entdecken
Wird geladen…