Podcast
Questions and Answers
What does the term 'attack vector' refer to?
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'?
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'?
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?
Which of the following is NOT considered a type of vulnerability?
What is the primary purpose of input validation in software development?
What is the primary purpose of input validation in software development?
What role does 'authentication' play in secure software development?
What role does 'authentication' play in secure software development?
Which of the following is NOT a common source of data that requires validation?
Which of the following is NOT a common source of data that requires validation?
Which of the following statements accurately reflects a potential vulnerability due to end-user misuse?
Which of the following statements accurately reflects a potential vulnerability due to end-user misuse?
Which statement about 'threats' is accurate?
Which statement about 'threats' is accurate?
Which scenario exemplifies a 'design weakness'?
Which scenario exemplifies a 'design weakness'?
What percentage of vulnerabilities are attributed to poor input validation?
What percentage of vulnerabilities are attributed to poor input validation?
What might represent a common 'attack' in software security?
What might represent a common 'attack' in software security?
Which aspect of input validation checks whether data falls within a specific range?
Which aspect of input validation checks whether data falls within a specific range?
What is a consequence of not validating user input properly?
What is a consequence of not validating user input properly?
Which scenario exemplifies a type mismatch vulnerability?
Which scenario exemplifies a type mismatch vulnerability?
In input validation, what does checking for 'normality' imply?
In input validation, what does checking for 'normality' imply?
What is a key factor that should be checked when validating an email address?
What is a key factor that should be checked when validating an email address?
What is an important consideration regarding the validation of uploaded files in a web application?
What is an important consideration regarding the validation of uploaded files in a web application?
Why is server-side validation preferred over client-side validation?
Why is server-side validation preferred over client-side validation?
What flaw is present in the basic validation of the wpshop plugin for file uploads?
What flaw is present in the basic validation of the wpshop plugin for file uploads?
What is a significant risk associated with relying solely on client-side validation?
What is a significant risk associated with relying solely on client-side validation?
What potential error is related to input validation that is noted as widespread in C/C++ programs?
What potential error is related to input validation that is noted as widespread in C/C++ programs?
What should be considered when implementing password validation?
What should be considered when implementing password validation?
When should validation occur in a secure software development process?
When should validation occur in a secure software development process?
Flashcards
Input Validation
Input Validation
The process of ensuring that user inputs are correct and safe.
Authentication
Authentication
The process of verifying the identity of a user or system.
Authorisation
Authorisation
The process of granting permissions to an authenticated user.
Vulnerability
Vulnerability
Signup and view all the flashcards
Attack Vector
Attack Vector
Signup and view all the flashcards
Design Weakness
Design Weakness
Signup and view all the flashcards
Implementation Failure
Implementation Failure
Signup and view all the flashcards
End-user Misuse
End-user Misuse
Signup and view all the flashcards
SQL Injection
SQL Injection
Signup and view all the flashcards
Vulnerabilities
Vulnerabilities
Signup and view all the flashcards
Type Mismatch
Type Mismatch
Signup and view all the flashcards
Data Input Sources
Data Input Sources
Signup and view all the flashcards
Email Validation
Email Validation
Signup and view all the flashcards
Password Length
Password Length
Signup and view all the flashcards
Password Confirmation Match
Password Confirmation Match
Signup and view all the flashcards
Escape Non-Alpha Numeric
Escape Non-Alpha Numeric
Signup and view all the flashcards
Client-side Validation
Client-side Validation
Signup and view all the flashcards
Server-side Validation
Server-side Validation
Signup and view all the flashcards
Array Sizes Error
Array Sizes Error
Signup and view all the flashcards
Telegraph Pole Problem
Telegraph Pole Problem
Signup and view all the flashcards
Study Notes
Course Information
- Course title: 5218COMP – Secure Software Development
- Lecturers: Dr. Max Hashem Eiza ([email protected], Room BS/607A) and Dr. Nathan Shone ([email protected], Room BS/649)
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.