Section 10 - Secure Software Development Flashcards
To try and counteract the complexity of our software development, many models and methods have been introduced, the most common of which is known as…?
SLDC
Software Development Life Cycle
What is SLDC?
An organized process of developing a secure software application throughout its life cycle throughout the project.
*** This process covers everything - from the initial idea of the software, through its coding and testing, and even into its deployment and retirement.
SLDC is based on a generic ___ model of development.
Waterfall
How does the waterfall model of development work?
Each phase of life cycle is broken down into smaller portions. As each one is finished, the next one has begun.
The reason this model is termed with the “Waterfall” is that information and the software product itself flows from the top stage all the way down to the bottom stage, getting more developed as it progresses downward. Visually, this looks like a waterfall.
What are the seven phases of SLDC?
- Planning and Analysis
- Software or Systems Design
- Implementation
- Testing
- Integration
- Deployment
- Maintenance
What happens during the first phase of SLDC?
Planning and Analysis
During this stage, the goals of the software project are determined, the stakeholder needs are assessed, and all of the high-level planning work is conducted.
*** This is where things go from a rough idea that someone has into a more formalized and well developed concept
What happens during the second phase of SLDC?
Software or Systems Design
The application or system is defined, outlined, and diagrammed in detail.
*** This is where we focus on the overarching inputs and outputs of each function that are going to make up the final software that’s going to be released to our customer.
What happens during the third phase of SLDC?
Programmers will begin to code of all the various functions that are needed for the final product.
As each piece of code is developed, the programmers will conduct some basic debugging and testing to ensure that its functionality is working properly.
What happens during the fourth phase of SLDC?
Formalized Testing
During this stage we get the code and check it through a myriad of different testing methodologies.
What happens during the fifth phase of SLDC?
The application of systems is integrated into the larger network environment.
Whereas in phase four we focus on testing the individual application or system, in phase five we focus on testing the end-to-end service to ensure that all of the pieces and all of the parts can communicate effectively and correctly.
What happens during the sixth phase of SLDC?
Deployment
The application or system will be moved into the production environment where your customers and your end users can now utilize it.
*** This is the phase that allows real work to be done using your new software application.
What happens during the seventh phase of SLDC?
Maintenance
Programmers are now focused on bug fixes, patches and updates to the version of the software that you’re going to end up using. In addition, your service desk focuses on helping users understand how to use your program.
When we discuss maintenance of the software, two very important concepts are…?
Version Control
Configuration Management
*** This will ensure that as you update or fix a problem in your baseline configuration, you have a way to identify what is the newest version and what is the older version. This is also where we determine when software is outdated, old and may need to be retired.
What is the common way that companies show the newest version of their product?
A numbering scheme that consists of major, minor and build version numbers.
For example, if you’re running Windows 10.0.12425 then:
10 - major version
0 - minor version
12425 - build number
As opposed to the waterfall model of development, there is a new model rising in popularity. This is known as…?
Agile Development
How does Agile Development work?
Software development is performed in time-boxed or small increments to allow it to be more adaptive to changing requirements.
*** In this model, you still perform most of the phases that make up the Waterfall method but the difference is that you do them much quicker.
The waterfall method doesn’t support…?
Rapid development or rapid changes
In addition, you cannot add additional features until the initial product was already delivered.
** It takes 6 to 12 months to get from the first planning phase all the way to the seventh phase. Any changes would require you to go back in an earlier stage and continue down the Waterfall again.
Agile development projects work in what kind of time frame?
Two to four week time periods known as “sprints”
*** This is due to releasing smaller product portions more quickly and more often, and at the end of every sprint something has to be released.
What is “DevOps”?
DevOps is a term created from the words development and operations.This is a way of conducting business where the software developers an the IT operations personnel work closely together to speed up the development and deployment of the applications and to get things out to the end user quicker.
What are the three tenets of the CIA triad?
Confidentiality
Integrity
Availability
What does the “C” of the CIA triad mean?
Confidentiality
Ensures that only authorized users can access the data being processed by an application. The most common way of ensuring confidentiality is to include the use of encryption to maintain the secrecy of the data being stored.
What does the “I” of the CIA triad mean?
Integrity
Integrity is focused on ensuring the data is not modified or altered without permission.The two main ways that we do this as developers is by utilizing hash algorithms as a method of integrity check for the data or by using journaling and logging functions to create audit trail showing the integrity of the data has not been compromised.
What does the “A” of the CIA triad mean?
Availability
When developers are attempting to ensure availability, they’re focused on ensuring that the data is available to authorized users when it’s needed. The most common way of doing this is by creating redundancy in the overall system design, by ensuring their software code is error-free, or by ensuring that their software can conduct error handling appropriately to prevent crashes.
What secure coding practices should our programmers use during development?
- Least Privilege
- Defense in Depth
- Never trust user input - Any input that’s received from a user should always undergo input validation prior to allowing an application to use it. Proper input validation can stop a lot of different types of attack including SQL injections, buffer overflows, and more.
- Minimize our attack surface in our applications and our systems - This means that we should always reduce the amount of code used by a program, we should eliminate unneeded functionality, and we should also require authentication prior to running any additional plugins.
- Create secure defaults - Most of the time, our users are going to accept the default installation configurations.This can lead to insecurities in our systems.Therefore, developers should always ensure the default installation includes secure configurations by default and then requires an administrator or a user to lessen those secure defaults if they want to remove the security.
- Whenever you’re deploying your applications, you should always use code signing to ensure that the program has not been changed either inadvertently or maliciously prior to its delivery to your end users - By using digital signatures as part of your code signing, you’re enabling the end user to see that the program was authentic and it maintains the integrity throughout its lifecycle.
- Ensure code is developed to fail securely - By ensuring that your application is coded to properly conduct error-free handling exceptions, they can fail securely instead of crashing or being exploited by an attacker. Again, input validation here will go a long way in helping your programs fail securely instead of just crashing.
- Fix security issues - If the vulnerability is identified, it should quickly be corrected and patched to remove that vulnerability from your application or system.
- Rely on trusted SDKs and third-party libraries -
What is “Least Privilege”?
Least privilege means that user or processes should be run using the least amount of access necessary to perform the given function.
Does your application require administrative permissions to run? If so, why?
Developers should always try to use the lowest permission level when they’re performing a function. So whenever it’s possible, the program should be run as a user-level person instead of an administrator or root-level one.
What is “Defense in Depth”?
Defense in depth occurs when you layer security controls to create a more effective and secure application or system than would be possible if you relied on a single control.
What is an “SDK”?
An SDK is a Software Development Kit and it allows a programmer to reuse code from other programmers in order to save them time and effort. Essentially, we are reusing somebody else’s code inside your own applications.
For example, if you’re developing a new Windows application, there’s no reason for you to code your own function to open a file on the hard drive. This function exists in almost every program out there. So, there’s a software development toolkit that provides this function along with many other file input and output functions. The same holds true for third-party libraries.
What are the three types of system testing that a security analyst might use?
Black Box Testing
White Box Testing
Gray Box Testing
What is “black box testing”?
Black-box testing occurs when a tester is not given any information about the system or program before beginning their test.
What is “white box testing”?
In white-box testing, the tester is given the details of the inner workings of the program or system. This may even include access to the full source code of that program, diagrams of the system, user access credentials, logons, and more.
What is “gray box” testing?
This is a mixture of black-box and white-box where the tester is given some amount of information about the system and conducts his testing as if he doesn’t have full access to it.
What is a “runtime error”?
If the program is running when the error occurs, the error is known as a runtime error.
What is a “syntax error”?
If the program fails to run because of a coding error, this is known as a syntax error.
The most common type of error in programming is…?
When a programmer doesn’t put the proper syntax expected by that programming language, such as leaving out a closing parenthesis or missing a semicolon inside their code.
What is “input validation”?
Input validation simply means that programmers have written code that validates the information being received from the user and ensuring that it matches a specific format or a range of values.