Secure Software Development Flashcards

1
Q

SDLC

A

Software Development Life Cycle:
An organized process of developing a secure application throughout the life of the project

Waterfall Model
Project Planning > Requirements > Analysis > Design > Coding > Testing > Deployment

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

SDLC Phases

A
Planning & Analysis
Software/Systems Design
Implementation
Testing
Integration
Deployment
Maintenance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Agile

A

Software development is performed in time-boxed or small increments to allow more adaptivity to change

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

DevOps

A

Software development and information technology operations

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

SDLC Principles: Defense in Depth

A

Layering of security controls is more effective and secure than relying on a single control

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

SDLC Principles: Never Trust User Input

A

Any input that is received from a user should undergo input validation prior to allowing it to be utilized by an application

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

SDLC Principles: Minimize Attack Surface

A

Reduce the amount of code used by a program, eliminate unneeded functionality, and require authentication prior to running additional plugins

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

SDLC Principles: Create Secure Defaults

A

Default installations should include secure configurations instead of requiring an administrator or user to add in additional security

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

SDLC Principles: Authenticity & Integrity

A

Applications should be deployed using code signing to ensure the program is not changed inadvertently or maliciously prior to delivery to an end user

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

SDLC Principles: Fail Securely

A

Applications should be coded to properly conduct error handling for exceptions in order to fail securely instead of crashing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

SDLC Principles: Rely on Trusted SDKs

A

SDKs must come from trusted source to ensure no malicious code is being added

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Black-box Testing

A

Occurs when a tester is not provided with any information about the system or program prior to conducting the test

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

White-box Testing

A

Occurs when a tester is provided full details of a system including the source code, diagrams, and user credentials in order to conduct the test

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Gray-box Testing

A

(Combination of Black & White-box)

The tester partially understands the application’s internal working structure

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Structured Exception Handling (SEH)

A

Structured Exception Handling:

Provides control over what the application should do when faced with a runtime or syntax error

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Input Validation

A

Applications verify that information received from a user matches a specific format or range of values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Static Analysis

A

Source code of an application is reviewed manually or with automatic tools without running the code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Dynamic Analysis

A

Analysis and testing of a program occurs while it is being executed or run

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Fuzzing

A

Injection of randomized data into a software program in an attempt to find system failures, memory leaks, error handling issues, and improper input validation

20
Q

Backdoors

A

Code placed in computer programs to bypass normal authentication and other security mechanisms

Backdoors are a poor coding practice and should not be utilized

21
Q

Directory Traversal

A

Method of accessing unauthorized directories by moving through the directory structure on a remote server

22
Q

Arbitrary Code Execution

A

Occurs when an attacker is able to execute or run commands on a victim computer (not remotely)

23
Q

RCE

A

Remote Code Execution:

Occurs when an attacker is able to execute or run commands on a remote computer

24
Q

Buffer Overflow

A

Occurs when a process stores data outside the memory range allocated by the developer

25
Q

Buffer

A

A temporary storage area that a program uses to store data

Over 85% of data breaches were caused by a buffer overflow

26
Q

Stack

A

Reserved area of memory where the program saves the return address when a function call instruction is received

27
Q

“Smash the Stack”

A

Occurs when an attacker fills up the buffer with NOP so that the return address may hit a NOP and continue on until it finds the attacker’s code to run

28
Q

Address Space Layout Randomization

A

Method used by programmers to randomly arrange the different address spaces used by a program or process to prevent buffer overflow exploits

29
Q

XSS (3 Types)

A

Cross-Site Scripting:
Occurs when an attacker embeds malicious scripting commands on a trusted website

Stored/Persistent
Attempts to get data provided by the attacker to be saved on the web server by the victim
Isn’t just reflected, data is stored in DB/Server then sent to the user from where it’s stored
Injects anyone that views the content (ex: if Youtube allowed JS in comments)

Reflected
Attempts to have a non-persistent effect activated by a victim clicking a link on the site
Input (JS) is reflected back into the response

