home *** CD-ROM | disk | FTP | other *** search
/ The Hacker's Encyclopedia 1998 / hackers_encyclopedia.iso / hacking / internet / fakemail.faq < prev    next >
Encoding:
Text File  |  2003-06-11  |  6.9 KB  |  163 lines

  1.  
  2. T H E  "F A K E  M A I L"  F A Q 
  3. Version 0.2 950309
  4. Written by Rourke McNamara
  5. (rourkem@pobox.com)
  6.  
  7. A good number of people have asked me questions about how possible it is
  8. to "Fake
  9. Mail" on the internet. People have asked both becuase they wanted to know if
  10. someone could do to them or becuase they wanted to do it to someone else. I
  11. decided that I'd write a small FAQ on the subject and add to it as I have time.
  12.  
  13.  
  14. (1) Can people send "fake" mail on the Internet?
  15.  
  16. Yes. People can send mail that looks like it came from someone else. People can
  17. send mail that looks like it was received by more people than actually received
  18. it. HOWEVER, only very rarely is this mail truly indistinguishable from
  19. mail that
  20. really DID come from the person in question.
  21.  
  22. In any case the ONLY real way to be completely sure a message is from a
  23. particular person is to have that person digitally "sign" the message with
  24. something like PGP.
  25.  
  26.  
  27. (2) How do you know if a message you have is "fake"?
  28.  
  29. You can't always tell for sure. If the person was sloppy the message will have a
  30. line in the the header block (the text above the message with date and subject,
  31. etc information) that says something like "Apparently-To:". You can also compare
  32. the full headers of the message to the full set of headers on another message
  33. that you have received from that person. If they don't come close to matching
  34. then ONE OF THEM is probably "fake". Also look for computer names in the headers
  35. that have nothing to do with your information provider or his information
  36. provider.
  37.  
  38. In order to be better able to spot fake mail you need to understand how it is
  39. sent. To do that see the section on sending fake mail below.
  40.  
  41. The above don't always work. If the person sending the "fake" message is
  42. particularly crafty he can make the headers look so similar it is nearly
  43. impossible to catch. In this case you would have to ask the person who
  44. 'sent' you
  45. the message whether or not it was really him.
  46.  
  47.  
  48. (3) Why is it possible to "fake" mail?
  49.  
  50. It is possible to fake mail becuase all computer on the internet send mail
  51. around
  52. using something called SMTP - Simple Mail Transfer Protocal - and it is possible
  53. for a human to connect to a computer and pretend that it is another computer by
  54. speaking SMTP. This problem will not go away. Mail programs (both clients and
  55. SendMail servers) will probably learn to better recognize when someone is trying
  56. to send fake mail, but they will most likely never be able to detect EVERYTHING.
  57.  
  58.  
  59. (4) How can I "fake" mail?
  60.  
  61. That is perhaps the question that is hardest to answer and will take the
  62. longest,
  63. so I will start with the basic and most detectable technique and work up to the
  64. most complicated and hard to detect technique. Of course, faking mail
  65. REALLY well
  66. is not such an easy and mechanical process. It requirs some amount of creativity
  67. in the techniques you apply. So, lets start with the basics....
  68.  
  69. (a) The Basics
  70.  
  71. To send fake mail you need to pretend that you are a computer transfering mail
  72. legitimatly. You start by telnetting to the SMTP socket (25) on the remote
  73. computer. For example, if I wanted to telnet to Cornell's SMTP port I would type
  74. the following from a UNIX prompt: 
  75. -> telnet cornell.edu 25
  76.  
  77. Once you have connected you ussually have to issue a "helo" command. You
  78. basically are saying hello to the other computer an telling it who you are. For
  79. now lets just claim to be the computer that we are sending mail "from". For this
  80. example lets pretend to be rf34+@andrew.cmu.edu. Lets send this message to
  81. "jmk17@cornell.edu" (he loves getting junk mail): 
  82. < helo andrew.cmu.edu
  83.  
  84. Sometimes there is an error entering that command. Enter it again and it will
  85. work. After that we have to move on to starting the message and annoucing who it
  86. is from. We do this with the "mail" command. The syntax is "mail from:
  87. <noone@nowhere.com>" where the <>'s are optional on most systems. In out example
  88. we would type: 
  89. < mail from: rf34+@andrew.cmu.edu
  90.  
  91. After specifying who the mail it from we must specify who the mail is to. We do
  92. this by using the "rcpt" command. The syntax of this command is "rcpt to:
  93. <bob@nowhere.com>" where the <>'s are once again optional. This has
  94. nothing to do
  95. with who it APPEARS to get the message. The addresses specified with this
  96. command
  97. will actually receive the message. In our example we would issue the
  98. command like
  99. so: 
  100. < rcpt to: jmk17@cornell.edu
  101.  
  102. Next comes the actual message. You send specify the text of the message is to
  103. follow by using the "data" command to begin and end with a "." on a line by
  104. itself. In our example we would do the following: 
  105. < data 
  106. > (answerback garbage) 
  107. < You suck. I hate you. 
  108. < .
  109.  
  110. Now we're almost done. All we have to do now is quit. We do this by typing
  111. "quit". 
  112. < quit
  113.  
  114. (b) What about the headers?
  115.  
  116. The above message will be easy to spot as "fake". Instead of saying "To:
  117. jmk17@cornell.edu" it will say "Apparently To: jmk17@cornell.edu". Similar will
  118. happen with from and there will be no subject. To fix these problems we must
  119. manually enter headers for the message. Here I will just talk about the most
  120. important headers - To:, From:, Cc:, and Subject:.
  121.  
  122. The "To:" header will be who the recipient sees that the message is "To:".
  123. If the
  124. recipient "group replies" he will reply to all people listed after "To:" and
  125. "Cc:" other than himself.
  126.  
  127. The "From:" header specifies who the message is from. You should always have the
  128. address that you used in the "mail from:" command somewhere here. It looks more
  129. real if you include the persons real name when issuing this command. One way to
  130. do that is to have the email address and then the real name in parenthesis.
  131.  
  132. The "Subject:" line is what appears to the recipient as the subject. End of
  133. story.
  134.  
  135. You enter the header when entering the message. Lets alter our above example so
  136. that we want it to look like bob@nowhere.net gets a carbon copy. We don't want
  137. him to get a copy - we just want jmk17@cornell.edu to think so. All we would do
  138. is change the second to last step so it looks like this: 
  139. < data 
  140. > (answerback garbage) 
  141. < To: jmk17@cornell.edu 
  142. < From: rf34+@andrew.cmu.edu (Randy Fields) 
  143. < Subject: I hate you! 
  144. < Cc: bob@nowhere.net 
  145. < You suck. I hate you. 
  146. < .
  147.  
  148. Note the space between the headers and the message. That is very important.
  149.  
  150. Now when jmk17@cornell.edu gets our message it will look like a normal message
  151. from his friend Randy. If he had extensive knowledge regarding the way mail
  152. worked he's be able to figure out that it came from your computer and not
  153. andrew.cmu.edu by looking at the extended headers. Since jmk17@cornell.edu is
  154. just your average computer user he can look at the message all day and not see a
  155. problem with it.
  156.  
  157.  
  158. -=-=-=-=-=-=-=-=-=-=-=- 
  159. This FAQ will be updated periodically. It can be found on Rourke's Home Page at 
  160. URL http://matrix.resnet.upenn.edu/rourke/ _or_
  161. http://www.seas.upenn.edu/~rourkem
  162.