Explain the difference between symmetric key and asymmetric key cryptography, and state and example application where each would be used.
• Symmetric key cryptography is where you just have one key (password) and the same key is used for both encrypting and decrypting the data.
• Asymmetric key cryptography is where you have a public and private key.
• An example of symmetric key cryptography is file encryption with a password, or any valid application where a single password is used.
An example of asymmetric key cryptography is any application or protocol where public-private keys are used, e.g. PGP, SSH, SSL, Bitcoin Wallets.
State four desirable properties of a cryptographic hash function.
• Deterministic - The same input always results in same hash
• One-way function: You should not be able to reverse the plain text from the hash.
• No collisions: you should not be able to find two different inputs with the same hash value
• Avalanche effect: changing 1 bit results in completely different output indistinguishable from any other hash. May also be called chaotic function or described accordingly.
Where if an input is changed slightly (for example, flipping a single bit), the output changes significantly
In the context of databases, explain and give an example of:
i. An obscure query.
An inference attack
Obscure query:
• This is where you hide your real query in a more complex query making it harder to identify the real query.
• Example would be an SQL query where you select data within complex logical conditions that ends up simplifying to a clearly malicious query. When reviewing the database logs, it now becomes more difficult to understand any malicious behaviour.
Inference attack:
• These occur when users combine multiple views of a database in order to illegitimately gain knowledge of a subject or sensitive data e.g. Through statistical inference. An alternative explanation is when someone is allowed to execute queried that they are authorized for, but by executing those queries they are able to gain access to information for which they are not authorized through inference of query results.
• Given a list of students and their colleges, and a list of fines by college, if we know Sarah is the only member of a particular college, we will be able to infer her fines. Alternatively, if we know that Jim and James are members of her college with zero fines, we can infer that both Jim and James are members of a college with zero fines, we can infer that both Jim and James also have zero fines.
Explain what “IP spoofing” is, and explain how you can protect against an IP spoofing attack.
• IP spoofing is the process of replacing the source IP address with a fake IP address from the IP packets to hide the real identity of the sender. The hacker can make it appear that the packet was sent by different computer system. This can be used for session hijacking, for example a user may think he is accessing a genuine page when he types in the URL but actually he is seeing a compromised page whereby the hacker can steal sensitive information.
• Protect with authentication based on key exchange and configuration of encrypted sessions.
• You can use an ACL to deny private IP addresses on the downstream interface.
• You can implement filtering of inbound/outbound traffic.
The router can be configures to reject packets from outside the LAN that claim to be originating from within.
Define a substitution cipher.
A substitution cipher is a method of encrypting by which units of plaintext are replaced with ciphertext, according to a fixed system; the “units” may be single letters, pairs of letters, triplets of letter, mixtures of the above an so forth.
Describe the differences between Monoalphabetic, Polyalphabetic and Polygraphic.
Describe SSH and what it can be used for.
How do public and private keys work?
Public key cryptography allows someone to send their public key in an open, insecure channel. Having a friend’s public key allows you to encrypt messages to them. Your private key is used to decrypt messages to you.
Describe block ciphers.
Describe side-channel attacks.
A side channel attack is any attack based on information gained from the implementation of a computer system, rather than weakness in the implemented algorithm itself.
What is a rainbow table?
What are salts?
What is an access control matrix (ACM)?
Describe the 8 NIX access permission settings.
What is setuid and sticky bit?
Describe link vulnerabilities.
E.g. When files give access to an unnamed file. An thus can be altered to access unauthorised files.
What are access control lists?
Describe capability based security.
Describe the Bell-LaPadula Model
Describe the Biba Integrity Model.
Describe the Clark-Wilson Integrity Model.
What are Protection rings?
What are the advantages and disadvantages of using biometrics?
In what situations does one prefer FMR (number of false positives /total matches) and FNMR (False Non-Match Rate -> number of false negatives/total matches)?