wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Secure Coding

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

What is the attack technique used to exploit web sites by altering backend database queries through inputting manipulated queries?

a)

LDAP Injection

b)

XML Injection

c)

SQL Injection

d)

OS Command Injection

2.

What happens when an application takes user-inputted data and sends it to a web browser without proper validation and escaping?

a)

Security Misconfiguration

b)

Cross Site Scripting (XSS)

c)

Insure Direct Object References (IDOR)

d)

Broken Authentication and Session Management

3.

Which of the following strategies is appropriate for mitigating an unvalidated redirect vulnerability

a)

Validating the given url against a list of acceptable urls

b)

Limiting the number of redirect attempts by a user

c)

Making use of an indirect lookup table in place of fully qualified urls

d)

Making sure that session cookies are encrypted

4.

What threat arises from not flagging HTTP cookies with tokens as secure?

a)

Session Hijacking

b)

Insecure Cryptographic Storage

c)

Access Control Validation

d)

Session Replay

5.

Is it perfectly acceptable to come up with our own homegrown encryption scheme?

a)

True

b)

False

6.

How do we tighten our security?

a)

Use strong passwords

b)

Log-off personal account when not in use

c)

Use firewall

d)

Do not skip update

e)

All of the above

7.

Session fixation can be mitigated by?

a)

Reusing existing session upon successful login and successful logout where appropriate

b)

Invalidate existing sessions and regenerating new ones upon successful login

c)

Making sure that html attributes are encoded

d)

Making use of physical one-time token generator

8.

__ attack is a type of attack against an application that parses XML input.

a)

Injection

b)

HTML

c)

XXE

d)

XSS

9.

__ attack is a type of attack that allows an adversary to make arbitrary outbound requests from a server.

a)

SQL Injection

b)

HTML Injection

c)

SSRF

d)

XSS

10.

What value does having an HTTP cookie with an HTTPOnly flag provide?

a)

It prevents the cookie from being manipulated in transit

b)

It requires the cookie to be transmitted over HTTPS

c)

It prevents the cookie from being accessed via client-side javascript

d)

It prevents the cookie from being accessed via server-side javascript