Exam 1 Swen 331

0.0(0)
studied byStudied by 1 person
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/133

flashcard set

Earn XP

Description and Tags

swen 331 first exam lol

Last updated 8:47 PM on 10/12/23
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

134 Terms

1
New cards

What is integer overflow

its when the integer data wraps around and overflows to the next integer

2
New cards

give an example of integer overflow happening

rounding off errors with casting can make it overwrite the next piece of data

3
New cards

What is a solution to integer overflow

beware of casting or just allocate more data

4
New cards

What is a vulnerability

a bug with security consequences that can lead to attackers using it to write exploits for malicious purpose

5
New cards

what is a exploit

An exploit is a piece of software that an attacker has written to use a vulnerability in an effort to cause unintended behavior

6
New cards

what does STRIDE stand for

Spoofing, Tampering, Repudiation, Information Disclosed, Denial of Service, Elevation of privilege

7
New cards

What is a threat

actor that violates CIA

8
New cards

what is software security

the ability to prevent unintended functionality in your application in all layers of the stack

9
New cards

What are 3 terms of human error terminology

slips, lapses, mistakes

10
New cards

what is a slip

errors that happen due to not paying attention

11
New cards

what is a lapse

failure of memory to do something

12
New cards

what is a mistake

failure of planning to take other things into consideration

13
New cards

what is “defense in depth”

if they break in they cant get any further

14
New cards

what is “least privilege”

every user/module is given the least amount of privilege it needs to function so that they restrict access

15
New cards

fail securely

if there is a failure in system, it doesnt leak information

16
New cards

security by obscurity

relying on being obscure to be secure, not good because crowds are good at guessing

17
New cards

frameworks are optional

dont expect frameworks to fix your problems, should know what works best for you

18
New cards

detect and record

post mortem analysis is important

19
New cards

keep it simple

keeping it simple minimize the surface of attack

20
New cards

What is Buffer overflow

modifying memory you shouldnt be able to access

21
New cards

how to avoid buffer overflow

check to see if accessing memory correctly and validate input

22
New cards

What are core security properties

Confidentiality, Integrity and Availability of resources

23
New cards

What does confidentiality mean

system must not disclose any information intended to be hidden

24
New cards

what does integrity mean

to maintain trust of system by not allowing assets to be attacked

25
New cards

what does availability mean

system must be operational and available to users

26
New cards

What is SQL injection

where data becomes code in SQL

27
New cards

How does SQL injection happen

when data from the user interface is put directly into code

28
New cards

how to get rid of sql injection

prepared statements

29
New cards

what are prepared statements

using prepared statements with binding variables to precompile query

30
New cards

What is cross site scripting (XSS)

inserting in input field external javascript or html to alter websites functionality by editing databases

31
New cards

when does XSS occur

when untrusted data enters web app from web request

victim visits generated web page through web browser that contains malicious scripts that are injected with untrusted data

32
New cards

What are types of XSS

non persistent, stored, DOM based

33
New cards

what is reflected XSS

  • non persistent changes to site

  • happens when attacker causes victim to supply dangerous content to web app and reflected back to vicitm, but its not permanent to the site as its not stored anywere

34
New cards

what is stored XSS

  • persistent

  • application will store dangerous data in message forum or visitor log

  • allows for elevated privilege

35
New cards

what is DOM based XSS

client performs injection of the XXS into the page

36
New cards

What happens after XSS happens

  • session hijacking - steal identity to perform spoofing

  • web defacement - modify page to gain excess information from user without them knowing

37
New cards

how to prevent XSS

  • sanitize inputs before putting them in databases

  • defense in depth - only accept known and good inputs

38
New cards

what is Cross site request forgery (CSRF)

when http get request makes persistent modification then you can get users to make changes to other websites that theyre already authenticated on

39
New cards

what does CSRF do

  • exploit trust user have on site

  • causes arbitrary code execution

  • causes task attacker made to be executed because get requests happen so frequently

40
New cards

What are ways to avoid XSS

  • dont allow for GET actions to perform persistent modifications to website

  • require authentication if GET needs to perform modifcation

  • session tokens hidden in encrypted cookies

41
New cards

why is CSRF dangerous

very easy to do because GET requests are easy to make user do by forgery

42
New cards

what is OS command injection

when you expected input is one command, but inject another command in to create a shell or something like that to run some malicious code

43
New cards

how to prevent OS injection

  • resend string into system you want to ensure users cant control string

44
New cards

What is penetrations testing

test to attempt all possible exploits on a site

45
New cards

what does pen testing used to show

shows stakeholders that there isnt much you can exploit your system

46
New cards

what is the purpose of pentesting

demonstrate the amount of person hours required to break in

47
New cards

What are the preconditions to pen testing

requires a working system

48
New cards

what are key techniques of initial access

