Domain 08 Software Development Security
Domain 08 Software Development Security
It is important to have secure software development practices to protect systems from potential risks
and ensure smooth operations.
It should be integrated into the product's core, protecting all layers rather than just the front-end or
wrapper around the functionality to achieve optimal security.
Software Development Life Cycle (SDLC)
It is a structured process that outlines the steps involved in creating, deploying, and
maintaining software.
If the current phase is completed successfully and all requirements are met,
the project can proceed to the next phase.
Software Development Life Cycle (SDLC)
Phase 5 Phase 7
Phase 1 Phase 3
Debugging Post
Feasibility study Design
and testing implementation
An instantiation of the SDLC is created when management determines that a new software application
is necessary or significant changes are required for an existing application.
This decision is made in response to an event, which may include any of the following:
Changes in regulation
Changes in risk
It is a crucial initial step in software development that evaluates the practicality and viability of a
proposed project across technical, economic, legal, operational, and scheduling aspects.
Extent to which
Feasibility of
Estimated time Difference of costs Ability of the the application will
developing a
needed to develop between custom existing system to support the
solution that
or acquire development meet current organization’s
works with other
the software and buying business needs strategic business
IT systems
objectives
Expenses involved
Capability of the The likelihood that
in creating Potential effects of
system to an innovative
interfaces proposed changes
accommodate change will
between the new on regulatory
future business enhance market
and existing compliance
requirements share
systems
Requirement Definition
It is a critical phase in the SDLC that involves understanding, documenting, and managing the needs of
stakeholders. It's the foundation for the entire software development process.
Selects appropriate
Designs individual software
algorithms and data
components and
structures for
their functionalities
efficient processing
Design Freeze
It is a critical milestone in the SDLC that involves making only insignificant changes to the product's
design to maintain stability and minimize the risk of defects or inconsistencies.
In this phase of SDLC, developers transform detailed design specifications into functioning software,
using the design document as their guide.
4GL 5 GL
These are a set of software applications designed to automate activities throughout the software
development life cycle (SDLC).
The following types of CASE tools help simplify the software development life cycle:
01 02 03
04 05
The following are its different categories, each supporting specific stages of the
software development life cycle (SDLC):
Compiling a A program is compiled once using a An interpreted code is compiled each time
program compiler. the program is run.
It generates the error message only It continues translating the program until
Error list generation
after scanning the whole program. the first error is met, in which case it stops.
It is a set of precompiled helper functions, objects, or modules that are intended to be reused during
software development.
• Standard libraries provided by most • Use libraries only from trusted sources
languages such as Python, C, C++, C#, that are actively maintained and
Java, and Ruby widely used by several applications.
• Open-source libraries, which are free to
• Create and maintain an inventory
reuse, modify, and publish without
catalog of all the third-party libraries.
any permission
• Proactively keep libraries and
• Third-party libraries
components up to date.
• Custom libraries
Tools and Toolsets
List of tools:
It refers to the collection of hardware and software resources needed for program execution on a
computer system.
Example
Java runtime environment (JRE) provides the complete framework for executing and managing
Java programs.
Integrated Development Environment (IDE)
It is a software platform that provides programmers and developers with a comprehensive set of tools
for software development in a single product.
Benefits:
It is a file archive and web hosting facility where many source codes are stored privately or publicly.
Example
Open-source projects and other multi-developer projects use a source code repository to handle
various versions.
Source Code Management (Version Control)
It is a vital part of the SDLC that tracks and manages changes to source code, enabling efficient
collaboration and maintaining code integrity.
Record keeping: It tracks changes to the source code, including check-outs, check-ins,
and modifications, allowing management to monitor the alterations and their authors.
Debugging and Testing
In this phase, the errors are identified and resolved, and the software's functionality is verified.
Debugging Testing
Monitor operation
Ensures that software modules correctly
manipulate data and perform calculations
Control
Ensure proper resource usage
Checks input fields and records to
Tests modules for proper resource
prevent errors and tampering which
utilization to avoid
. issues like
can lead to application abuse and
memory leaks
security incidents
Validate output
Performs output validation to verify that output
data is within acceptable bounds, detecting
malfunctions in application modules
Implementation
It involves putting the completed application software into the production environment before
starting User Acceptance Testing (UAT) and Quality Assurance Testing (QAT).
UAT and QAT should be performed on the production environment anticipated for use once
approvals are obtained.
Types of Implementation
Parallel cutover
The organization runs both old and new applications simultaneously
to compare performance and ensure proper functionality.
All-at-once cutover
The organization migrates the entire environment to the new
application at once.
Module-by-module cutover
The organization migrates different parts of the application at
various times.
Geographic cutover
In large retail networks, individual locations migrate to the new
application sequentially instead of all at once.
Training
It is a strategy that offers organizations a safety net during application migrations to new
environments, enabling a return to the previous state if significant issues occur.
It is a complex process that involves transferring data from one system or database to another.
The data migration project should be meticulously planned, and appropriate methodologies and tools
must be employed to minimize the risk of:
Once the implementation is done, an information system auditor performs the following:
It refers to any potential event or condition that could harm the success of a software project.
By proactively mitigating these risks, development teams can significantly boost the chances of project
success and consistently deliver top-notch, high-quality software.
Software Development Risks
Refers to the application not meeting business Highlights vulnerabilities within the
requirements, leading to its underuse application that could be exploited
or abandonment for misuse
Project risk
Scope creep
A. Interpreter
B. Compiler
C. Assembler
D. Verifier
Software Development Models
Software Development Models
It is a framework that is used to structure, plan, and control the software development process.
To manage a project efficiently, the manager or development team must choose the best-fitting
software development model.
All methodologies have different strengths and weaknesses and exist for different reasons.
Waterfall Model
It is a linear application development model that uses the following rigid phases:
Requirements analysis
Design
Implementation
Verification
Maintenance
It allows development to return to the previous phase to correct defects discovered during the
subsequent phase.
1 Requirements analysis
4 Testing
5 Maintenance
Prototype Model
In this model, a prototype of the end product is first developed, tested, and refined repeatedly
based on customer feedback until a final acceptable version is achieved.
• It is quickly created to test the • It is built with the goal of • It is an extension of the
validity of the current incremental updates. evolutionary prototype.
understanding of the project
• It is continuously improved • It is designed to be
requirement.
upon until it reaches the final implemented in a
• It is a quick and raw method product stage. production environment
of creating the prototype. while still being refined.
• It uses the feedback obtained
• It is not intended to be built during each phase to enhance • It gathers feedback during
upon but rather discarded the prototype. this phase and makes
after use. changes directly within the
working site.
Rapid Application Development Model (RAD)
Traditional
RAD
Demonstrate
It combines the idea of iterative development with the systematic and controlled aspects of the
waterfall model.
Cumulative cost
Progress
1. Determine 2. Identify and
objectives resolve risks
• It was developed in 1988 by Barry Boehm.
• It is a meta-model that incorporates several
Review
software development models.
• It includes risk management within
software development.
Release
4. Plan the 3. Develop
next iteration and test
Agile Model
It focuses not on rigid, linear, stepwise processes but on incremental and iterative development
methods that promote cross-functional teamwork and continuous feedback mechanisms.
It prioritizes:
This model is considered lightweight compared to the traditional methods, which are often
considered heavyweight.
Agile Principles
1 2 3
4 5 6
Sustainable
Measure of progress Close cooperation
development
7 8 9
Face-to-face
Motivated individuals Technical excellence
conversations
10 11 12
Source: [Link]
DevOps
Features:
Development Quality
• It helps organizations quickly produce (Software assurance (QA)
software products and services. engineering)
DevOps
• It ensures the adoption of quality assurance
practices to improve the performance of
technology operations.
It extends the DevOps workflow to include automated security processes and tools.
Quality
It follows the secure-by-design principle by: assurance
Development
Security Operations
DevSecOps: Benefits
• Configuration
• Threat model
management
• Security architecture
• Secure code review • Hardening
• Training
• Static analysis (SAST) • Infra-vulnerability
• Third-party scanning
component analysis
• Access control
• Patch
management
• Audit and
compliance
• Change control
• Log collection
• Penetration testing • Final security review • Intrusion detection
• Dynamic analysis (DAST) • Compliance validation • Analytics
• SIEM
Continuous Integration and Continuous Delivery (CI/CD)
It is a modern software development practice that allows for frequent code change in an incremental,
repeatable, and secure manner.
Continuous integration
Developer-1 Version 1
Check-in or
out Commit()
Developer-2 Version 2
Check-in or Code
out Commit() Repository
Continuous delivery
Continuous deployment
It is the step after continuous delivery where application code changes are
automatically deployed into production whenever they pass the
automated tests.
Continuous Integration, Continuous Delivery, and Continuous Deployment
Continuous integration
Shared Acceptance
Build Auto Unit test Auto Auto
repository tests
Continuous delivery
Continuous deployment
2
You are managing a project using scrum. A customer
requests a major feature change. Which role is
responsible for discussing the feature and managing
the customer’s expectations?
A. Scrum master
B. Product owner
C. Team members
D. Stakeholder
Software Maturity Model
Software Capability Maturity Model (CMM) Levels
They are based on the premise that the quality of a software product is a direct function of the quality
of its associated software development and maintenance processes.
Focuses on
continuous
Processes process
Processes measured and improvement
characterized for controlled
Processes
the organization,
characterized for
Processes proactive
projects, often
unpredictable, reactive Level 5:
poorly controlled Level 4: Optimized
and reactive Managed
Level 3:
Level 2: Defined
Repeatable
Level 1:
Initial
It is an open framework that provides an effective, measurable way for all types of organizations to
analyze and improve their software security posture.
Features
It allows companies to manage, monitor, and optimize software changes to ensure that:
Schedule and
Perform risk Approve or reject
implement the
assessment the change
change
Report changes
Document the
Test the change to the
change
management
Software Configuration Management (SCM)
It is the process of systematically managing, organizing, and controlling the changes in the documents,
codes, and other entities during the SDLC.
Source: [Link]
Software Configuration Management (SCM) Processes
Source: [Link]
Cohesion and Coupling
Cohesion Coupling
• It refers to how many different types of tasks • It measures how much interaction one
a module can carry out. module requires to carry out its tasks.
High cohesion and low coupling are very instrumental in software maintenance and development.
Integrated Product Team (IPT)
It is a multi-disciplinary team that works throughout the SDLC and facilitates decision-making by:
This team comprises members from the organization's relevant functional disciplines and serves as:
2
A software development team is starting a new project
and is discussing when to include security
considerations. At what phase should the team first
address security to ensure that potential
vulnerabilities are identified early on?
Software applications process and transmit information but can only determine valid data with
specific programming.
Controls are needed to maintain data integrity at each stage. The following are its types:
Examples Examples
It is vital for data security, allowing only authorized individuals to enter data. It complements input
validation and requires management authorization for all data entries.
Approved transactions and batches: Transactions and batches are checked and verified
by management and authorized personnel before processing.
User access control: Every personnel is verified with a unique ID and password to log in
and use applications.
Source documents: In some cases, data can only be input from existing source documents,
such as mailed invoices, checks, receipts, or customer-filled forms.
Input Controls: Validation
It ensures accurate, complete, and secure data entry, acting as the first defense against attacks and
integrity risks. Its key components include:
Consistency Length
Ensures that input fields accept Validates that input values fall
only the correct data type within an acceptable range Confirms that all required input
Example: Numeric fields accept Example: The day field should fields contain data before
digits and name fields accept only accept numbers 1-31 and submission
letters. the month field 1-12.
Processing Controls
These are implemented to ensure the accuracy, completeness, and timeliness of data
during processing.
Edit controls are applied after data entry but before the
processing stage to ensure data integrity.
Processing Control: Checks
Verifies the order of data Calculates control totals for Creates a numerical
processing and identifying a group of records and representation of data for
missing or duplicate records compares control totals comparison purposes and
before and after processing detects data modifications
Processing Controls: File Processing
Software processing controls on files ensure data integrity, security, and accuracy during file operations.
It is crucial for detecting, reporting, and recovering from errors during program execution, ensuring
system reliability, preventing data loss, and providing informative feedback to users.
Batch rejection
Rejects the entire input batch if the totals do not match the expected values, and assigns data control
analysts to review it for issue identification
Transaction rejection
Denies individual input transactions, whether automated or user-entered, using the software application
Hold in suspense
Suspends the entire batch to allow for the correction of errors before it can be rerun
Request re-input
Prompts that the user re-input either the entire form or just the individual field that appears to be incorrect
through an interactive user program
Output Controls
They ensure that the data produced by an application is accurate, complete, authorized, and
securely delivered.
• Uses specialized physical forms for certain calculation outputs, such as checks, warrants,
invoices, and certificates, ensuring they are printed correctly
• Serializes the forms and stores them in a secure, locked cabinet to protect against
unauthorized access
• Implements dual custody for high-value situations, necessitating the presence of two
individuals for access to sensitive forms
Data security
2
During a critical software update, your team
experiences an unexpected failure, leading to data
loss and system crashes. What steps should be taken
to handle this error effectively?
A. Ignore the error and continue with the next tasks
B. Report the error immediately, recover from the
failure, and provide feedback to users
C. Retry the update without investigating the issue
D. Document the error but postpone addressing it
Assess the Effectiveness of Software Security
Secure Software Development: Best Practices
The best practices for secure software development are provided by:
ISO/IEC
Completeness
Isolation Verifiability
Software Security and Assurance
It ensures that the security controls are granular enough to address both the
program and the user.
It is essential to control how each environment can access the application and the data. Control
measures to protect the various environments include:
The common time of check (TOC) or time of use (TOC or TOU) hazards are file-based race conditions.
To avoid them:
Social engineering is a way where attackers try to use social influence over users to extract
confidential information.
Redundant array of
independent disks (RAID) Maintaining the source code
Contingency
Disk mirroring
planning documents
Software Security and Assurance: Software Forensics
Cryptographic techniques
They are used to protect the
protect information by
confidentiality and integrity
transforming the data
of information.
through encryption schemes.
These controls manage and mitigate risks associated with mobile code that transmit across
networks and execute on a local system without user intervention.
It ensures that arrays stay in bounds, pointers are always valid, and code
cannot violate variable typing.
XML SAML
System authorization
System authorization
Auditing and logging • It helps identify security issues, as most software is released
with vulnerabilities.
System authorization
System authorization
Information protection
management Information auditing
Accreditation Certification
Certification and Accreditation (C and A)
Certification
• It may use safeguard evaluation, risk analysis, verification, testing, and auditing techniques.
• It ensures the system is right for the customer’s purpose.
Accreditation
• It is the formal declaration by the designated approving authority (DAA) that an IT system
is approved to operate in a particular security mode using a prescribed set of safeguards
at an acceptable level of risk.
• Once the accreditation is performed, management can formally accept the adequacy of an
evaluated system's overall security performance.
Quick Check
Acquired software can introduce new vulnerabilities into the system and may
impact the organization’s risk posture.
12
0
Commercial-off-the-Shelf (COTS)
It refers to hardware or software products that are ready-made and available for
purchase in the commercial market.
Commercial-off-the-Shelf (COTS)
While FOSS is often available free of charge, its main difference from proprietary software is
in the freedom it offers.
The freedom to
The freedom to run The freedom to
study how the The freedom to
the program as one improve the program
program works and redistribute copies to
wishes, for and release modified
change it, so it does help others
any purpose versions to others
compute as needed
Free and Open-Source Software (FOSS)
Advocates of this software believe that if more users view the source code, they will eventually find all
bugs and suggest how to fix them.
However, FOSS may allow hackers to find security vulnerabilities more easily than
closed-source software.
Open-Source: Drawbacks
Many organizations outsource software development projects to third party suppliers who:
2
Your organization acquired proprietary software to
manage customer data, but the team cannot inspect
the internal code for vulnerabilities. What is the main
challenge in assessing its security?
API is an interface that enables the transfer of data between two or more applications.
Monitor and log all traffic Set the API limit and throttling
System
Database security File management
configuration
Software-Defined Security (SDS)
03
Automation and
orchestration
Software-Defined Security: Benefits
These are weaknesses or flaws in web applications that attackers can exploit to gain unauthorized
access to data, systems, or entire networks.
These vulnerabilities can exist on the server side (the code running
on the web server) or the client side (the user's web browser).
Types of Web-Based Vulnerabilities
It refers to an attack where an attacker can execute malicious SQL statements to control a
web application’s database server.
It involves injecting malicious scripts into otherwise benign and trusted websites.
1 2
A web application, [Link], is hosted on a This XSS vulnerability allows hackers to inject
server with an XSS vulnerability. malicious scripts into the web server.
3 4
When a user accesses [Link] through their This execution enables the hacker to steal
browser for daily tasks, the injected malicious valuable information or perform any
script executes on the user's browser. designated task.
Impact of XSS
A Session hijacking
C Impersonating users
D Phishing
Types of XSS
Limiting types of A
uploads
Implementing input C
validation
These attacks exploit unintended behaviors that are legitimate within defined use but occur
under unauthorized circumstances.
• The attacker tricks the user’s browser into sending an HTTP request to
the target site, thereby exploiting this trust.
CSRF: Illustration
01
Suppose a bank allows users to perform transactions without re-authenticating each
time, such as transferring money between accounts.
02
03
If the user remains logged in and does not close their browser, another browser tab
could send a hidden request to the bank, resulting in a transaction that appears
authorized but was not initiated by the user.
04
The transaction executes successfully because the banking application assumes it is
initiated by the user, even though it originates from a malicious application in a
different tab or browser.
Prevention of CSRF
A B
Validations and sanitization Strong authentication
C D
Regular patching Secure coding practices and regular testing
Buffer Overflow
It occurs when more data is placed into a fixed-length buffer than it can handle.
The Slammer worm, also known as the SQL slammer, occurred in January 2003.
It occurs when legitimate software or firmware is altered or replaced with a version containing
harmful code through an update mechanism.
In 2017, CCleaner, a popular utility software for cleaning and optimizing computers, was compromised
when hackers breached the supply chain of its parent company, Piriform.
Using secure channels Verifying updates with Educating users about the
for updates digital signatures risks of updates from
untrusted sources
Race Condition
It occurs when two instructions from separate threads attempt to access the
same data simultaneously.
Example
The developer must ideally program the threads to access the data sequentially.
Race Condition: Example
It is important to secure the web application environment against unauthorized access and
cyber threats by implementing the following measures:
• Buffer overflows
• Authentication issues
• Scripting
The following methods should be implemented to ensure the web application is secure:
9
A web application allows users to submit forms with
personal information. To ensure data integrity and
security, which of the following practices should the
development team implement?
It is a structured collection of related data that allows queries, insertions, deletions, and many
other functions.
• Persistence
• Data sharing
• Database language
Columns that make each row unique (every row of a table must include a
Primary key
primary key)
Foreign Key An attribute of one table that is related to the primary key of another table
It is a simple model that provides flexibility and organizes data into relations or tables.
Activity Activity
code name
23 Patching Key = 24
24 Overlay Activity Route
Date
code No.
25 Crack sealing
24 01/12/01 1-95
24 02/08/01 1-66
Activity Route
Date
code No.
01/12/01 24 1-95
01/15/01 23 1-495
02/08/01 24 1-66
Data value
Degree (No. of columns) = 4
Cardinality and
The number of rows in a relation is referred to as cardinality, and the
degree in
number of columns is the degree.
relational database
Database Components
Data definition language: It defines the schema and structure of the database, access
operations, and integrity procedures.
Data manipulation language: It contains all the commands that enable a user to view,
manipulate, and use the database.
• The combination of data forms new information, that the subject does
not have the necessary rights to access.
• The combined data has higher sensitivity than the individual parts.
It refers to the process of extracting hidden meaning or knowledge from seemingly unconnected
pieces of data to uncover a potential security threat.
Examples
These are virtual tables that act like windows into existing database tables providing a customized
way to access and interact with data without modifying the underlying structure.
Using database views, databases can permit one group or a specific user
to see certain information while restricting others from viewing
it altogether.
Example
• Each copy is a version of the original data but with sensitive details
removed or replaced with less sensitive information.
• Users are granted access to specific versions of the data based on their
security role.
Example
It is generally used when databases are clustered to provide fault tolerance and higher performance.
• It provides mechanisms that watch for problems and deal with them
when they occur.
Example
If a process fails, the monitor mechanisms within OLTP can detect and try
to restart the process.
Database Transaction ACID Test
ACID is a set of properties that ensure data integrity and consistency in database transactions.
Atomicity
Durability
Database Transaction ACID Test
Atomicity
Consistency
• Any change maintains data integrity or is canceled completely.
Durability
Database Transaction ACID Test
Atomicity
Durability
Database Transaction ACID Test
Atomicity
Consistency
• Once the transaction is verified as accurate, it is committed,
and the database cannot be rolled back.
Durability
Data Warehousing
It decomposes tables to
It is the process of organizing
eliminate data redundancy and
the fields and tables of a
undesirable attributes like
relational database to
insertion, update, and
minimize redundancy.
deletion anomalies.
It involves processing the data stored in the data warehouse to derive more useful information.
5
You have purchased some books from an e-commerce
website. Which property of the relational database
ensures that once a purchase has been made, it will
remain so even in the event of power losses, crashes,
or errors in the database server?
A. Atomicity
B. Consistency
C. Isolation
D. Durability
Indicators, Indicators
Indicators of Compromise,
of Compromise and Indicators
and Indicators of Attack
of Attack
Indicators
These are the signs of possible malicious actions within a system or network that indicate that an
issue may exist.
01 02 03 04 05
They indicate ongoing attacks or high risks by resembling suspicious behavior and being of a
dynamic nature.
01 02 03 04 05
Proactively identifies
Detection Identifies already compromised systems
potential attacks
It executes malicious
It includes software that
actions to fulfill an
disrupts or damages
attacker's goals, like data
computers and networks.
theft or system sabotage.
Impacts of Malware
03
Potentially
Trojan horse Back doors unwanted Ransomware
programs
It is a malicious code that replicates by attaching itself to another piece of executable code.
Viruses use various methods to spread and infect systems. These include:
Service injection
Master boot record File infector virus Macro virus virus
(MBR) virus
Infects executable Infects Microsoft Injects into trusted
Targets the MBR, the files (.exe, .com) and Word and excel OS processes like
section of bootable triggers when the OS documents using [Link],
media used to start executes them basic technologies [Link], and
the OS [Link]
Virus Technologies
Viruses employ various techniques to evade detection and propagate within systems. These include:
Encrypted viruses
Stealth viruses
Utilize cryptographic
Hide by tampering with the
techniques to
OS to avoid detection
avoid detection
Worms
These are self-replicating pieces of code designed to penetrate networks and computer systems.
They are malicious code objects that infect a system and lie dormant until triggered by specific
conditions, such as:
• A specific time
• A program launch
• A website login
It is a malicious software that secretly gathers a user’s personal information and activities.
It is a type of malicious software that disguises itself as legitimate software to trick users.
It is a type of malicious software designed to extort money by encrypting the victim’s files,
making them inaccessible until a ransom is paid.
Examples
These are stealthy malwares designed to provide attackers with unauthorized, privileged
access to a computer system.
These are essential to identify and mitigate malware threats. These include:
They help to mitigate the impact of malware after detection. These include:
Malware removal
System restoration
Attack reporting
Vulnerability patching
Malware: Technical Controls
Email security
Firewalls Data loss prevention
solutions
10
A development team is focused on building secure
software. Which of the following actions does not align
with best practices for software security?