Lecture 11: 16th October 2019 Flashcards
Secure communications and application vulnerabilities part 1
What is x.509?
A standard for the format of public key certificates used in many Internet protocols
How can we implement private comms on the Internet?
We need to make protocols that ensure the source and destination IP addresses and ports and the message body of packets are unreadable
Where can secure comms be implemented in the 5-layer model?
any point
How does security impact network load?
Increases load by ~80-90% due to greater number of packets
What is a MAC?
MAC = message authentication code = A short piece of data attached to messages to authenticate them generated from a keyed hash function using the message data and a symmetric key known to the sender and receiver.
What are MACs aka?
MIC and tag
What are session keys?
Single-use randomly generated symmetric keys used for encrypting communications between two hosts over the course of one connection. They limit the legibility of the messages to only themselves during that session.
What is SSL?
SSL = Secure Sockets Layer = A protocol that enables encrypted communications over a network (the Internet). SSL is at the transport layer, sitting on top of TCP, and provides an application interface for secure and encrypted communications
Where is SSL on the layered model?
the transport layer
How does SSL work?
SSL has normal process of handshake/data exchange/close but also includes choosing the cipher suite and keys in the handshake so that from then all communications are encrypted and secure
What is SSL’s flow of control?
TCP handshake:
- A to B : syn (synchronise)
- B to A : syn OK
- A to B : syn OK ack
then comms
TCP FIN:
- A to B: Fin
- B to A: Fin Ack
(or other way around)
Handshake and fin are unencrypted. Cipher suite choosing and key exchange in “comms” section above, but immediately after handshake
What is a nonce?
“number only once”: random number used to identify a communications exchange and establish secure communications; ~ a session key
How are nonces involved with SSL handshakes?
Server sends a nonce back to client with certificate and cipher suite choice
How are ciphers agreed in SSL handshakes?
Client tells server which algorithms it supports; server chooses an algorithm from the list and sends choice
What are some vulnerabilities in HTTPS?
Heartbleed in the past; incorrect usage leads to vulnerabilities; anyone can get CAs; breaches in any CA affects them all and all of them can make a certificate for any site
What is the difference between HTTPS, SSL, TLS, and STARTTLS?
HTTPS = an extension of HTTP implementing secure communication over a computer network that is widely used on the Internet. In HTTPS, the communication protocol is encrypted using TLS or, formerly, its predecessor, SSL
SSL = Secure Sockets Layer = A protocol that enables encrypted communications over a network (the Internet). SSL is at the transport layer, sitting on top of TCP, and provides an application interface for secure and encrypted communications
TLS = A cryptographic protocol implementing secure, encrypted communications over a network. It is at the transport and session layer and is on top of TCP, again providing an application interface for secure and encrypted communications
STARTTLS = An extension to SMTP facilitates secure and encrypted communications between SMTP clients and servers. Tries to use TLS and falls back to SSL.
What is the weakest-link problem with CAs?
The fact that any CA can issue a certificate for any site, a breach in 1 affects all their certificates and all other CAs
Why do cookies present a security vulnerability?
Set-cookie allows inspection and alteration of a user’s cookie data by a server
Why do forms on websites present security vulnerabilities?
You can pass scripts to servers in input elements to make them execute. GET requests include parameters in the URL in plaintext, POST requests need a max length, and PHP is susceptible to SQL injections and needs filter sanitising
What is filter sanitising?
Removing certain characters to stop inputs being executable script statements
What are SQL injection attacks?
Using web page inputs to insert SQL statements into a server to execute and perform some malicious actions
How can you use forms to execute JS code?
Put escaped JS code into form inputs to possibly get processed and executed
What is cross-site scripting?
Cross-site scripting (XSS) is when attackers inject client-side scripts into trusted web pages viewed by other users.
How can HTML source code allow footprinting?
Looking at artefacts such as comments, TODOs, etc. might give you clues as to the architecture of the site that may allow you to design a viable attack.