Saturday, February 27, 2010

DIY: Spoof Email

We learned a pretty cool little hack today in class that I thought might be some fun to play around with.
Just a reminder:

1)this tutorial is meant for use in a safe and legal training environment only.
2)It is meant for educational purposes only. The site is no way responsible for any misuse of the information.
3) And most important, Performing hack attempts (without permission) on computers that you do not own is illegal!










Okay, now for the fun stuff.  The first thing you'll need is a smtp mail server.  In my example, I used my schools mail server, smtp.pacific.edu, on port 25.  another choice would be to use your ISP's mail server, comcast works well for example.  Here is a list of other mail servers.  You'll just need to find the port number. Now open up a terminal and try out these commands!

C: - what you should type into your command prompt
S: - is the response you should get from the command prompt
// - any comments that I want to add. DO NOT type these into the command prompt

C: telnet smtp.pacific.edu 25  //25 is the port number for outgoing mail
S: 220 smtp.example.com ESMTP Postfix
C: HELO smtp.pacific.edu  
S: 250 Hello smtp.pacific.edu, I am glad to meet you
C: MAIL FROM:  //the address you are actually sending from
S: 250 Ok
C: RCPT TO: //the address you are actually sending to
S: 250 Ok
C: DATA
S: 354 End data with .
C: From: "Bob Example"  //address that the mail shows up from
C: To: Alice Example     //address that the mail shows up to
C: Cc: theboss@example.com
C: Date: Tue, 15 Jan 2008 16:02:43 -0500
C: Subject: Test message
C:
C: Hello Alice.
C: This is a test message with 5 header fields and 4 lines in the message body.
C: Your friend,
C: Bob
C: .           //the . Ends the data and sends the mail
S: 250 Ok: queued as 12345
C: QUIT
S: 221 Bye
{The server closes the connection}

-Some last tips, you need to be on the same network as your mail server.  For example I would need to be on my campus network in order to use smtp.pacific.edu. You can also use something like putty to get remote access to a network.
-Try sending yourself mail from the future you!

1 comment: