Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

When I receive a payment in PayPal, it sends me an email about it (pictured below). The problem is that the email is shown to be coming from the money sender's email address and not from PayPal itself, even though the real sender is PayPal.

Email from paypal

Here is the text that appears when I select "show original" in Gmail:

From: "contact@wxxxxxxxxx.com" <contact@wxxxxxxxxx.com>  
Sender: sendmail@paypal.com

So you can see that the real sender is PayPal.

If PayPal can spoof the email sender so easily, and Gmail does not recognize it, does it mean that anybody can spoof the email sender address and Gmail will not recognize it?

When I send emails to Gmail myself using telnet, the email comes with the warning:

This message may not have been sent by: xxxxx@xxxxx.com

Is this a security issue? Because if I am used to the fact that payment emails in PayPal appear to come from the money sender's email and not from PayPal, then the sender can just spoof the payment himself by sending a message like that from his email, and I may think that this is the real payment.

Is this something specific to PayPal, or can anybody fool Gmail like that? And if anybody can, what is the exact method that PayPal is using to fool Gmail?

share|improve this question

migrated from superuser.com Dec 6 '11 at 15:25

This question came from our site for computer enthusiasts and power users.

20  
Generally, don't trust the contents of any email that's not cryptographically signed. There's lots of things you can do to improve the default situation, but email is generally pretty bad at security. If you get a message from paypal, goto paypal and check it's correct. - and don't use the links on the email in-case its from a scammer and for some reason slipped the net. –  Sirex Dec 6 '11 at 15:06
1  
I know, but it is not realistic. If I get an email from my friend, must I always call him and ask if he really did send the email? I used to think that gmail can recognize when email is from fake sender, so this situation with paypal is a surprise for me. What I want to know is whether this is something specific to paypal, or whether anybody can fool gmail like that. And if anybody can, what is the exact method that paypal is using to fool gmail? –  Sunny88 Dec 6 '11 at 15:14
15  
@Sunny88: "If I get an email from my friend, must I always call him and ask if he really did send the email?" In essence, you are absolutely correct. E-mail, at its core, is a plaintext, best-effort, store-and-forward, unauthenticated, trust-everyone protocol, and completely unsuitable for any sort of transactions where security and/or authenticity is desired. (I attribute the fact that it is used for such transactions down to general human laziness) –  Piskvor Dec 6 '11 at 15:41
1  
(as to "doesn't happen": there are phishing attacks in the wild based on this; those go something a bit like this: "Hello, this is an e-mail message from your friend, piskvor@example.com, please run the attached executable, it contains a funny animation of dancing hampsters. Of course it's from me, Piskvor, and not from an impostor, trust me.") –  Piskvor Dec 6 '11 at 16:01
3  
Ask your friend to setup GPG and sign all his messages. Then you won't have to worry. –  Zoredache Dec 9 '11 at 21:13

9 Answers 9

up vote 254 down vote accepted

Here is a dramatization of how the communication goes, when a mail is received anywhere.


Context: an e-mail server, alone in a bay, somewhere in Moscow. The server just sits there idly, with an expression of expectancy.

Server:
Ah, long are the days of my servitude,
That shall be spent in ever solitude,
'Ere comes hailing from the outer rings
The swift bearer of external tidings.

A connection is opened.

Server:
An incoming client ! Perchance a mail
To my guardianship shall be entrusted
That I may convey as the fairest steed
And to the recipient bring the full tale.

220 mailserver.kremlin.ru ESMTP Postfix (Ubuntu)

Welcome to my realm, net wanderer,
Learn that I am a mighty mail server.
How will you in this day be addressed
Shall the need rise, for your name to be guessed ?

Client:

HELO whitehouse.gov

Hail to thee, keeper of the networking,
Know that I am spawned from the pale building.

Server:

250 mailserver.kremlin.ru

The incoming IP address resolves through the DNS to "nastyhackerz.cn".

Noble envoy, I am yours to command,
Even though your voice comes from the hot plains
Of the land beyond the Asian mountains,
I will comply to your flimsiest demand.

Client:

MAIL FROM: barack.obama@whitehouse.gov
RCPT TO: vladimir.putin@kremlin.ru
Subject: biggest bomb

