Misplaced Pages

Bounce Address Tag Validation

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.

In computing , Bounce Address Tag Validation ( BATV ) is a method, defined in an Internet Draft , for determining whether the bounce address specified in an E-mail message is valid. It is designed to reject backscatter , that is, bounce messages to forged return addresses.

#589410

60-584: The basic idea is to send all e-mail with a return address that includes a timestamp and a cryptographic token that cannot be forged. Any e-mail that is returned as a bounce without a valid signature can then be rejected. E-mail that is being bounced back should have an empty (null) return address so that bounces are never created for a bounce and therefore preventing messages from bouncing back and forth forever. BATV replaces an envelope sender like mailbox@example.com with prvs= tag-value =mailbox@example.com , where prvs , called "Simple Private Signature",

120-459: A Path header, example: The same information in an RFC 5321 e-mail envelope - that is the SMTP info like MAIL FROM - would be: The 1st step reflects the sender, the 2nd step the next MTA, etc. In this example let's assume that the 2nd MTA forwards the mail to a 3rd MTA, where it is finally delivered. The final MTA is also known as Mail delivery agent (MDA), putting the mail into the mailbox of

180-486: A VERP address are handled within the rewriting domain, and forged messages can at most unsubscribe some users, a kind of abuse that hasn't seen significant exploits in the last decades. Instead, SRS aims at re-mailing a possible bounce back to Alice , so that forged bounces can become an alluring technique for injecting spam apparently originating from the rewriting sender. SRS provides for another prefix, SRS1 , to be used for rewriting an already rewritten address, in

240-414: A certain amount of anonymity in the resending process, if this is desired. However, a database requires centralization and is a single point of failure. Another possibility is to store the long rewritten address somewhere in the message header. The i = tag of a DKIM-Signature may be a good place, as such choice considerably improves the security. This technique has been just observed. Unless there

300-419: A correct source domain, other filtering techniques can work more effectively. In particular, the source domain can feed into a reputation system to better identify spam. Conversely, DKIM can make it easier to identify mail that is known not to be spam and need not be filtered. If a receiving system has a whitelist of known good sending domains, either locally maintained or from third party certifiers, it can skip

360-474: A data collection involving 21 mail servers and millions of messages. 92.3% of observed signatures were successfully verified, a success rate that drops slightly (90.5%) when only mailing list traffic is considered. The problems might be exacerbated when filtering or relaying software makes changes to a message. Without specific precaution implemented by the sender, the footer addition operated by most mailing lists and many central antivirus solutions will break

420-403: A decade later spammers started to abuse this flaw in post-1123 SMTP, today most mails are spam and most reverse paths are forged. Note that spammers typically forge working reverse paths , many MTAs reject mail if callback verification or other plausibility checks fail for the reverse path . RFC 5321, as well as RFC 2821, states that non-delivery reports ( bounces ) must be sent to

480-400: A different TXT record, for example when one organization sends email on behalf of another. The receiver can use the public key (value of the p tag) to then validate the signature on the hash value in the header field, and check it against the hash value for the mail message (headers and body) that was received. If the two values match, this cryptographically proves that the mail was signed by

540-522: A different character set, and often document this with X-MIME-Autoconverted: header fields. In addition, servers in certain circumstances have to rewrite the MIME structure, thereby altering the preamble , the epilogue , and entity boundaries, any of which breaks DKIM signatures. Only plain text messages written in us-ascii , provided that MIME header fields are not signed, enjoy the robustness that end-to-end integrity requires. The OpenDKIM Project organized

600-503: A file, so as to obtain a signed copy of the message. Use of the l tag in signatures makes doctoring such messages even easier. The signed copy can then be forwarded to a million recipients, for example through a botnet , without control. The email provider who signed the message can block the offending user, but cannot stop the diffusion of already-signed messages. The validity of signatures in such messages can be limited by always including an expiration time tag in signatures, or by revoking

660-405: A fraudster may send a message claiming to be from sender@example.com , with the goal of convincing the recipient to accept and to read the email—and it is difficult for recipients to establish whether to trust this message. System administrators also have to deal with complaints about malicious email that appears to have originated from their systems, but did not. DKIM provides the ability to sign

SECTION 10

#1732859287590

720-399: A message originally destined to bob@example.com to his new address <bob@example.net> : The example above is adapted from Shevek. With respect to VERP, the local part ( alice ) is moved after her domain name ( example.org ), further adding a prefix ( SRS0 ), a hash ( HHH ), and a timestamp ( TT ). That reflects an operational difference: Eventual bounces back to

