(soft music) Software vulnerabilities are unintentional flaws or weaknesses found in software that can be exploited by an attacker. Some vulnerabilities are created because of improper security configurations or programming errors. A zero-day vulnerability is a software security flaw that is known to the software vendor but doesn't have a patch in place to fix the flaw. The vendor usually provides mitigation recommendations to prevent an exploit of the vulnerability until a patch is developed. SQL injection is a vulnerability that allows an attacker to perform unauthorized SQL queries that an application makes to its database. This results in unauthorized access to confidential information. Here's an example of a normal SQL query. The account number string is passed into an SQL statement. The database is searched to retrieve the account number that matches the number entered and returns all associated data stored in the database about the account. The code might look something like this. If a user enters an account number in the webpage form labeled, "Please enter your account number," the resulting SQL query will look like this. This SQL command will return all data associated with the account number entered. This works as expected. Here's an example of an SQL injection query. An attacker enters an SQL query command into the input field. This time, instead of searching for the account number, the query looks for an account number or one is equal to one. One equal one will always be true, so all account data from the account number table will be returned. To prevent SQL injection attacks, consider these recommended practices. Perform input validation. Use a white list or allow list that includes specific allowed values accepted by the input field. Validate input against a known safe set of characters and length and use prepared statements so the user's input is not treated as an SQL statement. Another type of common software vulnerability attack is an OS command injection. This occurs when an attacker is able to execute system commands on the device's operating system via a vulnerable application. These attacks are caused by insufficient input validation. Here is an example of an OS command injection posted on the common weakness enumeration or CWE list, a community developed list of software and hardware weaknesses. In this example, the input value provided in the username variable is not validated. Any system commands provided in the username input would be accepted and RM command would be executed to delete the files in the home directory. Another best practice to prevent attacks is to avoid configuration errors within software functions. Insecure configurations of software settings can leave the user vulnerable to attacks exploiting that specific application. Examples of software configuration errors are unnecessary features enabled or installed such as unnecessary ports, services, pages, accounts or privileges, default accounts with their passwords still enabled and unchanged, security features left unimplemented, software kept out of date and unsupported by the vendor. In August, 2021, Microsoft Power Apps misconfiguration exposed 38 million data records. According to UpGuard, sensitive data including COVID-19 vaccination statuses, social security numbers and email addresses was exposed due to weak default configurations for Microsoft Power Apps which are low code tools used to design apps and create public and private websites. The vulnerability affected American Airlines, government agencies, and other customers across numerous industries. As a result of the exposure, Microsoft updated the software to have table permissions enabled by default, removing the default configuration that allowed anonymous access. One final type of software vulnerability attack is buffer overflow. A buffer is a temporary holding space in memory for storing data. Buffer overflow is a programming vulnerability that occurs when an application stores more data in the buffer memory than the size of memory defined. For example, let's say a field on a webpage requires an account number. The field is expecting eight characters but you enter 10 characters instead, two more bytes than expected. The application accepts the input and writes the 10 character value to memory which exceeds the expected buffer size of eight. The application does not allocate an appropriately sized buffer space and fails to perform a validation check to confirm the size of field expected so the buffer overflow occurs. Some programming languages such as C or C++ are more susceptible to buffer overflow because they do not have overflow protection built in. Java and JavaScript are less vulnerable to buffer overflow vulnerabilities. The majority of buffer overflow vulnerabilities are caused by insecure coding. To prevent buffer overflow vulnerabilities, consider putting secure coding checks in place performed by developers. Considerations for developers include, avoiding risky programming functions such as STRCPY when possible in programming languages that are susceptible to buffer overflows, defining the appropriate buffer size expected, performing input validation checks to confirm expected length of field and paying attention to compiler warnings and recommendations to use secure alternatives of programming functions used.