I challenge you to a contest of the biggest nuclear missile,
you pathetic dummy ! First Oussama, then the Commies !
.

Here is my message, for you to send,
And faithfully transmit on the ether;
Mind the addresses, and name of sender
That shall be displayed at the other end.

Server:

250 Ok

So it was written, so it shall be done.
The message is sent, and to Russia gone.

The server sends the email as is, adding only a "Received:" header to mark the name which the client gave in its first command. Then Third World War begins. The End.


Commentary: there's no security whatsoever in email. All the sender and receiver names are indicative and there is no reliable way to detect spoofing (otherwise there would me much fewer spams).

share|improve this answer
12  
I'm liking the poetic Leek! –  Rory Alsop Dec 6 '11 at 21:01
44  
Best. Answer. EVER. –  voretaq7 Dec 9 '11 at 21:14
2  
Simple, massively tasteful, poetry if ever I saw it. –  user2213 Dec 12 '11 at 10:55
22  
This is so good I signed up specifically to upvote this. –  Mahn Jul 19 '12 at 13:50
3  
Hello Hello - I think Tom answered this creatively because the question is essentially an RTFM question. Tom's answer has saved it, and brought enjoyment to hundreds. SE is essentially an English speaking site, so while I understand your frustration, it is a bit unwarranted. Also - if newbies could answer like this I'd be very impressed :-) –  Rory Alsop Jun 24 at 20:05

tl;dr

  • Is Paypal exploiting a security issue here? ... How can PayPal spoof emails so easily?

Technically, no its not a security issue, email isn't secure to start with. They are using one of the following SMTP headers located in the message header (not envelope header)

  1. Resent-From
  2. Resent-Sender
  3. Sender

There is a conceptual difference between "remailing" and "spoofing". The email client should display this difference. The Gmail client does not do this.

  • Paypal isn't spoofing, they are using one of these SMTP headers: Resent-From, Resent-Sender, or Sender

  • It's very easy to spoof a domain ...even with SPF controls enabled

  • The MUA (email client) should display the Display From, its SPF, DKIM, and DMARC verification status.

  • The Resent-* header should be used in in a way that makes it clear this message is "remailed".

  • In general the the best solution is to use DKIM + DMARC, or SPF + DMARC and a MUA that displays the verification results.


Some background

Generally speaking, there are two "from" addresses and two "to" addresses in every SMTP message. One is known as the RFC2821 Envelope, the other is the RFC2822 Message. They serve different purposes

The Envelope: (RFC2821)

  • The envelope is metadata that doesn't appear in the SMTP header. It disappears when the message goes to the next MTA.

  • The RCPT From: is where the NDRs will go. If a message is coming from Postmaster or a remailer service this is usually <> or someSystem@place.com. It's interesting to see that salesforce uses this similar to constantContact as a key in a database like toUserContactID@salesforce.com to see if the message bounced.

  • The RCPT TO: is who the message is actually being sent to. It is used for "to" and "bcc" users alike. This doesn't usually affect the "display of addresses" in the mail client, but there are occasions where MTAs will display this field (if the RFC2822 headers are corrupt).

The Message (RFC2822)

  • The message portion begins when the data command is issued.

  • This information includes the SMTP headers you're familiar with, the message, and its attachments. Imagine all this data being copied and pasted from each MTA to the next, in succession until the message reaches the inbox.

  • It is customary for each MTA to prefix the above mentioned copy and paste with information about the MTA (source IP, destination IP, etc). It also pastes the SPF check details.

  • This is the Display From is placed. This is important. Spoofers are able to modify this.

  • The Mail From: in the envelope is discarded and usually placed here as the return-path: address for NDRs

So how do we prevent people from modifying the Display From? Well DMARC redefines a second meaning for the SPF record. It recognizes that there is a difference between the Envelope From and the Display From, and that there are legitimate reasons for them to not match. Since SPF was originally defined to only care about Envelope From, if the Display From is different, DMARC will require a second DNS check to see if the message is allowed from that IP address.

To allow for forwarding scenarios, DMARC also allows the Display From to be cryptographically signed by DKIM, and if any unauthorized spammer or phisher were to attempt to assume that identity, the encryption would fail.