780-439: A message, and allows the signer ( author organization) to communicate which email it considers legitimate. It does not directly prevent or disclose abusive behavior. DKIM also provides a process for verifying a signed message. Verifying modules typically act on behalf of the receiver organization, possibly at each hop . All of this is independent of Simple Mail Transfer Protocol (SMTP) routing aspects, in that it operates on

840-443: A multi-hop scenario. If example.net has to forward the message in turn, it can spare adding another timestamp and repeating the original local part ( alice ). That is, each new forwarder adds just its own hash ( HHH ) and the domain name of the preceding forwarder: Using a database can control the growth of rewritten addresses, since it is sufficient to put just a unique key in the rewritten local part. It also allows for

900-418: A non-wanted feature of DKIM, forced by behaviors such as those just described. Indeed, DKIM protocol provides for expiration. There is an optional x tag on each signature, which establishes a formal expiration time; however, verifiers can ignore it. In addition, domain owners can revoke a public key by removing its cryptographic data from the record, thereby preventing signature verification unless someone saved

960-554: A policy that specifies which mechanism (DKIM, SPF, or both) is employed when sending email from that domain; how to check the From: field presented to end users; how the receiver should deal with failures—and a reporting mechanism for actions performed under those policies. The primary advantage of this system for e-mail recipients is in allowing the signing domain to reliably identify a stream of legitimate email, thereby allowing domain-based blacklists and whitelists to be more effective. This

1020-402: A public key periodically or upon a notification of an incident. Effectiveness of the scenario can hardly be limited by filtering outgoing mail, as that implies the ability to detect if a message might potentially be useful to spammers. DKIM currently features two canonicalization algorithms, simple and relaxed , neither of which is MIME -aware. Mail servers can legitimately convert to

1080-461: A subdomain of, the signing domain. The semantics of the AUID are intentionally left undefined, and may be used by the signing domain to establish a more fine-grained sphere of responsibility. Both header and body contribute to the signature. First, the message body is hashed, always from the beginning, possibly truncated to a given length l (which may be zero). Second, selected header fields are hashed, in

1140-542: Is a backup mechanism, it can only work if the bounce message is in a standard format. Historically, all mail transfer agents (MTAs) added their host name to the reverse path . In the Simple Mail Transfer Protocol (SMTP) this reverse path is also known as MAIL FROM , but paths were also used before and outside of SMTP, e.g. as bang paths in UUCP and Usenet (Net-News). All news articles still contain

1200-615: Is a hallmark of digital postmarks, making sending bulk spam more (computationally) expensive. This facet of DKIM may look similar to hashcash , except that the receiver side verification is a negligible amount of work, while a typical hashcash algorithm would require far more work. DKIM's non-repudiation feature prevents senders (such as spammers) from credibly denying having sent an email. It has proven useful to news media sources such as WikiLeaks , which has been able to leverage DKIM body signatures to prove that leaked emails were genuine and not tampered with. Many consider non-repudiation

1260-547: Is a scheme for bypassing the Sender Policy Framework 's (SPF) methods of preventing forged sender addresses. Forging a sender address is also known as email spoofing . In a number of cases, including change of email address and mailing lists, a message transfer agent (MTA) accepts an email message that is not destined to a local mailbox but needs to be forwarded. In such cases, the question arises of who deserves to receive any related bounce message . In general, that

SECTION 20

#1732859287590

1320-413: Is addressed by SPF , and the executive summary is SPF breaks forwarding - actually that's not the case, SPF FAIL only asks receivers to check SPF at their border MTA, not later. Receivers can arrange their forwarding in a way that works with SPF with in essence three strategies: Sender Rewriting Scheme (SRS) is one way for the third strategy. DKIM DomainKeys Identified Mail ( DKIM )

1380-411: Is also likely to make certain kinds of phishing attacks easier to detect. There are some incentives for mail senders to sign outgoing e-mail: DKIM is a method of labeling a message, and it does not itself filter or identify spam. However, widespread use of DKIM can prevent spammers from forging the source address of their messages, a technique they commonly employ today. If spammers are forced to show

1440-654: Is an email authentication system designed to allow an intermediate mail server like a mailing list or forwarding service to sign an email's original authentication results. This allows a receiving service to validate an email when the email's SPF and DKIM records are rendered invalid by an intermediate server's processing. ARC is defined in RFC 8617, published in July 2019, as "Experimental". In October 2012, Wired reported that mathematician Zach Harris detected and demonstrated an email source spoofing vulnerability with short DKIM keys for

