100% found this document useful (1 vote)
55 views4 pages

Secure Software Systems Overview

The document discusses the importance of software security and assurance, highlighting the differences between the two concepts. It outlines various threats to software security, sources of insecurity, and the benefits of early detection of security issues. Additionally, it covers low-level memory-based attacks and defenses against them, emphasizing the need for comprehensive security properties in software design.

Uploaded by

Mohana Priya
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
55 views4 pages

Secure Software Systems Overview

The document discusses the importance of software security and assurance, highlighting the differences between the two concepts. It outlines various threats to software security, sources of insecurity, and the benefits of early detection of security issues. Additionally, it covers low-level memory-based attacks and defenses against them, emphasizing the need for comprehensive security properties in software design.

Uploaded by

Mohana Priya
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

CB3591 – ENGINEERING SECURE SOFTWARE SYSTEMS

UNIT I – NEED OF SOFTWARE SECURITY AND LOW-LEVEL


ATTACKS
1. Software Assurance and Software Security

 Software Assurance refers to the level of confidence that software is


free from vulnerabilities, whether intentionally designed in or
accidentally inserted at any time during its life cycle. It involves
processes and methods to ensure that software behaves predictably
and securely.

 Software Security focuses on designing, developing, and deploying


software in a way that continues to function correctly even when it is
under malicious attack. It emphasizes proactive measures rather than
reactive fixes.

Key Differences: - Software assurance is broader, covering both quality and


security, while software security is focused on resisting malicious threats. -
Software assurance includes reliability and safety; software security focuses
on protecting assets from attackers.
2. Threats to Software Security
Software can be threatened by:
- External attacks such as malware, phishing, and network intrusion.
- Internal threats like insider misuse or poor development practices.
- Common vulnerabilities exploited by attackers:
- Buffer Overflow: Writing beyond buffer boundaries to manipulate adjacent
memory. - SQL Injection: Injecting malicious SQL code to access database
information.
- Cross-site Scripting (XSS): Inserting malicious scripts into trusted
websites. - Command Injection: Executing arbitrary commands on the host
OS.
- Denial of Service (DoS): Overloading system resources to make services
unavailable.
- Privilege Escalation: Exploiting flaws to gain higher access.
Threat Classifications (STRIDE):
- Spoofing, Tampering, Repudiation, Information Disclosure, Denial of
Service, Elevation of Privilege
3. Sources of Software Insecurity
Software insecurity originates from multiple stages of the software
development lifecycle:
- Design flaws: Inadequate architectural security planning.
- Coding errors: Insecure use of programming constructs (e.g., unsafe
functions).
- Poor configuration: Default settings, unnecessary services enabled.
- Unvalidated inputs: Missing input sanitization.
- Inadequate testing: Security not considered during testing.
- Human factors: Lack of training or awareness among developers.
- Third-party components: Use of unverified open-source or commercial
libraries.

4. Benefits of Detecting Software Security Early


 Cost-Effectiveness: Fixing security issues in the requirements/design
phase is significantly cheaper than post-deployment.
 Reduced Exposure: Early detection prevents potential data leaks or
business disruptions.
 Regulatory Compliance: Ensures adherence to legal and industry-
specific standards (e.g., GDPR, HIPAA).
 Improved Reputation: Secure software builds user confidence and
brand trust.
 Fewer Patch Cycles: Minimizes emergency updates and downtime.

5. Properties of Secure Software


To ensure comprehensive protection, secure software must satisfy the
following security properties:
- Confidentiality: Only authorized users can access data.
- Integrity: Data is protected from unauthorized modifications.
- Availability: Systems remain operational and accessible.
- Authentication: Users and systems can prove their identity.
- Authorization: Authenticated users get access only to permitted
functions.
- Accountability: Actions can be traced to individuals for auditing.

6. Memory-Based Attacks: Low-Level Attacks Against Heap and


Stack
These attacks exploit the way memory is allocated and managed:
a. Stack-Based Attacks:
- Stack Buffer Overflow: Occurs when more data is written to a buffer
located on the stack than it can hold. - Exploits: Overwriting return
addresses, function pointers. - Tools: gdb, objdump, pwndbg
b. Heap-Based Attacks:
- Heap Overflow: Overwriting memory in the heap area which stores
dynamically allocated variables.
- Use-after-free: Accessing memory after it has been deallocated.
- Double-free: Freeing the same memory block twice can corrupt the heap
and lead to execution of malicious code.
c. Format String Vulnerabilities: - Caused by unvalidated user input
passed into functions like printf() without format specifiers, allowing
attackers to read or write arbitrary memory.
d. Integer Overflow/Underflow: - Miscalculations in buffer size allocations
leading to bypassing bounds checks.

7. Defense Against Memory-Based Attacks


To mitigate these attacks, both hardware and software countermeasures are
deployed:
a. Compiler-Based Defenses:
- Stack Canaries: Guard values placed before return addresses to detect
stack corruption.
- Fortify Source: Adds bounds checks to vulnerable functions like strcpy,
sprintf.

b. OS-Level Defenses:
- ASLR (Address Space Layout Randomization): Randomizes memory
layout to make it harder for attackers to predict target addresses.
- DEP/NX (Data Execution Prevention): Prevents execution of code in
memory regions intended for data.
c. Language-Based Solutions:
- Use of memory-safe languages such as Rust, Java.
- Garbage collection and bounds checking help prevent pointer misuse.
d. Code-Level Practices:
- Input validation and sanitation
- Use of secure libraries (e.g., strncpy, strncat) - Avoiding unsafe functions
(gets, scanf)
- Static analysis and fuzz testing
e. Hardware-Based Protections:
- Intel CET (Control-flow Enforcement Technology)
- ARM Memory Tagging Extension (MTE)
By implementing these layers of protection, modern systems can resist low-
level attacks more effectively, though ongoing vigilance and testing are
always essential.

