5218COMP - Common Vulnerability Issues Quiz
24 Questions
0 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What does the term 'attack vector' refer to?

  • A method used to gain unauthorized access to a system (correct)
  • A flaw in the design of software
  • A measure to prevent security breaches
  • A type of vulnerability in the system
  • Which of the following best describes a 'vulnerability'?

  • A weakness that can be exploited by an attack (correct)
  • A method for authenticating users
  • A potential threat to a system's integrity
  • A preventive measure against hacking
  • What is a common consequence of an 'implementation failure'?

  • Increased security through untested procedures
  • Exploitation of coded errors or bad practices (correct)
  • The software is never deployed
  • Designs are followed exactly
  • Which of the following is NOT considered a type of vulnerability?

    <p>Encryption strengths (C)</p> Signup and view all the answers

    What is the primary purpose of input validation in software development?

    <p>To check the sanity of input data (A)</p> Signup and view all the answers

    What role does 'authentication' play in secure software development?

    <p>It verifies the identity of a user or system. (B)</p> Signup and view all the answers

    Which of the following is NOT a common source of data that requires validation?

    <p>Encrypted passwords (B)</p> Signup and view all the answers

    Which of the following statements accurately reflects a potential vulnerability due to end-user misuse?

    <p>Designers assume users will read all documentation (C)</p> Signup and view all the answers

    Which statement about 'threats' is accurate?

    <p>Threats represent potential issues needing protection. (A)</p> Signup and view all the answers

    Which scenario exemplifies a 'design weakness'?

    <p>An unforeseen flaw in the software's design allowing an attack (A)</p> Signup and view all the answers

    What percentage of vulnerabilities are attributed to poor input validation?

    <p>60% (C)</p> Signup and view all the answers

    What might represent a common 'attack' in software security?

    <p>Failing to apply software updates regularly (A)</p> Signup and view all the answers

    Which aspect of input validation checks whether data falls within a specific range?

    <p>Range validation (C)</p> Signup and view all the answers

    What is a consequence of not validating user input properly?

    <p>Possible injection attacks (D)</p> Signup and view all the answers

    Which scenario exemplifies a type mismatch vulnerability?

    <p>A string input where an integer is expected (A)</p> Signup and view all the answers

    In input validation, what does checking for 'normality' imply?

    <p>The data must follow predefined criteria (D)</p> Signup and view all the answers

    What is a key factor that should be checked when validating an email address?

    <p>It should contain an @ symbol. (A)</p> Signup and view all the answers

    What is an important consideration regarding the validation of uploaded files in a web application?

    <p>Filename lengths should be validated against server limitations. (C)</p> Signup and view all the answers

    Why is server-side validation preferred over client-side validation?

    <p>It cannot be bypassed by the user. (B)</p> Signup and view all the answers

    What flaw is present in the basic validation of the wpshop plugin for file uploads?

    <p>No restrictions on file type uploaded. (D)</p> Signup and view all the answers

    What is a significant risk associated with relying solely on client-side validation?

    <p>It can be bypassed by users, making it unreliable. (B)</p> Signup and view all the answers

    What potential error is related to input validation that is noted as widespread in C/C++ programs?

    <p>Improper use of pointers and out-of-bounds errors. (A)</p> Signup and view all the answers

    What should be considered when implementing password validation?

    <p>There should be no upper limit on password length. (C)</p> Signup and view all the answers

    When should validation occur in a secure software development process?

    <p>When data passes between differing trust boundaries. (A)</p> Signup and view all the answers

    Study Notes

    Course Information

    Common Vulnerability Issues

    • Approximately 60% of vulnerabilities are due to poor input validation.

    Session Overview & Outcomes

    • Session topics: Input validation, Authentication, Authorisation
    • Learning outcomes: Understand and explain common vulnerabilities, and understand authentication and authorisation concepts.

    Terminology Recap

    • Threat: What needs protecting? What are you worried about?
    • Vulnerability: How might threats become real? Where are the weaknesses in the system?
    • Attack: How might someone break the security? Attacks exploit vulnerabilities to realise threats.
    • Attack Vector: A path/route/method that exploits weak spots to gain unauthorised access to a computer system. A large part of exploits involve the human element since humans are often the weakest part of the system.

    Vulnerabilities

    • A weakness that allows an attack
      • Design weakness: A flaw in the design causes an attack not anticipated, e.g., TCP/SYN flood, Heartbleed, SSL RAM dumping
      • Implementation failure: Incorrectly following the design—e.g., incorrect use of Bluetooth, coding errors like SQL injection.
      • Change in requirements or environment: Original assumptions about design or development are no longer valid, e.g., encryption becoming weak, repurposing software without redesigning for the new setup (credit card use online).
      • End-user misuse: Users make incorrect assumptions about the technology, e.g., weak passwords, using sites with inadequate security (SSL certificates), sending executables by email.

    Input Validation

    • Critical but often overlooked, responsible for about 60% vulnerabilities

    • Involves checking the validity of input data.

    • Checks should consider:

      • Data type, length, range, and acceptance of null values
      • Checking for possible malicious code injection; e.g., SQL injection.
    • Validation should be applied at points where data can enter or exit the software (e.g., URLs, user-supplied files, configuration files, 3rd party data, data loaded from file systems, data loaded from databases).

    • Example input validation error: An issue occurs processing a JSP page at line 18 of /index.jsp; a form input causing an IllegalStateException due to mycustomer bean not being available in the request attribute.

    • Three validation steps:

      • Constrain: allow known good data. Checks for length, type, and range constraints.
      • Reject: Reject known bad data. Filters for keywords, commands, etc. that may be used to exploit the system.
      • Sanitise: Make potentially malicious data safe. Strips out null characters or spaces.

    Authentication and Authorisation

    • Authentication: Identifying who you are

    • Authorisation: Identifying what you can do.

    • These processes should be kept separate in applications.

      • Consider CIA triad (confidentiality, integrity, availability)
    • Custom implementations are often incorrectly done, such as in web apps (Guest access), and potential problems arise in logout, password management, or account updates.

      • Password leaks do occur in apps (not just related to sensitive data). This is a common developer error.

      • Password Storage:

        • Never directly store passwords
        • Hash passwords (use SHA-1, SHA256, or SHA512)
        • Use salted hashes for optimal security
        • Consider using a pepper for even more security
        • Consider using hash iterations
      • Password Resets:

        • Password resets are necessary but should be done securely
        • Do not send passwords in reset emails (violates security principle)
        • Request additional information for the user
        • Utilize a unique, temporary token in the confirmation email
        • Implement expiration rules to ensure that the unique token expires swiftly.
        • Prevent automatic log-ins after a successful reset; enforce re-authentication.
        • Session should be made to automatically expire when the session is not actively used or when the browser window is closed to avoid hijacking.
    • Session Management:

      • Sessions are used to keep track of users as they navigate through an application. Sessions persist user data between different requests while in scope.
      • Sessions should automatically expire to maintain security
      • Ensure the session is killed when the user logs out.
      • Session IDs must be cryptographically secure (generate random and confidential IDs) and should not be directly sent to URL.
    • Authorisation:

      • Limit app resources/actions to authorized users
      • Well-implemented authorisation is difficult
      • Defined roles and privileges crucial
      • Common attacker techniques: bypassing authentication, path traversal attacks, escalating privileges
      • Perform authorisation checks on the server side; do not trust client-side checks alone; and avoid including hard-coded authorisation management information.
    • Common Themes:

      • Security is not straightforward (it requires planning and care)
      • Applications must be created securely from the start; relying on existing code requires careful consideration and planning.
      • Think holistically about application security before implementation.

    Summary

    • Input validation, authentication, and authorisation are crucial for secure software development. Avoiding common vulnerabilities, understanding user authentication and authorisation is imperative.

    Studying That Suits You

    Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

    Quiz Team

    Description

    This quiz covers key concepts from the Secure Software Development course, focusing on common vulnerabilities such as input validation, authentication, and authorization. Test your understanding of threats, vulnerabilities, and attack vectors within software security. Engage with the material to enhance your comprehension of protection mechanisms in software systems.

    More Like This

    Java Array Input Validation
    10 questions

    Java Array Input Validation

    IntelligentWilliamsite4456 avatar
    IntelligentWilliamsite4456
    Input Validation in Code Analysis
    23 questions
    CSC 2045: C++ Input Validation
    22 questions
    Use Quizgecko on...
    Browser
    Browser