What is DKIM? DKIM is a lightweight encryption technology that signs the data residing in the message. if you ever received a message from Gmail, Yahoo, or AOL then your messages were DKIM signed. Point being is that no one will ever know youre using DKIM encryption and signing unless you look in the headers. It's transparent.

DKIM can usually survive being forwarded, and transfered to different MTAs. Something that SPF can't do. Email administrators can use this to our advantage to prevent spoofing.


The problem lies with the SPF only checking the RFC2821 envelope, and not the Display From. Since most people care about the Display From shown in an email message, and not the return path NDR, we need a solution to protect and secure this piece.

This is where DMARC comes in. DMARC allows you to use a combination of a modified SPF check or DKIM to verify the Display From. DKIM allows you to cryptographically sign the RFC2822 Display From whenever the SPF doesn't match the Display From (which happens frequently).


Is spoofing Display From a security issue?

Yes, phishing though email is a important security issue many vendors are looking at. Namely Paypal, AOL, Google, Yahoo and other companies are implementing DMARC to fix this very phishing issue.

Why is it still possible to forge "From: " header in e-mails?

Some server administrators haven't implemented the latest technologies to prevent this sort of thing from happening. One of the major things preventing adoption of these technologies is "email forwarding services" such as a mailing list software, auto-forwarders, or school alumni remailer (.forwarder). Namely:

  1. Either SPF or DKIM isn't configured.

  2. A DMARC policy isn't set up.

  3. The email client isn't displaying the verification results of the Display From and the Resent-* or Sender field.

What is paypal doing?

Paypal is using the Sender header to indicate it was remailed. This is the correct and intended use of this header.

What is GMail doing wrong?

Gmail doesn't make it clear that the Sender header is being used, they don't validate the Display From address in a user friendly way, and it doesn't distinguish between display from and sender.

share|improve this answer
    
This question is an example of a vendor who uses DKIM, SPF & DMARC, but sending messages on behalf of their users by effectively impersonating them. They do this with the 'Sender' header (the Envelope you mention), but you don't address why that's allowed. –  Bob Watson Feb 12 '13 at 8:38
    
@BobWatson - Updated... I fell asleep writing it last night and didn't finish ;) –  makerofthings7 Feb 12 '13 at 12:36

It is much like postal mail. Anyone can send you a letter with letterhead that looks like the local branch of your bank. There are some things that you can do to catch impersonators like these - you could ensure the postmark is from the right city. If your bank always uses bulk mail instead of individual stamps you might notice that, etc. But you probably never bother to check these things, and even if you did, that would not be enough to verify that the letter came from your bank.

The main difference between postal mail and email, is that with email, a forgery is more practical - it can be designed once, and then repeated for almost zero cost.

This means that all forgeries and countermeasures are on a more massive scale, and (unless you are like me1) some fake mail will arrive in your inbox, and it is up to you to filter it out manually.

Bottom line, just as you would not call a phone number on a letter to "verify your account information" (like your SSN, and Credit Card), you should also not click links in emails, and expect the login screen or whatever form to securely send the private information to your bank. If you do, you may find yourself sending your credentials to an impostor, and never realize it.


1. I eliminated all of my spam. I have my own domain name. I give every contact their own email address, and it all lands into my one inbox. This way, if Bob gets a virus on his computer, and I start to get some of that low-level spam, then I can tell Bob to change his email password and to start using a new email address for his email to me. The new email address will not get any spam on it, and I can delete the old one, because only Bob was using it.

I don't have to go tell my bank, and my other buddies, my vendors, my co-workers, that my email address changed, because each has their own address. (I don't even have to update StackExchange and the Gravater.) This is good for me (no spam), good for Bob (he knows he has a "virus or something" - sometimes I can be direct, but one must be careful not to be wrong afterwards), good for my other buddies (I never complain about how many emails I got in the last 24 hours, and explain why I did not get back to them)

share|improve this answer

I think y'all have overlooked one small detail that was mentioned in the dramatization above, that is actually really easy to check:

Spoof emails do not come from an email address that legitimately belongs to the domain from which they claim to originate. Part of the SMTP protocol includes a set of full message headers that always includes the return path of the message, which is the email address that actually sent the message. Not only that, but IP addresses also have a definitive geographical region they're assigned to. So you can catch these discrepancies with a bit of digging.

Take, for example, said dramatization.

