OWasp Web App Developer Checklist Flashcards

Developer real time development skills for learners based on content at https://owasp.org/www-project-developer-guide/release/design/web_app_checklist/define_security_requirements/

1
Q

System Configuration

What principle should be followed for application privileges?

A

Applications, processes, and service accounts should be restricted to the least privileges possible.

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

System Configuration

How should elevated privileges for an application be handled?

A

Raise privileges as late as possible and drop them as soon as possible.

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

System Configuration

What should be removed before deployment?

A

All unnecessary functionality, files, test code, or functionality not intended for production.

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

System Configuration

How should the application’s security configuration store be maintained?

A

It should be available in human-readable form to support auditing.

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

System Configuration

What should be done to separate environments?

A

Isolate development environments from production and restrict access to authorized development and test groups.

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

System Configuration

What system should be implemented for managing code changes?

A

A software change control system to manage and record changes in both development and production.

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

Cryptographic Practices

What type of cryptographic modules should be used?

A

Peer-reviewed and open solution cryptographic modules.

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

Cryptographic Practices

Where should cryptographic functions protecting secrets be implemented?

A

On a trusted system.

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

Cryptographic Practices

How should cryptographic modules handle failures?

A

They must fail securely.

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

Cryptographic Practices

What is required for generating random elements?

A

Use a cryptographic module with an approved random number generator.

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

Cryptographic Practices

What compliance standard should cryptographic modules meet?

A

FIPS 140-2 or an equivalent standard.

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

Cryptographic Practices

How should cryptographic keys be managed?

A

Establish a policy and process for key management, and ensure secret keys are protected.

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

Cryptographic Practices

Where should cryptographic keys be stored?

A

In a proper secrets vault.

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

Cryptographic Practices

What feature should applications include regarding cryptographic keys?

A

Support for key rotation and changing algorithms or keys when needed.

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

File Management

Should user-supplied data be passed to a dynamic include function?

A

No, avoid passing user-supplied data directly to such functions.

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

File Management

What is required before allowing a file to be uploaded?

A

Authentication.

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

File Management

How should file upload types be limited?

A

Only allow file types needed for business purposes.

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

File Management

How should uploaded files be validated?

A

Check file headers, not just file extensions.

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

File Management

Where should files not be saved?

A

In the same web context as the application.

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

File Management

How can you prevent executable file uploads?

A

Turn off execution privileges in file upload directories.

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

File Management

How should file referencing be managed?

A

Use an allow-list for file names and types.

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

File Management

What must not be sent to the client regarding files?

A

Absolute file paths.

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

File Management

How should user-uploaded files be checked for safety?

A

Scan files for viruses and malware.

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

Security Frameworks and Libraries

What should be ensured for servers, frameworks, and system components?

A

They should run the latest approved versions and patches.

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

Security Frameworks and Libraries

Where should libraries and frameworks be sourced from?

A

Trusted sources that are actively maintained and widely used.

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

Security Frameworks and Libraries

What must be done for secondary applications and third-party libraries?

A

Review them for business necessity and validate safe functionality.

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

Security Frameworks and Libraries

How can you track third-party libraries?

A

Create and maintain an inventory catalog using Software Composition Analysis (SCA).

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

Security Frameworks and Libraries

How can you reduce the attack surface when using libraries?

A

Encapsulate the library and expose only the required behavior into your software.

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

Security Frameworks and Libraries

When possible, what type of code should be used for common tasks?

A

Tested and approved managed code rather than new unmanaged code.

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

Security Frameworks and Libraries

How can you ensure the integrity of code and configuration files?

A

Use checksums or hashes to verify their integrity.

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

Security Frameworks and Libraries

What should updates be implemented with?

A

Safe updates using encrypted channels.

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

Secure Queries

How can SQL injection be prevented?

A

By using query parameterization to prevent untrusted input from being interpreted as part of a SQL command.

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

Secure Queries

What input handling measures should be applied?

A

Utilize input validation, output encoding, and address meta characters.

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

Secure Queries

Where should connection strings not be stored?

A

They should not be hard-coded within the application.

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

Secure Queries

How and where should connection strings be stored?

A

In a separate configuration file on a trusted system, and they should be encrypted.

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

Secure Configuration

What privilege level should applications use when accessing a database?

A

The lowest possible level of privilege.

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

Secure Configuration

How should access to base tables in the database be handled?

A

Use stored procedures to abstract data access and allow permissions to be removed from the base tables.

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

Secure Configuration

When should database connections be closed?

A

As soon as possible.

39
Q

Secure Configuration

What default vendor content should be removed?

A

Any unnecessary default content, such as sample schemas.

40
Q

Secure Configuration

What should be done with unused default accounts?

A

They should be disabled if not required for business purposes.

41
Q

Secure Authentication

What must be done with default database administrative passwords?

A

They should be removed or changed.

42
Q

Secure Authentication

How should application connections to the database be structured?

A

Different credentials should be used for every trust distinction (e.g., user, read-only user, guest, administrators).

43
Q

Secure Authentication

What kind of credentials should be used for database access?

A

Secure credentials.

44
Q

Character Encoding and Canonicalization

When should output encoding be applied?

A

Just before the content is passed to the target system.

45
Q

Character Encoding and Canonicalization

Where should all output encoding be conducted?

A

On a trusted system.

46
Q

Character Encoding and Canonicalization

What should be specified for all outputs?

A

Character sets, such as UTF-8.

47
Q

Character Encoding and Canonicalization

How should Unicode data be handled?