drive by compromise , hardware additions , spearfishing

49
New cards

what is drive by compromise

user visits malicious sites and execute an exploit

50
New cards

how do hardware additions cause initial access

can get sensitive data

51
New cards

what is spearfishing

getting people to click on links with confidence its sent by someone they know D

52
New cards

what are different techniques of discovery

  • network and service scanning - find out what services are running to run arbitrary command

  • account discovery - finding existing accounts to find what variables there are

53
New cards

What are types of credential access

  • brute force - password guessing

  • credential dumping - dumps db table of credentials and passwords

54
New cards

what is execution and persistence

execution of the command line interface and service execution

55
New cards

what does it mean to execute the command line interface

goal is to get here in order to execute other commands for malicious activity

56
New cards

what does it mean to do a service execution

adding a new service to be executed without knowledge of the user

57
New cards

what are key requirement properties

  • tells what the system should or shouldnt do

  • tells who is interacting with the system

  • highly domain specific

  • should describe how the surrounding env has changed as result of system

58
New cards

what is security

its s property of software, composition of things going right

59
New cards

True or false, should the requirements document be more than just a list of features

True

60
New cards

What are misuse and abuse cases

scenario within a case which an actor compromises the system that show the flow of events with malicious usage

61
New cards

what is the definition of misuse

unintentional harm that are security related

62
New cards

what is abuse

its intentional and actor is seeking vulnerabilities

63
New cards

What is a naive security risk assement

write down worst fears and then avoid those things

64
New cards

what is risk

probability(occurance) * impact

65
New cards

what is a security risk

probability(exploit) * value of an asset

66
New cards

what is an asset

essentially stuff that its trying to protect

67
New cards

what are examples of assets

  • database tables

  • config files

  • logs

  • cookies

68
New cards

what is the main difference between risk assessment and an abuse case

abuse cases emphasize domain and R.A. emphasizes risk. Abuse cases are telling stories and how they did it, where as risk is focused on what MIGHT happen

69
New cards

what is protection poker

traces stories to assets and quantifies the risk for prioritization based on ease of attack and value

70
New cards

What is Path traversal

this is when your input string is supposed to be coming in as a file name but it can be manipulated to be something else. String concatenation went wrong

71
New cards

How to fix Path traversal vulnerability, and define it

canonicalization standardization: standard way to specify files by taking out all the special escape characters and putting it into one format

72
New cards

How does path traversal happen

it happens when you just dont check your strings before you check to see if its a valid file format or not

73
New cards

what is the umask for files subtract from usually

666

74
New cards

what is the umask subtract from directories usually

777

75
New cards

why do we handle umask differently for file than directories

never give execute permission by default to files

76
New cards

what does SUDO command do

execute the user as the root

77
New cards

what does su command do

change the current user to someone else

78
New cards

what is setuid / setguid

sets the user id or group id

79
New cards

what does chmod stand for

command to change permissions

80
New cards

what does read mean

able to READ all the files in the directory, but only able to see the directory if you know the name

81
New cards

what does having “write” mean you can do

mean you can create, delete and update files

82
New cards

what does execute mean

be able to run the program

83
New cards

what permissions do you need in order to read the contents of the file

need x and r permission

84
New cards

what does it mean to execute a directory

to execute a directory is to access all the available files

85
New cards

what is a umask

umask are three digits that are consulted when creating a file or directory to establish permissions

86
New cards

what is the difference between executing a file that is with setuid or not setuid if you dont own the file

if you dont own the file and you just execute it, youre executing as yourself. but if youre setting the uid to you, then youre briefly executing as the other user.

87
New cards

what happens if you do uid / gid on directories

they are ignored in linux, but mean that new files will inherit group id

88
New cards

What is the symbol for -R stand for

recursive - so usually for recursively setting the permissions on all the files in a directory

89
New cards

what does u, g , a and o stand for

user, group , everyone and other

90
New cards

how to change permission to make groups have read write permission

chmod g+rw

91
New cards

how do you say others cant read

chmod o-r

92
New cards

What does the STRIDE acronym represent

ways that people can break into a system

93
New cards

what is spoofing

you are pretending to be someone else and can violate authentication

94
New cards

what is tampering

integrity violation that you changed the data in a source that was supposed to be secure

95
New cards

what is repudiation

integrity of history violation, threat to belief that integrity was preserved

96
New cards

How do you prevent repudiation

Provenance

97
New cards

what is provenance

keeping track of a trail of information to prove a source is reliable and hasnt been tampered with

98
New cards

what is authentication vs authorization

authentication is proving who you actually are to just a system, authorization is how much privilege you have within a system

99
New cards

What happens when you have more complexity on your program

More complexity means things are harder to secure

100
New cards

What does it mean to have structural complexity

lots of interconnected subsystems which leads to architectural complexity as well