Hardcoded storage Flashcards

1
Q

What is hard coding

A

Data is directly embedded into the source code of a program as opposed to obtaining the data from external sources(files or databases) or generating it at runtime

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

What piece of information do hard-coded data usually represent?

A

unchanging pieces of information, such as physical constants, version numbers and static text elements

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

What does soft-coded data encode?

A

Information like user input, HTTP server responses, or configuration files, determined at runtime

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

How can hard coded data be modified?

A

By editing the source code and recompiling the executable

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

Advantages of hard-coded storage

A

Fast delivery of code - it can resolve, in the short term, the pressure to deliver code

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

Disadvantages of hard-coded storage

A

Considered an anti-pattern.
Hard to adapt
Hard to internationalise
Raises security vulnerabilities

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

What is the source code disclosure issue?

A

When the code of the web application is exposed to the public.
Enables attackers to understand how the application behaves by simply reading the code and checking for logical flaws, or hardcoded username/password pairs, or secret keys.
Severity depends on how much code is exposed and how critical the leaked lines of code are for the security of the web application.

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

Hidden form fields

A

Used in web pages to pass information about the current page to the server.
For example, if the user fills out an enquiry form, we may want to obtain their IP address using the scripting language PHP.
May also want the URL of the referring page

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

What do hidden fields allow us to send?

A

All kinds of information, along with form data entered by a user, without the user having to be involved in the process.
Can also be used to pass information back to scripts - may include security tokens or name of a relevant entry in a database

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

Software reverse engineering

A

Involves reversing a programs machine code back into the source code that it was written in, using a program languages statements.

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

Why is software reverse engineering, to retrieve the source code of a program, done?

A

Source code lost
Study how program performs
Improve performance
Fix a bug
Identify malicious content in a program such as a virus
Adapt a program written for use with one microprocessor for use with another

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

Will hardcoded data be revealed when software reverse engineering?

A

Yes, hardcoded data will be revealed

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

Embedded environment variables

A

To use forms in flask we need to use a secret key - this secret key is used for securely signing the session cookie

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