What is Secure Software Development?
What is Secure Software Development?
As technology advances, accessing and utilizing information has become significantly easier. However, this progress has also benefited cyber attackers, leading to an increase in cyber threats and the development of new methods and techniques. Unfortunately, there are malicious individuals who seek to obtain this data forcefully and exploit it for their own gain. Secure software development refers to the process of protecting software from threats or attacks while it performs its functions and taking preventive measures against cyber threats.
The goal of software security activities is to create more resilient and protected development against all types of attacks. Attacks on software can have various purposes, such as rendering the software completely inoperable, altering the software’s code by injecting malicious code to make it serve a different purpose, or identifying vulnerabilities in the software to infiltrate the system it runs on and other software within that system.
Secure Software Development Models
Examining the software development models proposed so far reveals that the secure software development life cycle is at the core of each. The first step of the cycle, increasing education and awareness, is a fundamental element that should persist throughout the entire process. During this phase, personnel should be educated about threat factors and trained in security testing.
In the needs analysis phase, the requirements for software development, security, and testing should be identified. During the design and risk analysis phase, methods such as threat modeling and privacy risk analysis are used to determine the types of risk groups the software may fall into. During development, the software is developed according to the methods specified in the previous steps, and techniques like source code analysis should be employed.
In the verification phase, the resulting software is tested against fundamental security principles such as confidentiality, integrity, and availability. Any identified vulnerabilities are then addressed. During deployment, the software is in its final form and ready for release. The results of the previous processes are observed in this phase as the software is presented to the user.
In the vulnerability management and feedback phase, user feedback helps identify any overlooked or necessary changes in the software. Once these issues are identified, personnel are retrained on the deficient or incorrect areas, thus restarting the process.
Capability Maturity Model
Developed in 1986, this model focuses on improving existing applications. It aims to address weaknesses in specific areas rather than developing the product in accordance with security standards.
Capability Maturity Model Integration
Based on the CMM model, CMMI aims to provide solutions related to the control and management of an organization. The CMMI model consists of five levels and is oriented towards improving product development, sustainability, and sales management.
Microsoft Security Development Lifecycle
Developed by Microsoft to address encountered problems, this model integrates security and privacy. Based on the basic software life cycle, this model’s process is entirely dependent on the project manager.
Software Assurance Maturity Model
Developed by OWASP, this model aims to incorporate information security operations into the software development process. This model is independent of the organization’s size and can be used for a single task, the entire organization, or a specific part of it.
In addition to these models, there are many secure software development approaches, each with its own advantages and disadvantages. It is quite difficult to claim that one model is better than the others. The crucial point is to analyze the needs by considering the organization’s structure, size, and activities, and then select the appropriate model. A wrong choice can overload the development or testing teams with excessive work, making the process more complex than necessary. On the other hand, choosing an inadequate model can lead to vulnerabilities that may harm users and put the organization in a difficult position.
Threats to Secure Software
Code Injection
Code injection involves exploiting vulnerabilities in software or network environments to insert and execute code snippets in a target system. To prevent this, inputs should be filtered, the use of keywords in programming languages should be avoided, and all input/output operations should be controlled using methods like stored procedures in SQL operations. Additionally, having a layered architecture in the developed application plays an active role in preventing such dangers.
XSS Vulnerabilities
XSS is a type of attack listed in the OWASP Top 10. It occurs when user input is stored in a database in HTML format. For example, if a malicious person writes JavaScript code in the comment section of a website, and if there is an XSS vulnerability, this code can execute and cause unwanted situations. There are three types of XSS vulnerabilities:
- Reflected XSS: When JavaScript code is sent as input, and if this input is to be displayed on the screen, the code executes.
- Stored/Persistent XSS: In this type of XSS attack, the user input is stored directly in a place like a database instead of being printed to the screen. Later, when users visit the relevant page normally, this code runs as if it was written by the developer for that page every time.
- DOM XSS: In a DOM-based XSS attack, the malicious code operates directly on DOM objects without reaching the server side. For example, if we create a user list with JavaScript, and if there is an XSS vulnerability, we can manipulate the process by external intervention while printing this list and make it perform a desired operation.
SQL Injection
SQL Injection is a vulnerability that occurs by using meta-characters, which have special meanings for compilers. It involves attackers writing characters that manipulate SQL code into fields where user information such as usernames and passwords are entered, thereby accessing the database. For example, consider the following input: 10 or 1=1. The SQL equivalent of this input is:
SELECT * FROM Users WHERE UserID = 10 or 1=1
In this query, the or 1=1 expression in the WHERE condition always returns true. Therefore, regardless of the UserID, we can see the list of users. If this table also stores user passwords, all user information can be stolen.
In another scenario, when entering data into a numeric field, the data type should be checked. For example, if a parameter like 1; DROP TABLE 'Users'; is entered in the following command, the table will be deleted:
SELECT * FROM Users WHERE UserID = ""
Shell Injection
Shell Injection is a vulnerability that can be found in any application using the command line. It is essential to check whether the received data is a special keyword for the command line. Otherwise, the attacker can access the command line, leading to unwanted situations in the system.
In today’s world, where everything is on the internet, the security of software and hardware is crucial. Failure to take necessary precautions can result in losses that damage both the institution’s reputation and economy. With the developed tools, conducting cyber attacks has become quite easy. These developments should be monitored, and personnel within the institution should be trained on relevant topics, with cybersecurity training provided.