Mapa mental
Security
Contenido del mapa
Security
Ciphers
- Substitution Cipher
- Key: Substitution Table
- Attacks
- Known plaintext attack
- Attacker has both Plaintext & Cipertext
- Use both to figure out key
- Attacker has both Plaintext & Cipertext
- Ciphertext only attack
- Frequency analysis - Frequency of letters
- Known plaintext attack
- Permutation Cipher
- Key: Permutation, based on t characters
- Groups plaintext into blocks of t characters
- Permutate / Rearrange it
- Groups plaintext into blocks of t characters
- Cryptanalysis
- Known-plaintext attack
- Easy to figure out permutation
- Known-plaintext attack
- Key: Permutation, based on t characters
- One-Time pad
- Key: n-bit
- Plaintext XOR key = Ciphertext,
- Ciphertext XOR key = Plaintext
- Ciphertext XOR Plaintext = Key
- Ciphertext XOR key = Plaintext
- Plaintext XOR key = Ciphertext,
- Secure as attacker will not be able to guess the key from plaintext only or ciphertext only
- Key: n-bit
- Stream Cipher
- Short Secret key: To generate a bit sequence to be the key to XOR
- Bit sequence as long as ciphertext
- Initial Value (IV, like a seed for random generator) attached to cipher, 0000+cipher
- IV is used in generator to generate n-bits long
- Generator is decided beforehand
- IV is used in generator to generate n-bits long
- Short Secret key: To generate a bit sequence to be the key to XOR
- Block Cipher
- Also known as DES / AES
- Designed for fixed bits input / output
- e.g. 128 bits plaintext input -> 128 bits ciphertext output Hence "blocks"
- Large plaintexts are divided into blocks which are then keys are applied
- Multiple blocks using the same key may cause security implications
- If blocks are same then it will be encrypted to the same cipher
- Electronic Code Book (ECB)
- Multiple blocks using the same key may cause security implications
- Cipher Block Chaining (CBC)
- Uses different IV for each block
- Designed for fixed bits input / output
- Also known as DES / AES
- Cryptography Pitfalls
- Reusing IV in encryption
- IV is the same, the difference between two files are able to be obtained
- e.g. Microsoft RC4
- IV is the same, the difference between two files are able to be obtained
- Prediction of generation of secret keys
- Modifying existing or making own encryption
- It is easy to make an encryption you can't break, but not easy to make an encryption everyone cannot break
- Easy to end up with something insecure without realizing
- It is easy to make an encryption you can't break, but not easy to make an encryption everyone cannot break
- Reliance on Obsecurity
- Hide design of system to achieve security
- Can be reverse engineered
- Can be LAYERED as a defense in-depth strategy
- Kerchkhoff's principle
- System should be secure even if everything about the system except the secret key is public knowlege
- Hide design of system to achieve security
- Reusing IV in encryption
- Substitution Cipher
Authentication
- Password Authentication
- Give username and password
- If both matches, it is authentic
- Weak Authentication: Username and password can be obtained from sniffed message
- Strong Authentication: Username and password cannot be obtained from sniffed message
- Give username and password
- Ensuring that message is who it claims to be
- Authenticity implies integrity
- Integrity - Data is not changed
- Authenticity implies integrity
- Attacks
- Replay attack
- Sniff the message and replay it to the server to impersonate user
- Bootstrap attack
- Intercept password during bootstrapping
- Steal password through postal mail
- Default passwords used in cameras
- Once an attacker gains access to a camera he can determine its firmware version, download a copy from the Internet, unpack it, add rogue code to it and write it back to the device.
- Intercept password during bootstrapping
- Search for password
- Steal password
- Shoulder sniffing - Look over shoulder to steal password
- Virus, Keylogger
- Hardware keylogger - Attached to USB of keyboard to log keystrokes
- Spoofing
- Spoof Login screen
- Phishing
- Trick user to voluntarily send password to attacker
- Phishing email
- Spear Phishing, target small group of users
- Vishing
- Fraudsters also use the phone to solicit your personal information. This telephone version of phishing is sometimes called vishing. Vishing relies on “social engineering” techniques to trick you into providing information that others can use to access and use your important accounts.
- Pharming
- Fraudster installs malicious code on a personal computer or server. This code then redirects any clicks you make on a website to another fraudulent Website without your consent or knowledge
- Smishing
- Uses cell phone text messages to lure consumers in. Often the text will contain an URL or phone number. The phone number often has an automated voice response system.
- Caches
- Searching for browser cache
- Insider attack
- Attacker steals password file
- Replay attack
- Preventive measure
- Strong password
- Limit number of attempts
- Storage
- Encryption to protect confidentiality
- Restrict access to files that contain passwords
- User level permissions
- Store password as hash
- Password expiration based on needs and usability
- As changing password often requires users to remember more passwords or become a hassle and encourages the user to choose weaker passwords
- Usually password cannot be the same as previous
- As changing password often requires users to remember more passwords or become a hassle and encourages the user to choose weaker passwords
- Strong password
- Security Questions
- Enhance usability as its self serving to reset password
- Choice of Security Questions
- Memorable, Consistent, Nearly Universal, Safe
- Answers to bad questions can be easily guessed, "what is your birthday"
- Examples
- ATM example
- ATM Card contains magnetic strip that can be read by any card reader
- ATM card skimmer reads info of card, Camera steals pin
- ATM Card contains magnetic strip that can be read by any card reader
- Biometric
- May have inevitable noise while capturing biometric data
- 2 Factor Authentication
- OTP token from mobile number, User registers mobile number and after logging in with id and password, they are to give OTP
- Biometric scan after smartcard inserted to confirm user's identity
- ATM example
- Password Authentication
Authenticity
- Public Key Cryptography
- Uses RSA with private & public key
- Private key to encrypt, Public key to decrypt
- RSA
- RSA is very slow compared to AES
- Uses RSA with private & public key
- Cryptographic Hash
- Hash
- Takes large message as input, outputs a fixed size DIGEST
- Easy to compute, difficult to revert
- Toothpaste analogy, easy to squeeze out but difficult to put back in
- Easy to compute, difficult to revert
- Difficult to find two different messages which hash to the same value (COLLISION RESISTANT)
- Still possible
- Keyed Hash
- Takes large message + secret key as input, output a fixed sized MAC
- Without knowing key, difficult to forge MAC
- Takes large message + secret key as input, output a fixed sized MAC
- Takes large message as input, outputs a fixed size DIGEST
- Hash
- Data Authenticity / Integrity
- Hash
- Obtains DIGEST from file by computing hash and compare to ANOTHER DIGEST obtained from secure channel
- Mac & Signature
- Message Authentication Code (MAC)
- Or DIGEST (no key)
- Symmetric key
- No secure channel to deliver hash
- Pre-establish secret key, compute MAC using secret key and compare
- Signature
- Private key to encrypt (sign), Public key to decrypt Only 1 person knows private key
- Asymmetric key
- Signature scheme achieves Non-repudiation where someone cannot deny action
- Message Authentication Code (MAC)
- Attacks
- all hash functions subjected to Birthday Attacks
- Hash
- Public Key Cryptography
Public Key Infrastructure + Channel security
- Key Distribution
- Public Announcement
- Broadcasts public key
- People can use to confirm signature
- Broadcasts public key
- Public key available directory
- Directory may not be secure
- Public Announcement
- PKI
- Certificate
- Given and signed by CA
- As user sends a message, attach certificate on it to guarantee authenticity
- Certificate Authority (CA)
- Keeps directory of public keys and gives "certificates" to people signed by its private key
- The certificates will have an expiry date on it
- People can use public key of CA to check if certificate is true
- CA may not be trusted
- Rogue CA can forge any certificate
- Keeps directory of public keys and gives "certificates" to people signed by its private key
- Certificate
- Limitations on PKI
- Implementation bugs
- Ruby’s SSL client implements hostname identity check but it does not properly handle hostnames in the certificate that contain null bytes
- When a CA that is trusted by an SSL client allows to issue a server certificate that has a null byte in subjectAltName, remote attackers can obtain the certificate for ‘www.ruby-lang.org\0.example.com’ from the CA to spoof ‘www.ruby-lang.org’ and do a man-in-the-middle attack between Ruby’s SSL client and SSL servers
- Ruby’s SSL client implements hostname identity check but it does not properly handle hostnames in the certificate that contain null bytes
- Social Engineering
- Typo-squatting
- Where users are at "fault" for typing wrongly or clickbaited into a spoofed website and does not notice it as a phishing website
- Typo-squatting
- Implementation bugs
- Strong authentication
- Challenge Response
- Both parties share a KEY, One will claim he is a user the other will challenge with a random plaintext sent to user. User will hash it and send back to challenger
- Challenger checks hashed message and check if it is correct
- Freshness is to be ensured so replay attacks cannot work
- Freshness - new challenge each time
- Only authenticates one user (Unilateral Authentication)
- If a 3rd party hijacks the channel and acts as the authenticated user, communication is compromised
- Hence outcome of challenge can be a new KEY
- If a 3rd party hijacks the channel and acts as the authenticated user, communication is compromised
- Both parties share a KEY, One will claim he is a user the other will challenge with a random plaintext sent to user. User will hash it and send back to challenger
- Weak, can be replayed by attacker
- Challenge Response
- Key Exchange
- Establish new secret K during challenge
- Also known as session key
- Establish new secret K during challenge
- Key Distribution
Información
- Descripción
- Information Technology Mapa Mental sobre Security, creado por Jeremy Chan el 01/03/2018.
- Creado por
- Jeremy Chan
- Visitas
- 0
- Valoración