1500-475: Is an email authentication method designed to detect forged sender addresses in email ( email spoofing ), a technique often used in phishing and email spam . DKIM allows the receiver to check that an email that claimed to have come from a specific domain was indeed authorized by the owner of that domain. It achieves this by affixing a digital signature , linked to a domain name, to each outgoing email message. The recipient system can verify this by looking up

1560-410: Is either the author, or a person or other entity who administers the forwarding itself. Sending bounces to the author is administratively simpler and used to be accomplished by just keeping the original envelope sender. However, if the author address is subject to a strict SPF policy ( -all ) and the target MTA happens to enforce it, the forwarding transaction can be rejected. As a workaround, it

1620-550: Is just one of the possible tagging schemes; actually, the only one fully specified in the draft. The BATV draft gives a framework that other possible techniques can fit into. Other types of implementations, such as using public key signatures that can be verified by third parties, are mentioned but left undefined. The overall framework is vague/flexible enough that similar systems such as Sender Rewriting Scheme can fit into this framework. Sami Farin proposed an Anti-Bogus Bounce System in 2003 in news.admin.net-abuse.email , which used

1680-561: Is known since RFC 821 and still used today (RFC 5321, as well as RFC 2821, updated the SMTP chapter in RFC 1123). Last but not least forwarding to another address always worked by rewriting the address in the forward path also known as RCPT TO , if and only if the forwarding MTA accepted the responsibility for both forwarding the mail and returning potential bounce messages to the sender. RFC 821 and all later SMTP specifications offer two result codes for this situation: For privacy reasons these result codes are today rarely used; they include

1740-415: Is possible to synthesize a temporary bounce address on the fly that will direct any bounce back to the current MTA. The scheme provides a way to recover the original envelope address so that if a bounce does arrive, it can be forwarded along the reverse path, but this time with an empty envelope sender. While there are other workarounds, SRS is a fairly general one. Its notion of reversing the path resembles

1800-401: Is providing assistance to a direct handler. Signing modules insert one or more DKIM-Signature: header fields, possibly on behalf of the author organization or the originating service provider. The specification allows signers to choose which header fields they sign, but the From: field must always be signed. The resulting header field consists of a list of tag=value parts as in

1860-587: Is transparent to existing e-mail systems that lack DKIM support. This design approach also is compatible with other, related services, such as the S/MIME and OpenPGP content-protection standards. DKIM is compatible with the DNSSEC standard and with SPF . DKIM requires cryptographic checksums to be generated for each message sent through a mail server, which results in computational overhead not otherwise required for e-mail delivery. This additional computational overhead

Bounce Address Tag Validation - Misplaced Pages Continue

1920-431: The forwarded to (251) or not forwarded to (551) address . But the meaning and the effect of forwarding to third parties is identical for result code 250 and error code 550 respectively. As noted RFC 1123 deprecated source routing, that implicitly also deprecated the reverse routing of bounces. It was a relatively small Internet back in 1989, mail admins (postmasters) often knew each other and fixed problems on

1980-724: The google.com corporate domain, as well as several other high-profile domains. He stated that authentication with 384-bit keys can be factored in as little as 24 hours "on my laptop," and 512-bit keys, in about 72 hours with cloud computing resources. Harris found that many organizations sign email with such short keys; he factored them all and notified the organizations of the vulnerability. He states that 768-bit keys could be factored with access to very large amounts of computing power, so he suggests that DKIM signing should use key lengths greater than 1,024. Wired stated that Harris reported, and Google confirmed, that they began using new longer keys soon after his disclosure. According to RFC 6376

2040-401: The originator as indicated in the reverse path after an MTA accepted the responsibility for delivery. However, the bounce message may be suppressed when the original content is hostile (cf. spam or virus mail) or the message is forged (RFC 5321, Section 6). Note that all current forgery detection methods require the mailbox owner to supply information for them to work. Failing to supply

2100-525: The DKIM signature. A possible mitigation is to sign only designated number of bytes of the message body. It is indicated by l tag in DKIM-Signature header. Anything added beyond the specified length of the message body is not taken into account while calculating DKIM signature. This won't work for MIME messages. Another workaround is to whitelist known forwarders; e.g., by SPF . For yet another workaround, it

2160-548: The DNS queries for those keys and filtering out the high number of queries due to e-mail being sent to large mailing lists or malicious queries by bad actors. For a comparison of different methods also addressing this problem see e-mail authentication . As mentioned above, authentication is not the same as abuse prevention. A malicious email user of a reputable domain can compose a bad message and have it DKIM-signed and sent from that domain to any mailbox from where they can retrieve it as

