Email Security Flashcards
What are the security properties of S/MIME clear-signed? Explain by indicating the appropriate algorithms used and if they are mandatory or optional.
The properties offered are:
* Non-repudiation: by signing for receipt of a document, so that the recipient of a message cannot deny having received it.
* Security label, a mechanism through which each message is classified according to a certain security hierarchy. For example, in the military, messages are classified into unclassified (readable by anyone), classified (reserved only for those who have a certain authorization), secret and top-secret.
* Secure mailing-list, which solves the problem of how to encrypt messages destined for a mailing-list (where the public keys of the recipients are not available). However, this introduces a weakness because the message is no longer end-to-end encrypted but the mailing list manager could potentially go and read its contents.
* Signature of certificate attributes.
The algorithms used are:
* Digest: SHA-1 (mandatory) or MD5.
* Digital signature: DSS (mandatory) or digest + RSA (most used solution).
* Key exchange: Diffie Hellman (required). In fact, the common practice is to calculate a message key by encrypting it with the recipient’s RSA key.
* Message encryption: 3DES or RC2 / 40 (both mandatory).
Say what APOP has more than POP and how it implements it
The APOP variant introduces a new command, called APOP, which replaces the pair of USER + PASS commands. This command introduces a symmetrical-type challenge mechanism.
Describe the S/MIME clear-signed attributes indicating which are optional and describe the various encryption algorithms and keys used.
- Digest: SHA-1 (mandatory) or MD5.
- Digital signature: DSS (mandatory) or digest + RSA (most used solution).
- Key exchange: Diffie Hellman (required). In fact, the common practice is to calculate a message key by encrypting it with the recipient’s RSA key.
- Message encryption: 3DES or RC2 / 40 (both mandatory).
With reference to an Internet e-mail management system (MHS, MailHandling System), identify possible security problems and indicate which protection techniques can be applied to solve or mitigate each problem.
Securing email is not trivial:
* Connectionless system, ie there is no direct connection between the sender and the recipient. Indeed, we speak of a store-and-forward system, that is, the message before
being sent from one node to the other is first saved locally and only later is forwarded.
* Use of untrusted MTAs on which messages are stored (even if temporarily).
* Security level of the MS (message store) on which messages are stored before they are read.
* An encryption system could be implemented, but there would be problems if a mailing-list was used (problem of implementing encryption for all members of the mailing-list).
* Since email is now a widely used system, making changes is not such an easy thing to do.
Authenticate the email sender: MS, MSA or MTA?
MSA
How does the Message Handling System works?
The MHS is based on the store&froward process.
There are 4 principal components:
1. MUA = Message User Agent
It is the software component that the user uses to send emails.
2. MSA = Message Submission Agent -> outgoing mail server
This is another software to which the MUA sends the email. The MSA injects the. email in the mail transport system.
3. MTA = Message Transfer Agent
The mail transport system is composed of MTAs that are arranged in a chain. The chain ends when the email reaches the final destination, that is NOT the final user device but a server called Message Store (MS)
4. MS = Message Store -> incoming mail server
It is a server. The destination user will use its MUA to read the email from the MS.
If the destination user wants to reply to the sender, a different MSA and a different MTA chain will be used.
Which are the options that the user has to interact with the email system?
There are two types of MUA implementations:
* e-mail in client-server mode
* webmail
Email in the client-server mode
The MUA consists in an application that just takes care of emails.
This application MUST be configured with two important informations: the outgoing mail server address and the incoming mail server address.
Example: Thunderbird, Outlook Express
Webmail
The user uses a web browser to connect, via HTTP and HTML, to a web server that contains a virtual MUA. It also contains an HTTP engine that the user can use to write the email using standard web formats.
Here the email is stored at the mail server provider and this can cause security issues.
You have not control over your mail, the provider of the virtual MUA has! Much more dangerous.
On which protocols is the email system based? (list)
- SMTP
- POP
- IMAP
- MIME
+ there is RFC-822 that is a message format
SMTP
SMTP stands for Simple Mail Transfer Protocol.
* push protocol
* TCP based
* text based
* used between MUA - MSA and MSA - MTA
* port 25/TCP from MSA to MTA
* port 587/TCP from MUA to MSA
POP
Post Office Protocol
- used to get a mail from the MS and placing it into the MUA ( = IMAP)
- port 110/TCP
- POP-2 (RFC-937), POP-3 (RFC-1939) user authentication by means of a password in clear (!!!)
- APOP: user authentication via symmetric challenge-response (MD5)
- K-POP: mutual authentication by means of tickets
POP-3 example
~~~
telnet pop.polito.it 110
+OK POP3 server ready 7831.84549@pop.polito.it
USER lioy
+OK password required for lioy
PASS antonio
+OK lioy mailbox locked and ready
STAT
+OK 2 320
……….
QUIT
+OK POP3 server signing off
~~~
Stat: status -> response “you have two emails for a total of 320 bytes”
This has not security! A solution is using TLS for POP and IMAP
IMAP
Internet Message Access Protocol
- used to get a mail from the MS and placing it into the MUA ( = POP)
- port 143/TCP
- default authN: username and password in clear
- can use OTP, Kerberos or GSS-API
This has not security! A solution is using TLS for POP and IMAP
RFC-822
This is not aa protocol but a message FORMAT that provides pure text mails.
- only US-ASCII
- characters on 7 bits, the 8-th one is used as parity bit and this is really dangerous because each MTA can modify it and, if the message was digitally signed, the signature wont correspond anymore.
- each line must terminate with <CR> <LF> to make mails be **system independent**. This is the necessary because we dont know which will be the receiving operating system (the new line command is translated differently in each of them) we have to define a neutralmform. At destination they will be translated based on the operating system standard.</LF></CR>
The parity bit is also dangerous because if we look for example at accented characters, they have an ASCII code that is major that 128 so they will have the parity bit set to 1. If some MTA changes it the character will be wrong and the signature, if present, wont correspond anymore.
RFC-822 message
A message is composed by an header and a body.
* header: it is made of keywords at the beginning of the line and, if the line is too long, the continuation lines start with a space. The interface used could be in a language different from english but the actual mail will be sent just with english headers.
The headers are: From, Sender, Organization, To, Subject, Date, Received, Message-id, CC, Bcc, Return-Receipt-To
where From is the logical sender, Sender is the operational one, date is declared by the MUA, CC stands for Carbon Copies and BCC for Blind Carbon Copies, and Return-Receipt-to is true if the sender wants to receive an ack.
The received header shows all the MTAs that have been used.
The headers are terminated when a line with just CR and LF is found.
- body: it is separated from the header by an empty line and containes the actual message
This format gives a lot of opportunities to create fake mails because in the “Form” field it is possible to write anything.
MIME
Multipurpose Internet Mail Extensions
Main characteristics:
* various data encodings: non-USA alphabets, “long” lines, binary data
* multipart format: distinct parts, parts of different type
* recursive format: each part can be a multipart object
Types of secure email messages:
* signed: the message is signed with a digital signature in S/MIME format
* encrypted: encrypted envelope in S/MIME format
* encrypted and signed: the digital signature in S/MIME format is applied to the message and then everything is transformed in a encrypted envelope in S/MIME format
It uses RFC-1847 extension.