Areas of Struggle Flashcards
These are the areas that you tended to struggle with understanding the most. Make sure you get these down-pat (71 cards)
What is TLS?
TLS is a cryptographic protocol designed to provide secure communication over a computer network.
What fundamental areas of Security does TLS ensure, and how?
Confidentiality - Via Encryption
Integrity - Via Message authentication codes (MACs)
Authentication - Typically through certificates
What two phases/layers does TLS consist of?
- Handshake Phase/Layer
- Record Phase/Layer
How does the Handshake Layer/Phase function in TLS?
- Client sends a message to the server, indicating supported cipher suites and a random number
- Server responds with chosen cipher suite, a certificate and its own random number.
- Performs key exchange using chosen cipher suite
- Client verifies server’s certificate
- Both parties compute a master secret from exchanged values and derive symmetric keys
- Both sides send a hash of previous messages encrypted with the session key to confirm integrity
How does the Record Phase/Layer work in TLS?
- Using the symmetric keys, all further communication is encrypted and authenticated
- Data is then split into records and secured using AEAD (Authenticated Encryption with Associated Data)
What are some advantages of using TLS?
- Confidentiality, Authentication and Integrity are integrated into the solution
- Forward Secrecy: If a server’s private key is compromised in later sessions, past sessions are still secure
What are some limitations of TLS?
- If a user trust a certificate from a CA, then all other certificates they’ve issues are also trusted. If it’s compromised, then there will be future problems
- Revocation problems: Certificates can be revoked, but clients don’t tend to check this reliably (OCSP inconsistencies)
- TLS is only as strong as its implementation. If implemented wrong, it could cause large issues
What are some vulnerabilities of TLS?
- TLS is vulnerable to Man-in-the-middle attacks
- Protocol downgrade attacks can be a concern if servers allow weak cipher suites to be used
What is PKI?
Public Key Infrastructure - Framework that enables secure exchange of information using public key cryptography.
How does PKI work?
- An entity generates a public-private key pair
- Entity submits a Certificate Signing Request (CSR) to a Certificate Authority (CA), including public key and identity information
- CA verifies the identity
- If verification passes, then the CA digitally signs the certificate using its private key
- Entity installs the certificate on its server, and clients accessing the sever retrieve this certificate
- Client checks the validity period, and verifies the CA’s signature using the CA’s public key, and ensures the certificate chains back to a trusted Root CA
What are the advantages of PKI?
- Includes Confidentiality and Integrity through encryption and authenticity of message/s
- Non-repudiation - Digital signatures can be used to verify the origin of messages
What are the limitations of PKI?
- If a CA is compromised or makes a mistake, the whole trust model is endangered
- Mechanisms like Certificate Revocation lists are not always checked or enforced
- Each platform has its own list of trusted root CAs, which can vary.
How do clients verify the digital signature on a certificate?
Clients use the public key of the CA to verify the digital signature on the certificate
What alternatives are there to PKI CAs?
- Public CAs
- Self-signed
- Private CA
What do Internet Threat Models assume?
Internet Threat Models assume:
- Attacker has no control over the victim’s OS or machine
- Attacks occur via web content, URLs or browser features
What 4 types of cookies are there, and how are they different from each other?
Session - Deleted on browser close
Persistent - Expire at a set time
- Secure - Sent only over HTTPS
HttpOnly - Inaccessible via JavaScript, mitigating some attacks
What are third-party cookies?
They are set by domains other than the one the user is visiting, and are commonly used by advertisers to track user behaviour across sites
What are the two vulnerabilities in regards to cookies?
Cookie stealing/hijacking - Intercepting or accessing session identifiers to impersonate a user
Cookie Poisoning - Modifying cookies to inject malicious code or data
How does Cross-Site Scripting (XSS) work?
Injection attack, similar to SQL injection
Uses HTML structures and injects them into the content of a website, where the browser will execute them.
What are the two types of XSS attack?
- Reflected XSS
- Persistent XSS
How does Reflected XSS work?
The attack vector is in the URL or query string e.g. a malicious script in a URL echoed by a 404 page
How does Persistent XSS work?
The malicious script is stored on the server through the use of areas with user input e.g. blog comments
This script is then automatically executed when users visit the affected page
How do you prevent XSS attacks?
Websites must aggressively escape HTML characters from any user input/output, by locating all positions in which a website handles untrusted data.
How does Cross-Site Request Forgery (CSRF) work?
If a user logged into a site and then visits a malicious site afterwards, then the latter site can send a POST request to the previous site using the user’s existing session cookie.