Computer Science / Software Engineering Notes Network

Software Security

Matthew Barnes

Software Vulnerabilities        1

Risks and Consequences        1

Who is the Attacker?        3

Vulnerabilities        5

CIA Triad        7

CVE / CVSS / CWE        7

Low-Level Programming        9

Memory Errors        9

Assembly        10

Malware        11

About Malware        11

Common Techniques        11

Persistence        11

Stealth        11

Packing and Obfuscation        12

Anti-Analysis        12

Basic Static Analysis        12

Advanced Static Analysis with IDA        12

Introduction to Risk Analysis        12

Eliciting Security Requirements with Misuse Cases        15

Security Requirements        15

Misuse Cases        15

Attack Trees        17

Software Vulnerabilities

Risks and Consequences

Risk

Pretty picture

Service and data unavailability

Your service / data could be made unavailable.

Reputation

A hacker could do something to your website, and nobody would trust your service anymore.

Data leaks

Client lists, industrial secrets, business plans, e-mails etc.

Bank fraud

Stealing credit cards, phishing for bank details, etc.

Data loss

Losing data such as projects, client data, etc.

This can happen due to HDD / SSD faults.

Who is the Attacker?

Attacker

Motive

Pretty picture

Competitor

Take down a rival business

Hacker

Get a kick out of hacking you

Activity (hacktivist)

Vigilantism

Nation state

War

Vulnerabilities

Vulnerability

  • Weakness in the system
  • Internal factor

Threat

  • Condition that can cause harm
  • External factor

Risk

  • Likelihood of the realisation of a threat

Vulnerability without a threat = no risk

Threat without a vulnerability = no risk

  1. Software released from a vendor (with the unknown vulnerability)
  2. Vulnerability discovered by an attacker and exploit is released
  3. Vulnerability discovered by the vendor
  4. Public dissemination of the vulnerability
  5. Antiviruses start revealing the exploit
  6. Patch released by the vendor
  7. Exploit mitigation deployed on all affected systems

CIA Triad

CVE / CVSS / CWE

Rating

CVSS Score

None

0.0

Low

0.1 - 3.9

Medium

4.0 - 6.9

High

7.0 - 8.9

Critical

9.0 - 10.0

Low-Level Programming

Memory Errors

#include <stdio.h>

int main(int argc, char** argv)
{
 
char buffer[500];
 
strcpy(buffer, argv[1]);
 
return 0;
}

Assembly

Malware

About Malware

Common Techniques

Persistence

Stealth

Packing and Obfuscation

Anti-Analysis

Basic Static Analysis

Advanced Static Analysis with IDA

Introduction to Risk Analysis

Eliciting Security Requirements with Misuse Cases

Security Requirements

  1. identify critical assets
  2. define security goals for assets
  1. confidentiality: prevent unauthorized access
  2. integrity: prevent unauthorized modification
  3. availability: readiness of a correct service
  4. accountability: ability to identify subjects for decisions and actions
  1. Identify threads to assess → misuse cases
  2. identify and analyze the risks
  3. define countermeasures aka security requirements → security cases

Misuse Cases

Attack Trees