Secure Code Warrior C# Basic OWASP Web Top 10 2017 1: Injection Flaws and 2: Broken Authentication vulnerabilities

发布时间 2023-10-17 16:58:09作者: ChuckLu

Let's start with the most critical application weaknesses. These challenges get you the foundations of 1: Injection Flaws and 2: Broken Authentication vulnerabilities

1: Injection Flaws 

Injection Flaws - OS Command Injection

Using the System.IO library, the temporary files folder is cleared (the type of which is selected by the user). User input is limited, therefore user-supplied input does not affect the OS command.

 

Injection Flaws - NoSQL Injection

Using string concatenation when building the NoSQL query filter may allow an adversary to inject malicious code to get access to sensitive information or carry out unauthorized operations.

Database queries should be built with parameterized input or OM/ORM technologies, if possible. Parameterized input is used to build a Mongo query filter. All parameters will be automatically escaped so an attacker will not be able to inject malicious query code.

 

 

 

2: Broken Authentication vulnerabilities