UNIT II – SECURE SOFTWARE DESIGN


1. Requirements Engineering for Secure Software

Common questions

Powered by AI

SQL Injection exploits vulnerabilities by injecting malicious SQL code into input fields, thereby potentially accessing, modifying, or deleting database information . Cross-Site Scripting (XSS) involves inserting malicious scripts into trusted websites, which can execute unintended actions in the user's browser . To mitigate these threats, input validation and sanitation practices should be employed, ensuring all user input is treated as untrusted and sanitized before processing. Additionally, adopting coding practices such as the principle of least privilege, and employing security mechanisms like parameterized queries and Content Security Policies (CSPs), can significantly reduce the risks posed by these vulnerabilities .

The STRIDE model classifies threats into six categories: Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, and Elevation of Privilege . This classification helps in identifying and understanding potential attacks against each aspect of a software system. In threat modeling, STRIDE is used to systematically evaluate system security vulnerabilities, design security controls, and prioritize threat mitigation efforts. It provides a structured approach to anticipating how attackers might exploit different parts of a system, enabling developers to proactively address weaknesses before they can be leveraged by malicious actors .

Software insecurity can originate from every stage of the software development lifecycle: design flaws can emerge from inadequate security planning, leading to fundamental weaknesses in architecture; coding errors often result from insecure programming constructs, such as using unsafe functions; poor configuration might come from default settings and enabled unnecessary services; unvalidated inputs, due to missing input sanitization, can lead to exploits like SQL injection; inadequate testing that ignores security considerations can fail to uncover vulnerabilities before deployment; human factors like lack of training among developers increase risk; finally, the use of unverified third-party components can introduce new vulnerabilities from external code . Each stage not only raises specific vulnerabilities but also highlights the necessity for a multi-faceted approach to secure software development .

Types of memory-based attacks include stack-based attacks like stack buffer overflow, heap-based attacks such as heap overflow and use-after-free, and vulnerabilities like format string attacks and integer overflows. These attacks exploit the way memory is allocated and managed, allowing attackers to execute arbitrary code or manipulate memory . Defending against them is challenging due to the complexity of modern computing environments, the need for rigorous static and dynamic analysis, and the requirement for timely updates and patches to address newly discovered vulnerabilities. Moreover, attackers constantly evolve their techniques to bypass existing security measures, necessitating ongoing vigilance and innovation in defense strategies .

Compiler-based defenses play a significant role in mitigating memory-based attacks by implementing mechanisms that detect and prevent vulnerabilities during code compilation. For instance, stack canaries are used, which are guard values placed before return addresses on the stack to detect stack corruption via stack buffer overflow . The 'Fortify Source' option adds bounds checks to potentially vulnerable functions such as strcpy and sprintf, preventing buffer overflow . These compiler-based defenses effectively increase the difficulty of executing memory attacks by preserving the integrity of critical memory areas and preemptively addressing unsafe coding practices.

Software assurance is a comprehensive discipline that deals with ensuring software exhibits the desired properties such as quality, reliability, and security, free from vulnerabilities whether inserted by accident or malicious intent . On the other hand, software security specifically focuses on ensuring that software continues to function correctly under malicious attack by emphasizing proactive measures instead of reactive fixes . Distinguishing between the two is important because software assurance provides a broader scope, including non-security aspects like reliability and safety, while software security zeroes in on protecting assets from attackers, which is crucial for crafting strategies that target specific threats and weaknesses effectively .

Secure software is characterized by several key properties: confidentiality ensures only authorized users can access data; integrity safeguards data from unauthorized modifications; availability ensures that systems remain operational and accessible at all times; authentication verifies the identity of users and systems; authorization ensures that authenticated users get access only to permitted functions; and accountability allows actions to be traced to individuals for auditing . These properties are significant because they collectively establish a comprehensive security framework that protects software from a variety of threats while maintaining trust and operational efficiency .

Early detection of software security issues plays a critical role by significantly reducing the cost involved in fixing issues when detected at the requirements or design phase instead of post-deployment, thereby promoting cost-effectiveness . It also reduces exposure by preventing potential data leaks or business disruptions, ensuring regulatory compliance with legal and industry standards like GDPR or HIPAA, improving the organization's reputation by building user confidence and trust, and minimizing emergency update cycles which leads to reduced downtime . These benefits collectively underscore the importance of integrating security measures early in the software development lifecycle.

Hardware-based protections add an important layer in defending against low-level memory attacks by implementing security mechanisms directly at the chipset level. Examples include Intel CET (Control-flow Enforcement Technology) and ARM Memory Tagging Extension (MTE), which help to prevent common threats like buffer overflows and pointer misuse by enforcing control flow integrity and tagging memory operations . However, they cannot fully replace software-based defenses, as they address only certain aspects of memory safety and do not cover all possible vulnerabilities. Software-based solutions complement hardware protections by providing high-level security features such as input validation and access controls, thus offering an integrated defense strategy .

Using third-party components can introduce software insecurity by incorporating unverified open-source or commercial libraries, which might come with undocumented vulnerabilities or malicious code . These components can lack updates, leading to outdated defenses against new threats. To mitigate these risks, conduct thorough security reviews and audits of third-party code, maintain an inventory of components used, and frequently update them to their latest secure versions. Relying on reputable sources, using signed and verified packages, and monitoring for known vulnerabilities using databases like the National Vulnerability Database (NVD) can further reduce the risks associated with third-party components .

You might also like