D385: FINAL
Leave the first rating Students also studied Terms in this set (46) Western Governors UniversityD 385 Save D385 Pre-Assessment (All Correct) 39 terms Cydo_EntisPreview D385 Software Security and Testing...69 terms sdelbonPreview D385 - Software Security Testing 34 terms Brandon_Lewis664 Preview
D385 -
108 term esth What is Defensive Programming?- assume mistakes will happen and guard against them
- assertions are the most common way of doing this
- code checks itself as it runs
- always check, validate, and sanitize data
- bplist
- maintains a (file, line) tuple of breakpoints
- returns a string with all set breakpoints
- POST data payloads
- URL parameters
- requires the tester to posses both testing and software development skills
- tools would have to be language specific
- especially when tools are used
- finds runtime vulnerabilities
- requires only a running system; conducted on any application
Which attribute provides a dictionary of breakpoint instances?
Which function can be used to return all set breakpoints? - get_all_breaks( )
Which 3 data types are considered user-provided? - cookies
What are limitations of Static Code Analysis- does not account for runtime vulnerabilities
Advantage of Static Code Analysis?- fast turnaround time
Advantage of Dynamic Code Analysis?- no need to understand how to write software
Limitations of Dynamic Code Analysis?- false positives and false negatives
- dependent on the correctness of the rules
- false sense of security
- difficult to trace back to exact location
- XSS
- SQLi
What kind of attacks does Client-side Testing look to prevent?
- CORS
- Clickjacking
- HTML injection
- bypass security
- inject bad data
- Blowfish
- Twofish
- AES
- ChaCha
Secure Unit Testing- check for bad input
How to hash with sha256 in Python?import hashlibsha256 = hashlib.sha256()sha256.update(b'message')hash = sha256.hexdigest() Examples of Block Ciphers?- Triple DES
Examples of Stream Ciphers?- RC4
TLS Handshake: 3 Tasks1. cipher suite negotiation
- key exchange
- server authentication
- SameSite
- Secure
- Domain
- Max-Age
- ensures cookie transmitted over HTTPS
- granting authorization
- performing token exchange
- accessing protected resources
- data authentication
- one-way function
Set-Cookie Response Header 5 Directives?- HttpOnly
Secure Directive- prevents MITM
OAuth 4 Phases1. requesting authorization
What kind of attack does client testing seek to prevent? - HTML-injection Attack Which security dimension involves determining who created which data?
What is the preimage resistance property of a hash function?
Which two safeguards does a digital signature guarantee? (Choose 2 answers.)
- nonrepudiation
- data integrity
- methods for protecting against XSS?- validating input
- escaping output
- managing response headers
- URL
- header of an HTTP request
What vectors can malicious code arrive in?- body
Example of CSP- Content-Security-Policy: script-src none
CSRF Mitigation- SameSite directive set to "strict"
- Referer header validation
- CSRF Tokens
- tuple
- Readablestream
- PUT
Which data structure does the frame-ancestors setting in the CSP header take?
Which preflight request property is triggered by the browser requesting API data?
Which setting allows for specifying permitted methods? - CORS-ALLOW-METHODS Which request methods are considered to be "idempotent"?
- DELETE
Which request methods are considered to be "safe"? - GET
- HEAD
- OPTIONS
- TRACE
Common Status Codes?- 200 = OK
- 201 = CREATED
- 400 = BAD REQUEST
- 401 = UNAUTHORIZED
- 404 = NOT FOUND
- 405 = METHOD NOT ALLOWED
- 500 = INTERNAL SERVER ERROR
Which value of the X-Frame-Options directive allows a page to be displayed in a frame of another page?
- SAMEORIGIN
Which value for the X-Frame-Options directive will not allow any page to be displayed in a frame of another page?
- DENY
Which setting can be used to configure the value of Access-Control-Allow-Origin?
- CORS_ORIGIN_WHITELIST
Which setting allows the browser to send cookies? - CORS-ALLOW-CREDENTIALS SameSite Directive setting NONE- browser will echo the session ID cookie without any conditions back to the server
- cannot be the default
SameSite Directive setting "strict"- browser will only echo the session ID cookie for same site requests SameSite Directive setting "Lax"- browser will echo the session ID cookie for the same site and cross-site top- level navigation requests that use safe HTTP methods like GET
- DEFAULT
Which referrer policy enforces sending nothing if the protocol is downgraded from HTTPS to HTTP?
- strict-origin
- unsafe-url
- default-src
- Persistent
- Reflective
- Accept
- If the application allows log records to be parsed, it might be possible to inject
Which referrer policy allows for unconditionally sending the referrer address for every request?
Which directive does the browser fall back to when it does not get a specific fetch directive?
Which cross-site scripting (XSS) attack relies on the client-side equivalent of the redirect statement?
Which cross-site scripting (XSS) attack relies on a URL- embedded script?
Which HTTP Header indicates the type of content an API client can accept?
What is the primary defense against log injection attacks? - strictly sanitize outbound log messages by implementing an allow list of characters Impact of Log Injection Attacks?- Logs might be tampered with or added
executable code into the web application.