Professor Franklin
Accessibility settings

Preferences are saved in this browser when storage is available.

Chapter 6 · Reading 1 of 6

Security Implications of Software

Security+ SY0-801 · Objectives 4.5, 2.4

A department asks for a small change to its booking application. Students should be able to see when a room is occupied. The existing calendar also stores the name and contact information of the person who booked it. A seemingly simple feature now has a security design decision.

Cybersecurity should not be taken as an approach to protect existing applications, but rather be viewed as a holistic approach to security in general. This includes taking security considerations as early as the design phase of the Software Development Life Cycle (SDLC).

Secure coding practices are essential to prevent vulnerabilities and ensure the integrity, confidentiality, and availability of software. These practices involve writing code in a way that minimizes security risks and protects against common threats.

Secure Coding Practices

  • Input Validation: Always validate input from all untrusted sources to prevent injection attacks.
  • Authentication and Authorization: Implement robust authentication and authorization mechanisms to control access to resources. Use multi-factor authentication (MFA) and role-based access control (RBAC) to ensure users have the appropriate level of access.
  • Secure Data Handling: Ensure sensitive data is encrypted both in transit and at rest. Use TLS/SSL for data in transit and AES encryption for data at rest.
  • Error Handling and Logging: Properly handle errors and log security-relevant events without exposing sensitive information. Avoid detailed error messages that reveal implementation details and ensure logs are protected from tampering.
  • Session Management: Securely manage user sessions to prevent hijacking and unauthorized access. Implement secure cookies, use session timeouts, and avoid exposing session IDs in URLs.
  • Code Review and Static Analysis: Regularly review code and use static analysis tools to identify and fix security vulnerabilities. Use tools like SonarQube or Checkmarx to scan for common security issues and conduct peer code reviews.
  • Dependency Management: Keep third-party libraries and dependencies up to date and monitor for known vulnerabilities.

Continuous Integration (CI) is the practice of frequently integrating code changes into a shared repository. Each integration is automatically tested to detect and address issues early in the development cycle. Continuous Deployment (CD) is the practice of automatically deploying every code change that passes the automated tests to a production environment. This ensures that the software is always in a deployable state and new features and fixes are delivered quickly.

Open Worldwide Application Security Project (OWASP) The Open Web Application Security Project (OWASP) is a nonprofit organization dedicated to improving the security of software. Founded in 2001, OWASP provides free and open resources, tools, and community support to help developers, security professionals, and organizations protect their applications from security threats. OWASP plays a crucial role in advancing the field of application security. By following OWASP guidelines and utilizing its tools, organizations can significantly enhance the security of their software and protect against common threats.

API security is a prime example of secure code in practice. Practices and measures implemented to protect Application Programming Interfaces (APIs) from malicious attacks, unauthorized access, data breaches, and other threats fall under this category. APIs are integral to modern applications, enabling communication and data exchange between different software systems. Ensuring their security is crucial for safeguarding sensitive data and maintaining the integrity of the systems they connect. APIs can be focused in their security through the AAA.

Authentication: Verifying the identity of users or systems interacting with the API.

  • Techniques:
    • API Keys: Unique identifiers used to authenticate requests.
    • OAuth: An open standard for access delegation, commonly used for token-based authentication.
    • JWT (JSON Web Tokens): Tokens that securely transmit information between parties as a JSON object.

Authorization: Determining what authenticated users or systems are allowed to do.

  • Techniques:
    • Role-Based Access Control (RBAC): Permissions are assigned based on user roles.
    • Scopes: Defining the actions and resources that a token can access.

Locating the attack surface

List entry points, privileged operations, dependencies and data crossing trust boundaries. Memory-unsafe components, outdated libraries, inappropriate permissions and unsafe defaults each require different controls. A software bill of materials helps locate affected versions. Verify whether the deployed configuration can reach the vulnerable component before estimating local risk.

Draw the smallest useful response

Ask what the student actually needs to complete the task. Room, date and availability may be sufficient. Check the data returned by the service as well as the fields shown on the screen. A browser that receives private contact details can expose them even when the interface hides the corresponding column. This design conversation produces a specific requirement that developers can review and testers can check. It also introduces a second question. How will the application distinguish a user-supplied search value from an instruction?

Access decision trace

Inspect the three records, then use the evidence to answer the question.

1. Authenticate

Establish the calling identity.

Identity provider verified the requester

2. Authorize

Check the requested action and resource.

App permitted an intern to open payroll

3. Audit

Record the resulting decision.

Audit log accurately recorded the request

Apply the reading

A service accepts a valid API credential. What else should it examine before changing a student advising record?

Compare your reasoning

Check the credential’s scope, the calling identity’s relationship to the record, and whether the requested operation is permitted.