2220-418: The RFC 5322 message—the transported mail's header and body—not the SMTP "envelope" defined in RFC 5321. Hence, DKIM signatures survive basic relaying across multiple message transfer agents . The signing organization can be a direct handler of the message, such as the author, mail submission agent , site, or further intermediary along the transit path, or an indirect handler such as an independent service that

2280-733: The basis for a series of IETF standards-track specifications and support documents which eventually resulted in STD 76 , currently RFC 6376. "Identified Internet Mail" was proposed by Cisco as a signature-based mail authentication standard, while DomainKeys was designed by Yahoo to verify the DNS domain of an e-mail sender and the message integrity . Aspects of DomainKeys, along with parts of Identified Internet Mail, were combined to create DomainKeys Identified Mail (DKIM). Trendsetting providers implementing DKIM include Yahoo , Gmail , AOL and FastMail . Any mail from these organizations should carry

2340-470: The criteria should not make any bounce message classifiable as backscatter , although some people mistakenly think it should. Open relays and forwarders are in an unlucky position with regards to this issue, generally they can't guarantee that the MAIL FROM address indicates the originator , and they also can't guarantee that final delivery will succeed. This SMTP problem caused as side effect of RFC 1123

2400-459: The domain name and the selector to perform a DNS lookup. For example, given the example signature above: the d tag gives the author domain to be verified against, example.net  ; the s tag the selector, brisbane . The string _domainkey is a fixed part of the specification. This gives the TXT resource record to be looked up as: brisbane._domainkey.example.net Note that the selector and

2460-473: The domain name can be UTF-8 in internationalized email. In that case the label must be encoded according to IDNA before lookup. The data returned from the query of this record is also a list of tag-value pairs. It includes the domain's public key , along with other key usage tokens and flags (e.g. from a command line: nslookup -q=TXT brisbane._domainkey.example.net ) as in this example: The available tags are: A CNAME record can also be used to point at

Bounce Address Tag Validation - Misplaced Pages Continue

2520-463: The empty string, is implicitly added to the second hash, albeit its name must not appear in h — if it does, it refers to another, preexisting signature. For both hashes, text is canonicalized according to the relevant c algorithms. The result, after encryption with the signer's private key and encoding using Base64, is b . In addition to the list of header fields listed in h , a list of header fields (including both field name and value) present at

2580-459: The example below: where the tags used are: The most relevant ones are b for the actual digital signature of the contents (headers and body) of the mail message, bh for the body hash (optionally limited to the first l octets of the body), d for the signing domain, and s for the selector. An Agent or User Identifier (AUID) can optionally be included. The format is an email address with an optional local-part. The domain must be equal to, or

2640-404: The filtering on signed mail from those domains, and perhaps filter the remaining mail more aggressively. DKIM can be useful as an anti- phishing technology. Mailers in heavily phished domains can sign their mail to show that it is genuine. Recipients can take the absence of a valid signature on mail from those domains to be an indication that the mail is probably forged. The best way to determine

2700-598: The fly. Routing bounce messages back via any forwarders was a waste of time and bandwidth if the MTA noting a problem (e.g. a rejection with a 5xx error code) could send the error message directly back to the MX of sender. Since RFC 1123. forwarders to third parties still rewrote the RCPT TO address, but kept the MAIL FROM as is. As a side effect, MTAs wishing to accept mail from forwarders generally accept any MAIL FROM address. More than

2760-406: The indicated domain and has not been tampered with in transit. Signature verification failure does not force rejection of the message. Instead, the precise reasons why the authenticity of the message could not be proven should be made available to downstream and upstream processes. Methods for doing so may include sending back an FBL message , or adding an Authentication-Results: header field to

2820-504: The message as described in RFC 7001. DomainKeys was covered by U.S. patent 6,986,049 , now expired. Yahoo! licensed its patent claims under a dual license scheme: the DomainKeys Patent License Agreement v1.2 , or GNU General Public License v2.0 (and no other version) . In essence, both DKIM and SPF provide different measures of email authenticity. DMARC provides the ability for an organisation to publish

2880-494: The message envelope, which holds the return-path and message recipients. Since DKIM does not attempt to protect against mis-addressing, this does not affect its utility. A number of concerns were raised and refuted in 2013 at the time of the standardization. A concern for any cryptographic solution would be message replay abuse, which bypasses techniques that currently limit the level of abuse from larger domains. Replay can be inferred by using per-message public keys, tracking

2940-403: The order given by h . Repeated field names are matched from the bottom of the header upward, which is the order in which Received: fields are inserted in the header. A non-existing field matches the empty string, so that adding a field with that name will break the signature. The DKIM-Signature: field of the signature being created, with bh equal to the computed body hash and b equal to