A

Apply canonicalization to convert Unicode data into a standard form.

48
Q

Character Encoding and Canonicalization

How should output used for OS commands be treated?

A

It must be sanitized.

49
Q

Contextual Output Encoding

How is contextual output encoding determined?

A

Based on how data will be utilized by the target system, e.g., HTML entity encoding.

50
Q

Contextual Output Encoding

What data must be contextually encoded?

A

All data returned to the client from untrusted sources and output of untrusted data to SQL, XML, and LDAP queries.

51
Q

Syntax and Semantic Validity

What should be done with all data sources?

A

Identify and classify them into trusted and untrusted.

52
Q

Syntax and Semantic Validity

When should input be encoded?

A

Before validating it, using a common character set.

53
Q

Syntax and Semantic Validity

What should be verified in protocol header values?

A

Ensure they contain only ASCII characters.

54
Q

Syntax and Semantic Validity

How should data validation handle failures?

A

All validation failures should result in input rejection.

55
Q

Syntax and Semantic Validity

How can obfuscation attacks be addressed?

A

Utilize canonicalization.

56
Q

Libraries and Frameworks

Where should all input validation occur?

A

On a trusted system.

57
Q

Libraries and Frameworks

How should input validation be implemented?

A

Use a centralized input validation library or framework.

58
Q

Libraries and Frameworks

What approach should be used for expected data types?

A

Validate using an allow-list rather than a deny-list.

59
Q

Validate Serialized Data

How can serialized objects be protected?

A

Implement integrity checks or encryption.

60
Q

Validate Serialized Data

Where should deserialization features run?

A

In very low-privilege environments, such as temporary containers.

61
Q

Validate Serialized Data

How should security failures in deserialization be handled?

A

Log all exceptions and failures.

62
Q

Validate Serialized Data

What should be monitored to ensure safety?

A

Incoming and outgoing network connectivity from deserialization systems.

63
Q

Authentication

How should access control authentication be designed?

A

Thoroughly up-front.

64
Q

Authentication

What should all requests go through unless public?

A

Access control checks.

65
Q

Authentication

What method should be used for high-value transactional accounts?

A

Multi-Factor Authentication (MFA).

66
Q

Passwords

How should authentication controls be handled?

A

They must be enforced on a trusted system and fail securely.

67
Q

Passwords

How should credentials be stored?

A

Use a cryptographically strong one-way salted hash and store them securely.

68
Q

Passwords

How should password reset operations be handled?

A

They require the same controls as account creation and authentication.

69
Q

Passwords

How should non-temporary passwords be transmitted?

A

Over an encrypted connection or as encrypted data.

70
Q

Passwords

What should happen after an established number of invalid login attempts?

A

Enforce account disabling.

71
Q

Passwords

How should temporary passwords and links be managed?

A

They must have a short expiration time and require a change on next use.

72
Q

Cryptographic-Based Authentication

What should be used for session management?

A

Use the server or framework’s session management controls.

73
Q

Cryptographic-Based Authentication

Where must session identifier creation occur?

A

On a trusted system.

74
Q

Cryptographic-Based Authentication

What kind of algorithms should session management controls use?

A

Well-vetted algorithms ensuring sufficiently random session identifiers.

75
Q

Cryptographic-Based Authentication

What should be set for cookies with authenticated session identifiers?

A

Set the domain and path to appropriately restricted values.

76
Q

Cryptographic-Based Authentication

What must logout functionality do?

A

Fully terminate the associated session or connection and be available on all authorized pages.

77
Q

Cryptographic-Based Authentication

What should be established for session inactivity?

A

A timeout that balances risk and business functional requirements.

78
Q

Cryptographic-Based Authentication

What must happen if a session was created before login?

A

Close it and establish a new session after successful login.

79
Q

Cryptographic-Based Authentication

What is required on any re-authentication?

A

Generate a new session identifier.

80
Q

Cryptographic-Based Authentication

Should concurrent logins with the same user ID be allowed?

A

No, they must not be allowed.

81
Q

Cryptographic-Based Authentication

How should session identifiers be protected?

A

They must not be exposed in URLs, error messages, or logs.

82
Q

Cryptographic-Based Authentication

What attributes should cookies with session identifiers have?

A

Set the secure attribute for TLS connections and the HttpOnly attribute unless required by client-side scripts.

83
Q

Authorization

How should access control and authorization be designed?

A

Thoroughly up-front.

84
Q

Authorization

What should happen to all requests unless public?

A

They must go through access control checks.

85
Q

Authorization

What is the default stance for access control?

A

Deny by default if a request is not explicitly allowed.

86
Q

Authorization

What principle should be applied when granting access?

A

Least privilege, providing only the necessary access.

87
Q

Authorization

What events should be logged?

A

All authorization events.

88
Q

Access Control

How should authorization controls be applied?

A

They must be enforced on every request.

89
Q

Access Control

What objects should be used to make access authorization decisions?

A

Only trusted system objects.

90
Q

Access Control

How can access authorization be centralized?

A

Use a single site-wide component for checking access.

91
Q

Access Control

What should happen if the application cannot access its security configuration?

A

Deny all access.

92
Q

Access Control

How can transaction limits protect against automated attacks?

A

Limit the number of transactions a single user or device can perform in a given period of time.

93
Q

Access Control

What must be periodically re-validated in long authenticated sessions?

A

A user’s authorization.

94
Q

Access Control

What should be supported for terminated accounts or sessions?

A

Termination of sessions when authorization ceases.