Secure Programming Intro Flashcards

(40 cards)

1
Q

Secure Programming =

A

making sure software does what is expected to do and nothing else.
It cannot be misused in any ways.

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

Mindset of Secure Programming:

A

Following best practices and thinking defensively

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

Task of Software Engineer:

A

mainly implementation of business requirements but:
- respect security requirements
- Implement designs and policies in Software
- apply security concepts in every step of development cycle

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

Security flaws may be introduced in which step of the SDLC?

A

any step of the SDLC

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

Apple goto fail

A

geschweifte Klammern fehlen, weshalb zweites goto
if statement fragt ab ob es Fehler gab, wenn Fehler war != 0, da in return err zurückgegeben wird, sieht es aus wie successful verified.

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

Heartbleed (2014) led to

A

Memory leakage

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

Heartbleed (2014) Vulnerability

A

Idea of heartbeat –> check if server is still alive
Client: “Hi server, please say MESSAGE (length of MESSAGE)
Server: “MESSAGE”

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

Cloudbleed let to…

A

Memory Leakage

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

Cloudbleed Vulnerabilty

A

Checking end of HTML buffer before copy to output stream –> broken HTML tags caused vulnerable websites to leaking information of other unrelated sites:
- HTTP headers
- Body of HTTP POST (incl. Passwords)
- JSON requests and responses of API calls
- URI parameters
- Cookies and authentication data (such as API keys and OAuth tokens)
- …

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

Was Cloudbleed vulnerability fixed soon?

A

Yes, but the problem was Search engines cached some of the leaked content

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

Linux Kernel Backdoor (2003)

A

current uid wird gesetzt durch = und nicht verglichen –> root

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

British Airways Case

A

22 lines of JavaScript were injected into British Airways website –> Information was sent to server controlled by attackers without disrupting the flow trhough TLS to host baways.com

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

How to react to a reported security vulnerability:

A
  1. Schwachstellen verifizieren
  2. Gezielte Kommunikation (Adressaten, Inhalt, Timing)
  3. Entwicklung von Patch
  4. Bereitstellung von Patch (Einsatz von älteren Versionen berücksichtigen)
  5. Lessons learned
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Risk =

A

Impact x Probability

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

Risk in Software Development =

A

Impact x Threat Level x Vulnerability Level

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

Threat Level =

A

Exposure, capabilities of an attacker like skills, resources incentive

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

Vulnerability Level =

A

presence and general security of flaw

18
Q

Goal of Secure Programming:

A

Reducing Vulnerability Level by:
- reducing number of vulnerabilities in the system
- making it hard to exploit them

19
Q

Attack surface =

A

sum of different attack vectors where unauthorized users can try to enter data to or extract data from an environment

20
Q

Through an attack surface an adversary can:

A
  • modify data or behavior of a system
  • observe it (e.g. server versions displayed, memory dumps etc.)
21
Q

Microsoft Vulnerability Mitigation Strategy

22
Q

Security in Software Development Process is needed in…

24
Q

Automatisierung ist im ganzen Prozess wichtig, da es…

A

die Geschwindigkeit erhöht.

25
Design:
- Overview of functionality - Ommiting implementation details - Conceptual, high-level components
26
Implementation:
- Code is written - Details are specified
27
Potential risks from Design to Implementation:
- increased attack surface - higher vulnerability level - changes in threats
28
Example of risk from Design to Implementation
XOR --> funktioniert grundsätzlich, jedoch in Implementation, wenn jemand exakt Spannung messen kann, kann abgeleitet key und cleartext abgeleitet werden
29
SAST =
Static Application Security Testing = Source Code Analysis = Scanning the code commit and/or during development within IDE
30
SAST = Black- or Whitebox?
Whitebox
31
DAST =
Dynamic Application Security Testing = Vulnerability Scan = testing running application without source code or binaries
32
DAST = Black- or Whitebox?
Blackbox
33
SAST Advantages:
- Early vulnerability finding - Scales well - Usable for any type of code / application - Works well for detection of buffer overflows, SQL injection flaws etc. - Developer-friendly output --> exact locations of flaws
34
SAST disadvantage =
Cannot find runtime or environment-related issues
35
DAST advantages:
- Generally for web applications and web services - works well for some configuration issues, outdated libraries etc. - can find runtime or environment-related issues
36
DAST disadvantages:
- Finds vulnerabilities rather alte in SDLC - Scales with limitiations
37
Dependency Analysis -->
update software components regularly (watch for the patch version)
38
Dependency Analysis uses
SBOM (Software Bill of Materials)
39
SBOM (Software Bill of Materials) contains
dependency / package management + scanning NVD / CVE datasets against components in BOM
40
Integrated scanning in pipeline is good but scans should be triggered...
upon updates to vulnerability datasets