Defensive Design Flashcards

1
Q

What is defensive design?

A

Is the practice of anticipating every possible way that an end-user could misuse a system or device

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

How do you know that defensive design has not been good enough?

A

When the program crashes
When the program behaves in an unintended fashion
When data security has been compromised

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

What is a menu-driven user interface?

A

A menu-driven user interface limits the user to being able to pick from a displayed list of choices

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

How can a menu interface limit the misuse of a program?

A

A menu interface can help to limit unexpected or invalid entries

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

What is a ‘graphical widget’?

A

Is a small self-contained object on-screen to allow data selection to be made

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

How does the calendar widget not allow the user to select an invalid value?

A

The date information can be encoded in any way convenient to the programmer, and the user cannot select an invalid value

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

What is the purpose of widgets?

A

Is to limit user choice to only valid values

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

What is the most flexible way of receiving inputs from a user?

A

Text input

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

What defensive design help with for text input?

A

Making it as easy as possible for the user to get things right on the first try

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

How can a programmer design to reduce errors in inputting text?

A

Inform the user of what they need to enter

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

What is validation?

A

It ensures that the data entered is valid for further processing by the program handling it

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

What are the 4 validation techniques?

A

Checking and limiting the Length of the data
Checking the Range of the data
Checking the Type of the data
Checking the Format of the data

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

What is length validation?

A

Checking to see if the entered value is within the allowed number of characters

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

What 2 options are there for the programmer if the length validation is not right?

A

Inform the user of the problem and allow them to re-enter the data
Modify the input to fit the rules (truncation)

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

What is range validation?

A

Used when inputs have to fall between certain values (e.g. If the program asked for an age, the user would have to enter a positive number)

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

What is type validation?

A

Checking that the input conforms to the allowed data types (e.g. if the input can only be a numeric value then alphabetic or symbol characters are rejected)

17
Q

What is format validation?

A

To check that the input is in the correct format

18
Q

What is a white-list?

A

A list of data that the application will accept as valid

19
Q

What is black-list?

A

A list of data that the application will reject

20
Q

How are white-list and black-list used?

A

Often used with firewall applications and email filtering applications

21
Q

What is a firewall?

A

An application that helps protect a network from intrusion or to limit what network users can access online

22
Q

What is one of the things that a firewall always checks?

A

The URL sent from a web browser within the network

23
Q

What URLs are contained within each list?

A

The whitelist may contain a list of URLs that the firewall will let through
The blacklist may contain a list of banned URLs which will be blocked

24
Q

Why is it easier to create a whitelist?

A

It is easier to define what is acceptable than to try and anticipate what is not acceptable.

25
Q

What should defensive coding have?

A

Encryption

26
Q

What is SQL injection?

A

To send unauthorised SQL queries to a database by typing extra data into some input fields

27
Q

What is a good defence against SQL injection?

A

Sanitising input

28
Q

Give 2 examples of sanitising input

A

Stripping out all whitespaces from username / password inputs
Rejecting any non-alphabetic symbols

29
Q

What is authentication?

A

A way of confirming that the user is authorised to access the system

30
Q

What is the most common way of authentication?

A

Username and Password

31
Q

What is two-factor authentication?

A

After the user enters a valid user name and password, the system sends an SMS text ‘authentication code’ to their mobile phone. They then have to enter this as well

32
Q

What is biometric authentication?

A

Checks some physical feature of the authorised person such as their fingerprint. The user puts their thumb on a fingerprint entry device, the data is sent off to a database and checked against their valid data