3000-467: The original routing dispositions for email, see below . Please note: Using SRS protocol fails the SPF Alignment check for your DMARC record, and it's by design. Your DMARC record can still pass with a DKIM check. SRS is a form of variable envelope return path (VERP) inasmuch as it encodes the original envelope sender in the local part of the rewritten address. Consider example.com forwarding

3060-421: The public key data beforehand. DKIM key rotation is often recommended just to minimize the impact of compromised keys. However, in order to definitely disable non-repudiation, expired secret keys can be published, thereby allowing everyone to produce fake signatures, thus voiding the significance of original ones. The RFC itself identifies a number of potential attack vectors. DKIM signatures do not encompass

SECTION 50

#1732859287590

3120-441: The receiver to make an informed decision whether a certain mail is spam or not. For example, using DMARC, eBay and PayPal both publish policies that all of their mail is authenticated, and requesting that any receiving system, such as Gmail , should reject any that is not. Because it is implemented using DNS records and an added RFC 5322 header field, DKIM is compatible with the existing e-mail infrastructure. In particular, it

3180-500: The receiving party must be able to validate signatures with keys ranging from 512 bits to 2048 bits, thus usage of keys shorter than 512 bits might be incompatible and shall be avoided. RFC 6376 also states that signers must use keys of at least 1024 bits for long-lived keys, though long-livingness is not specified there. DKIM resulted in 2004 from merging two similar efforts, "enhanced DomainKeys" from Yahoo and "Identified Internet Mail" from Cisco . This merged specification has been

3240-540: The recipient. The MDA transforms the reverse path into the known Return-Path header field: SMTP uses MX records for its forward routing. Explicit source routes as in... ...to route mail from other.example via MTA news.server.example to MDA destination.example were cumbersome. To make things worse sometimes the new (1982) style of addresses was mixed with old UUCP bang paths in constructs like... ...and various other kludges. SMTP and MX records made all this essentially useless. Therefore, source routing

3300-626: The same basic idea of putting a hard to forge hash in a message's bounce address. In late 2004, Goodman et al. proposed a much more complex "Signed Envelope Sender" that included a hash of the message body and was intended to address a wide variety of forgery threats, including bounces from forged mail. Several months later, Levine and Crocker proposed BATV under its current name and close to its current form. The draft anticipates some problems running BATV. There are also problems that prevent BATV systems from eliminating all backscatter. Sender Rewriting Scheme The Sender Rewriting Scheme (SRS)

3360-682: The sender's public key published in the DNS . A valid signature also guarantees that some parts of the email (possibly including attachments ) have not been modified since the signature was affixed. Usually, DKIM signatures are not visible to end-users, and are affixed or verified by the infrastructure rather than the message's authors and recipients. DKIM is an Internet Standard . It is defined in RFC 6376, dated September 2011, with updates in RFC 8301 and RFC 8463. The need for email validated identification arises because forged addresses and content are otherwise easily created—and widely used in spam , phishing and other email-based fraud. For example,

3420-466: The set of domains that merit this degree of scrutiny remains an open question. DKIM used to have an optional feature called ADSP that lets authors that sign all their mail self-identify, but it was demoted to historic status in November 2013. Instead, DMARC can be used for the same purpose and allows domains to self-publish which techniques (including SPF and DKIM) they employ, which makes it easier for

3480-405: The time of signing may be provided in z . This list need not match the list of headers in h . Algorithms, fields, and body length are meant to be chosen so as to assure unambiguous message identification while still allowing signatures to survive the unavoidable changes which are going to occur in transit. No end-to-end data integrity is implied. A receiving SMTP server wanting to verify uses

3540-608: Was deprecated 1989 in RFC 1123. One special case in RFC 1123 are gateways from or to other networks like UUCP and NetNews, where the first sending MTA cannot reach the final receiver directly with TCP . It is solved by MX records and if necessary rewriting foreign addresses at the gateway. MX is an acronym for Mail eXchanger . Another special case are mailing lists , where the list server rewrites all reverse paths to its own error handling address for bounces (error messages) by recipients. The list server could automatically unsubscribe bouncing recipients. This type of address rewriting

3600-400: Was proposed that forwarders verify the signature, modify the email, and then re-sign the message with a Sender: header. However, this solution has its risk with forwarded third party signed messages received at SMTP receivers supporting the RFC 5617 ADSP protocol. Thus, in practice, the receiving server still has to whitelist known message streams . The Authenticated Received Chain (ARC)

#589410