DOM-based
Attempt to exploit the victim’s web browser
User’s input lands inside a dangerous part of JS code (happens on client-side)

Prevent XSS with output encoding and proper input validation

30
Q

XSRF/CSRF

A

Cross-Site Request Forgery:
Occurs when an attacker forces a user to execute actions on a web server for which they are already authenticated

One domain is forging a request to another to modify a value

Example: You’re on a website and click a link to an external site, but it deletes your account on the original site

Prevent XSRF with tokens, encryption, XML file scanning, and cookie verification

31
Q

SQL Injection

A

Attack consisting of the insertion or injection of an SQL query via input data from the client to a web application

SQL injection is prevented through input validation and using least privilege when accessing a database

If you see ` OR 1=1; on the exam, it’s an SQL injection

32
Q

Injection Attack

A

Insertion of additional information or code through data input from a client to an application

SQL
HTML
XML
LDAP

Most common type is an SQL injection

33
Q

XML Vulnerabilities

A

XML data submitted without encryption or input validation is vulnerable to spoofing, request forgery, and injection of arbitrary code

34
Q

XML Bomb (Billion Laughs Attack)

A

XML encodes entities that expand to exponential sizes, consuming memory on the host and potentially crashing it

35
Q

XML Eternal Entity (XXE)

A

An attack that embeds a request for a local resource

To prevent XML vulnerabilities from being exploited, use proper input validation

36
Q

Race Conditions

A

A software vulnerability when the resulting outcome from execution processes is directly dependent on the order and timing of certain events, and those events fail to execute in the order and timing intended by the developer

A race condition vulnerability is found where multiple threads are attempting to write a variable or object at the same memory location

37
Q

Race Conditions: Dereferencing

A

A software vulnerability that occurs when the code attempts to remove the relationship between a pointer and the thing it points to.

Race conditions are difficult to detect and mitigate
Race conditions can also be used against databases and file systems

38
Q

Time of Check to Time of Use (TOCTTOU)

A

The potential vulnerability that occurs when there is a change between when an app checked a resource and when the app used the resource

39
Q

Preventing Race Conditions/TOCTTOU

A

Develop applications to not process things sequentially if possible

Implement a locking mechanism to provide app with exclusive access

40
Q

Design Vulnerabilities: Insecure Components

A

Any code that is used or invoked outside the main program development process

Code Reuse
Third-party Library
Software Development Kit (SDK)

41
Q

Design Vulnerabilities: Insufficient Logging/Monitoring

A

Any program that does not properly record or log detailed enough information for an analyst to perform their job

Logging and monitoring must support your use case and answer who, what, when, where, and how

42
Q

Design Vulnerabilities: Weak of Default Configurations

A

Any program that uses ineffective credentials or configurations, or one in which the defaults have not be changed for security

Many applications choose to simply run as root or as a local admin
Permissions may be too permissive on files or directories due to weak configurations

Utilize scripted installations and baseline configuration templates to secure applications during installation

43
Q

LDAP Injections

A

LDAP typically stores authentication info (user/pass)
Attacker makes malformed queries to pull more info than they’re supposed to (or to bypass authentication)
Usually via URLs or input fields

Example:
Normal Query
http://www.CVexample.com/people_search.aspx?name=Sam)(zone=public)

Manipulated Query
http://www.CVexample.com/people_search.aspx?name=Sam)(zone=*)

44
Q

SSL Stripping/HTTP Downgrade

A

Combines an on-path with a downgrade attack (attacker sits between client/server)

Attacker modifies data between victim & web server

Done via: Proxy server, ARP spoofing, or rogue AP

45
Q

Dead Code

A

Section of source code of a program which is executed but whose result is never used in any other computation.
Add security vulnerability

46
Q

OWASP

A

Open Web Application Security Project:
An online community that produces freely-available articles, methodologies, documentation, tools, and technologies in the field of web application security