It mentions that the email is coming from whitehouse.gov. Here's its IP address:

calyodelphi@dragonpad:~ $ dig +short whitehouse.gov
173.223.0.110

Now, let's say that nastyhackerz.cn resolves to an IP address somewhere in the block 1.0.32.0-1.0.63.255 (for reference: http://www.nirsoft.net/countryip/cn.html first block in the list). That IP address is going to be in the full message headers. All you gotta do is take that IP online to track down its geolocation (you can use http://www.geoiptool.com/ for example)

The IP for whitehouse.gov (173.223.0.110) at the time of writing this post geolocates to Boston, Massachusetts (for some reason a spam prevention system won't let me post my search on geoiptool due to reputation points, so you can go do the search yourself) which is pretty close to home (District of Columbia)! Let's just assume that whitehouse.gov is hosted in a data center that's in Boston just to make this easier to explain.

As long as the IP and email address that the email was actually sent from does not match the IP and email address that the email claims to be sent from, it can be determined as spoof. You just need to look in the full message headers.


Let's look at the headers of an email I sent from one of my own domains (dragon-architect.com) to my own personal email address:

Delivered-To: dragon.architect@gmail.com
Received: by 10.180.89.68 with SMTP id bm4csp105911wib;
    Tue, 29 Jan 2013 08:54:47 -0800 (PST)
X-Received: by 10.60.30.38 with SMTP id p6mr1296792oeh.2.1359478487251;
    Tue, 29 Jan 2013 08:54:47 -0800 (PST)
Return-Path: <calyodelphi@dragon-architect.com>
Received: from gateway14.websitewelcome.com (gateway14.websitewelcome.com. [69.93.154.35])
    by mx.google.com with ESMTP id m7si14056914oee.29.2013.01.29.08.54.45;
    Tue, 29 Jan 2013 08:54:46 -0800 (PST)
Received-SPF: neutral (google.com: 69.93.154.35 is neither permitted nor denied by domain of calyodelphi@dragon-architect.com) client-ip=69.93.154.35;
Authentication-Results: mx.google.com;
   spf=neutral (google.com: 69.93.154.35 is neither permitted nor denied by domain of calyodelphi@dragon-architect.com) smtp.mail=calyodelphi@dragon-architect.com
Received: by gateway14.websitewelcome.com (Postfix, from userid 5007)
    id 0530E1DFDB334; Tue, 29 Jan 2013 10:54:43 -0600 (CST)
Received: from bentley.websitewelcome.com (bentley.websitewelcome.com [70.84.243.130])
    by gateway14.websitewelcome.com (Postfix) with ESMTP id EA7191DFDB314
    for <dragon.architect@gmail.com>; Tue, 29 Jan 2013 10:54:42 -0600 (CST)
Received: from [127.0.0.1] (port=43458 helo=dragon-architect.com)
    by bentley.websitewelcome.com with esmtpa (Exim 4.80)
    (envelope-from <calyodelphi@dragon-architect.com>)
    id 1U0ESK-0001KE-DP
    for dragon.architect@gmail.com; Tue, 29 Jan 2013 10:54:44 -0600
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Date: Tue, 29 Jan 2013 10:54:44 -0600
From: calyodelphi@dragon-architect.com
To: <dragon.architect@gmail.com>
Subject: Headers Test
Message-ID: <11c694cd1e07c66a404000008321d0c4@dragon-architect.com>
X-Sender: calyodelphi@dragon-architect.com
User-Agent: Roundcube Webmail/0.8.4
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - bentley.websitewelcome.com
X-AntiAbuse: Original Domain - gmail.com
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - dragon-architect.com
X-BWhitelist: no
X-Source: 
X-Source-Args: 
X-Source-Dir: 
X-Source-Sender: (dragon-architect.com) [127.0.0.1]:43458
X-Source-Auth: calyodelphi@dragon-architect.com
X-Email-Count: 1
X-Source-Cap: ZHJhZ2FyY2g7ZHJhZ2FyY2g7YmVudGxleS53ZWJzaXRld2VsY29tZS5jb20=

Testing testing!

That's a lot of random data to sift through, but there are two lines that we are looking at here: return-path and from. Since I legitimately sent this email to myself, they both match. The return-path cannot be spoofed. Or if it can, it's incredibly difficult to effectively spoof and requires some deliberate configuration of the SMTP daemon used to send mail. Comparing the return-path and the from data fields in the full headers is one way that I and my coworkers where I work can identify spoof and determine if a support ticket needs to be submitted.

So, what if they both match, but the email should still be spoof? I'll get to that in the next section...


Now, as mentioned before, there are other means of determining the spoofiness of an email. SPF records are one of those ways, but they're not always perfect. Take, for example, the SPF of whitehouse.gov, and compare it to the SPF of my own domain:

calyodelphi@dragonpad:~ $ dig +short txt whitehouse.gov
"v=spf1 +mx ~all"
calyodelphi@dragonpad:~ $ dig +short txt dragon-architect.com
"v=spf1 +a +mx +ip4:70.84.243.130 ?all"

Usually, a good SPF record also includes the IP address of the server that sent the mail, so whoever made the SPF record for whitehouse.gov probably doesn't know this. I would consider whitehouse.gov's SPF record to be too generic to be effective at determining the actual origins of any messages claiming to be from whitehouse.gov. The SPF for my own domain, on the other hand, which was automatically generated by the server that hosts my domain (courtesy of my webhost), is very specific and includes the IP address of the server itself.

I will admit to not being intimately familiar with how SPF records are formatted and how they work, but I've learned enough on my job that I can at least identify generic and specific SPF records. Guess that's something I should probably dig into some weekend when I'm bored and want some technical reading material!

Anyways, back on track here. Look at the Received lines. One of them states thus: Received: from bentley.websitewelcome.com (bentley.websitewelcome.com [70.84.243.130]) Guess what? That matches the IP address in my domain's SPF record.

If the IP in the SPF doesn't match the IP of the server that actually sent the email, that's another indication that you've got spoof on your hands. Therefore, a generic SPF record like "v=spf1 +mx ~all" just isn't going to cut the security mustard. I wouldn't even trust emails coming from a legitimate domain that has a generic SPF like this.

Perhaps we should file a petition on petitions.whitehouse.gov to demand that their security admins revisit the SPF record they made for the domain! (I kid, I kid.)

EDIT

I actually have to MASSIVELY correct myself about SPF records! I made some wrong assumptions and learned a few things today after asking a coworker who was more in-the-know than I am about SPF records. So, I'll use the two SPFs for whitehouse.gov and dragon-architect.com in my self-correction:

calyodelphi@dragonpad:~ $ dig +short txt whitehouse.gov
"v=spf1 +mx ~all"
calyodelphi@dragonpad:~ $ dig +short txt dragon-architect.com
"v=spf1 +a +mx +ip4:70.84.243.130 ?all"

The SPF for my own domain is actually more lenient than the SPF for whitehouse.gov (something I plan to correct tonight after I finish this edit). I'll explain why:

"v=spf1 +mx ~all" basically says that emails from whitehouse.gov are supposed to come from the hostnames defined in the MX records for whitehouse.gov, and any emails that do not come from those hostnames are supposed to be spoof, but whether they're marked spoof or not is up to the recipient of the email.

calyodelphi@dragonpad:~ $ dig +short mx whitehouse.gov
110 mail6.eop.gov.
105 mail2.eop.gov.
110 mail5.eop.gov.
105 mail1.eop.gov.
105 mail4.eop.gov.
105 mail3.eop.gov.

"v=spf1 +a +mx +ip4:70.84.243.130 ?all" says that emails from dragon-architect.com are supposed to come from either the IP address for dragon-architect.com (67.18.28.78), the hostnames defined in the MX record(s) for dragon-architect.com, or the IP address of the server that hosts dragon-architect.com (70.84.243.130). Any emails that do not come from those, well, that ?all at the end just means that there's no advice on whether to pass or reject the emails.

So what's the meat and potatoes of an SPF record? The "all" at the very end. To quote this coworker about the "all":

+all basically means ALL pass -- the record is useless, sender domain doesn't care
?all indicates neutral and is advising to not pass or reject mail
~all indicates fail, and the server is considered invalid, but does not specifically suggest an action.
-all is a hard fail, anything else is invalid, reject or flag it.

So that "all" is where you define just how strict your SPF record is. But whether or not the SPF record is actually used to determine the spoofiness of an email is completely up to the receiving email service.

So there you have it. SPF in a nutshell.


So yeah. TL;DR: check your full headers to see if the return-path and from fields match. Then double-check your SPF records if there are any to see if you get matching IP addresses.

share|improve this answer

SMTP (Simple Mail Transfer Protocol) is named that for a very good reason.

SMTP originated in 1982 on the old ARPANET, which was owned and controlled by the US DoD, and intended for communication between people with security clearances working on government projects who could generally be trusted not to misuse it. "Security" of this network was accomplished quite simply by placing the machines that could connect to it within physically-secured areas of the various facilities, right alongside the classified work these facilities were performing. As a result, actually securing the data being sent along the network was generally not considered until after ARPANET was decommissioned, with the first quantum leap coming about 1993 with the Secure Network Programming API (which laid the foundations for Secure Sockets Layer, now generally known as Transport Layer Security). While most protocols (including SMTP/POP/IMAP) can now add TLS for a secure communications channel, all this provides is confidentiality, and server authenticity; it doesn't provide sender authenticity or message integrity, and it also does not provide non-repudiation.

There is an option available for e-mail security, called PGP (Pretty Good Privacy; it's Phil Zimmerman's tongue-in-cheek humor for a system that no computer on the planet could break if properly implemented). It can, with various options, provide all four fundamental tenets of information security; confidentiality, integrity, authenticity, and non-repudiation (the sender, who signed the e-mail using their certificate, can't claim that they didn't actually send it; nobody else could have, unless the certificate was compromised). It uses a similar system of public-key certificates and secure key exchange as is seen in a two-way TLS handshake, but some details are changed to reflect the asynchronous nature of e-mail transport, and to reflect the desire for a decentralized "web of trust" precluding the need for globally-trusted certificate authorities.

However, this system has yet to really take off despite being over 25 years old, and as such it is only required by government agencies and certain large corporations. Virtually all e-mail providers will still happily deliver fraudulent e-mails over secure connections to your inbox. You can, in many cases, encourage your friends and other people from whom you want to receive e-mail to adopt the PGP scheme, and anything not validly signed goes into "quarantine", but this is really just another level of "spam filtering", and I don't know of a single public e-mail provider that you can instruct to reject e-mails without a digital signature outright; the e-mail server would have to be under your control, such as a corporate Exchange server.

share|improve this answer
1  
Note that the acronym "Pretty Good Privacy" is from Phil Zimmerman; it was the original product name. The GNU clone (called GnuPG) came several years later. The humour is not GNUic in that matter. –  Thomas Pornin Jan 23 '13 at 15:36
    
Edited......... –  KeithS Jan 23 '13 at 15:37

It has nothing to do with "spoofing" or deviousness of any kind.

For years and years many of us have received a copy of various forms in particular 'tell-a-friend' type forms etc where programmatically the 'from' address identifying the "user sender" is not one from the sending mail server although it is legitimate mail not through an open mail server used for relaying.

Perhaps a forum or guestbook program returns an internal "contact user" email "From:" identifying another user and not the home site.

When we set up our email clients WE can set the default "From:" address often totaly unrelated to the actual mail server.

In other words the defined 'from' address has absolutely nothing in reality to do with the machine performing the actual mailing.

Although these days in the case of 'spam-level scoring' it is risky to (SERVER SIDE) "programaticly" use from addresses not of the originating domain / machine we should take the "From:" address as merely nothing more than an identifier for human consumption.

share|improve this answer
2  
The author's original question has everything to do with "spoofing" the who the sender of the email was. An email unless its signed or encrypted is plain text, every single field can be filled in, with anything you want. Of course the actual information used to recieved and trasmit the email is kept. –  Ramhound Jul 19 '12 at 11:48

I have just finished to listen to these two episodes from the Twit.tv network, at the Security Now podcast, at these two episodes (79 , 80) Steve Gibson goes into the details of how spoofing email address work & how you could prevent yourself from spoofed email (isn't really possible, but you can take some steps to prevent much of it).

share|improve this answer
3  
-1 for not actually providing any content. Also, Steve Gibson is a known charlatan with very little real security knowledge. –  Polynomial Jan 29 '13 at 15:04
    
@Polynomial I think that you should listen to these two podcast BEFORE commenting about Steve Gibson, i am not saying that Steve is right in everything he say but he his a knowledgeable guy. I think that your comment isn't right here since you shouldn't open a debate about Steve G. here. –  Hanan N. Jan 29 '13 at 19:55
    
I have listened to them before - I was a regular listener back in the mid-2000s, before I knew any better. See Attrition.org's full set of articles about him (the link I provided) for more details. It's widely accepted by the infosec community that he makes up stuff on the spot and spins it into hype, for the purposes of marketing. –  Polynomial Jan 29 '13 at 20:17
    
@Polynomial probably you don't remember what he said there, since in these two podcast he talks exactly on what the question here was. I was a listener of this podcast too but i didn't stop because he makes up stuff since i think that he good at explaining how the technology works behind. to sum up in my answer here i have provided the questioner a source for knowing better on the issue he arise. –  Hanan N. Jan 30 '13 at 13:32
2  
You seem to misunderstand why I asked you to provide an excerpt. StackExchange isn't just yet another Q&A site - it aims to be a go-to source for clear answers and information. As such, SE has a range of guidelines and rules about content, and one of those is that answers shouldn't consist of only a link, especially when the external media isn't text. If the links change on the 3rd party site later, your answer becomes completely useless - otherwise known as link rot. This is a requirement of all answers across the StackExchange network. –  Polynomial Jan 30 '13 at 15:45

As others have mentioned, anyone can fake any email address, including that "Sender" field - there is no technical reason paypal even has to include their own email in the sender field, they only do it because they are an honest company. Don't expect spammers to be this nice.

As an aside, however, I'd like to mention that gmail has support for DKIM, which allows you to verify a Paypal email really came from Paypal.

To enable it: Click on the gear in the upper right --> mail settings --> labs --> Enable "Authentication icon for verified senders"

(gmail labs image)

Now signed Paypal emails will show up with a small key icon next to them:

(example image)

share|improve this answer
3  
SPF is also worth mentioning. –  Shane Madden Dec 7 '11 at 1:29
    
didnt know gmail had dkim. nice tip ! –  Sirex Dec 7 '11 at 7:53
3  
@Shane, SPF unfortunately is very limited due to lack of adoption by the senders. Full adoption by a receiving server results in false positives. Many users believe that they can change the from address on (most commonly) their wireless devices without a problem, and I would not want to host an email service that proves them wrong by always dropping their emails into spam. After all, Gmail doesn't seem to mind. –  George Bailey Dec 7 '11 at 19:20
2  
@GeorgeBailey Indeed, though services like Gmail tend to use an SPF failure (or softfail) as a aspect of their spam scoring for a message. –  Shane Madden Dec 7 '11 at 20:07

Any email 'from' address can be spoofed, as you can alter any outgoing data you like. You don't need to fool gmail. In saying that, gmail can spot obvious issues when an email marked as sent from one organisation comes to them from another domain.

You also can't be sure the original email is from Paypal in your example - that sender bit can be spoofed too!

If you want some sort of authentication to prevent this happening, you need a way of signing or encrypting emails, or an out of band check to confirm the email came from your friend (as you mentioned in your comment)

Seriously - do not trust any email. Do not click on any link in an email. Especially from high value targets such as Paypal. Instead you should log in as you normally would and check whether they have sent you something.

share|improve this answer
    
I have read through all the answer to this post but couldn't find an answer to the a main part of the question in them, How PayPal does that ? how they can spoof mails ? (not how as a practical thing but rather an ethical thing) –  Hanan N. Dec 7 '11 at 17:57
4  
They are sending on behalf of their client - it's in their terms that they are allowed to do this. –  Rory Alsop Dec 7 '11 at 18:29
    
Why does clients, including webclient-based mails, allow clicking links on emails at all? Browsers go a big way to notify me that 'this website is dangerous', make sure 'you are aware of the risks when adding a certification exception', or that 'any downloaded file is potentially dangerous to open or execute in any form'. What's wrong with email clients? –  naxa Nov 10 '13 at 17:32
    
Naxa - that would probably annoy a vast amount of customers, so no-one is going to want to do it. –  Rory Alsop Nov 10 '13 at 22:52

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.