Instructor: Okay,
so now that we signed up with the service,
in this lecture,
I'm going to show you how to use the SMTP servers
offered by this service in order to send fake emails.
So, first of all,
we're going to go on the Transactional
in here on the top left.
And if you scroll down,
you'll see that we have all of the information that we need
to authenticate with the SMTP servers
offered by this website in order to send the fake emails.
So right now we just need to use a program
in order to authenticate and then send the fake emails.
So in Kali, we're going to use a program called sendemail.
So I'm going to type its name first.
And because this is the first time we're using this program,
it's always a good idea to run the program
with the --help argument,
to see how to use it and all of the available options.
So, scrolling up,
you can see the main usage is sendemail.
We're using the -f argument, and then you set the options.
Now, before doing this, the first thing I want to do
is set the username and the password,
using the -xu and the -xp arguments.
So our command is going to be sendemail -xu
to give the username.
And if we go up, we have the username here,
which is jhnwck70@gmail.com in my case.
So I'm going to copy it and paste it here.
Next, we need to set the password.
We're going to use the -xp to do that.
And again, if we scroll up, we have the password here.
So copy and paste it there.
Next we'll need to specify the server.
So we're going to use the -s option.
And as you can see,
you first give it the server, colon, followed by the port.
An example is this.
So if we go up,
you can see that our server is this one right here.
So again, Control + C to copy it.
And our port is going to be 587.
So, going down,
we're going to do -s to specify the server,
we're going to give it the server that we just copied,
and I'm going to type colon followed by the port.
And as we've seen before, the port is 587,
so I'm going to 587.
So, so far we haven't composed the email yet.
All we're doing
is we're authenticating with the email server.
So this step is very similar to what you do
when you go to gmail.com, for example.
The first thing that you get asked for
is your username and a password,
and on the once you log in, you can start sending emails.
So this is what we're doing right here.
We first log it in with our username, password and server.
And now that we're logged in,
we can go and start composing our email.
Now, the cool thing about this,
this is not an ordinary email client.
We can actually set the from email.
And when the email is delivered,
it's going to appear as if it's sent from the from email
that we pick in here.
Now, from our information gathering stage,
we discovered that our target's email
is zaid@isecur1ty.org.
And we discovered that this target, Zaid,
is linked to another person named Mohammad Askar
and his email is m.askar@isecur1ty.org.
So when picking this from email,
you want to make sure that you pick an existing email,
something that exists,
and you want to make sure that you pick an email
that your target usually receives emails from.
This'll increase the chances
of your target opening the email,
and it will also ensure that the email will be delivered
in the inbox and not in the spam.
So I'm going to set my from email
to m.askar@isecur1ty.org.
Next, we're going to use the -t option
to specify the email that we want to send this email to.
And from our information gathering stage,
we know that the email of our target
is zaid@isecur1ty.org.
Next, we're going to use the -u argument
to specify the title of the email.
So, I'm just going to say, checkout this car.
And then we're gonna use the -m option
to specify the message body.
Now, when specifying the title and the message body,
you want to keep in mind the person you're pretending to be,
the target person, and the relationship between the two.
If you're pretending to be a boss or a colleague,
then you might want to keep these more formal.
But in my case, I'm pretending to be a friend
so I'm going to keep my title and the message casual.
And I'm just going to say,
hey man, check out this car, I'm thinking of buying it.
And then we want to give him a link to download the trojan
that shows a picture of a car that we created before.
So you can upload your trojan to any file sharing service.
I chose to upload it to Dropbox,
and I've already logged into my Dropbox account in here.
If you don't know how to upload stuff to Dropbox,
you simply click on the upload in here,
you select the file,
and then the file will be uploaded in here.
So I'm not going to show you how to do that.
It's very simple,
and there is no point of wasting time on it.
I already have the trojan
that shows a picture of the image right here.
So I'm just gonna click on share to get the link for it,
and I'm going to click on copy link.
Now, let me show you this trick.
If I just go in a new tab and paste my download link,
you'll see that the file
will not be automatically downloaded.
I'll first go to Dropbox
and then the user will have to click on download
to download it.
But if we modify the URL
and just put a one in here instead of the zero,
and now I'm just going to copy it first,
and if I hit Enter,
you'll see it'll automatically download the file
for the user.
And this is exactly what I want.
Therefore, I'm just going to go down now
and paste the file in here.
And that's it.
Now, if we hit enter,
this message will be sent and delivered to the target.
but it's gonna say m.askar@isecur1ty.org in here,
while actual messages that come from this person
display the person's name, as you can see in here.
They will actually say Mohammad Askar.
So I want my fake email
to appear exactly like a real email coming from this person.
Therefore, we're going to need to use an advanced option.
So coming back to the terminal window,
if you look in here, you can see we can use the o argument
to specify advanced options.
And the advanced option that we want to use
is a message header, right here.
So I'm going to copy this.
And in our terminal,
I'm going to do -o to specify an advanced option.
And the advanced option that I want to set
is a message header.
And this message header is going to be the from header.
And I want to set this to the name
that I wanted to appear in here.
So in my case, I wanted to say Mohammad Askar.
Then we're going to put the from email
inside the greater and smaller signs.
So again, the from email in my case
is m.askar@isecur1ty.org.
And that's it, we're done.
Now, before it hitting Enter and send in this message,
I'm going to clear the screen
and I just want to walk you through the command
just to make sure that you understand what we're doing.
So, first of all, we're using a program called sendemail.
This is the email client that we're using
in order to first authenticate with our email server
and then send the email.
Then the command is split into two stages.
The first stage
is where we authenticate with the email server.
Like I said, this is similar to what you do
when you go to Gmail.
First, you have to log in and this is what we're doing here.
We're using the -xu argument to specify the email,
we're using the -xp argument to specify the password,
and -s to specify the server.
So if I go up,
we've got all of this information from the server
that we signed up for, so we got from here.
Now, once we log in and authenticate,
the next stage is to actually send the email,
to compose the message.
So we're using the from argument to specify the from email,
we're using the -t argument to specify the email
we want to send the email to,
we're using -u to specify the title,
-: m to specify the message body.
And finally,
we use an advanced option to set the message header,
and we set the message header
to whatever we want to appear beside the email title
when the email is delivered in the inbox.
So, we're ready to send this. I'm going to hit Enter.
And perfect, as you can see,
it's saying email is sent successfully.
And I'm actually already listening
for incoming connections in here in my multi handler.
So let's go to the target,
and as you can see, we have a new email.
It's coming from Mohammad Askar.
So exactly like a legitimate email coming from this person.
We can see the subject like we set it
and we can see the body.
Now, if we go inside,
again, we have a thumbnail of this person.
It's showing his name,
it's showing his email,
it's showing his picture.
So it looks legit.
It looks like a proper message sent from this person.
Now, this person is a friend of mine
and we tailored the message
so that it appears as if it's coming from a friend.
If I click on the link,
you'll see the file will automatically start downloading.
Dropbox is not asking us
if we actually want to download this.
So I'm going to click okay to download it.
It's going to go in my downloads.
So if we open the downloads,
right click and uncompress this,
we'll have the GTR with the image,
with the proper extension like we've seen before.
And if we double click it,
we'll see the picture of the car
that my friend is trying to buy.
So everything looks legit so far,
but if we go back to the Kali machine,
you'll see that we got a connection from the target,
and we basically gained full access to their computer.
So if we do dir, you'll see all the directories
and basically we can run any system command.
Now, the main thing that you want to keep in mind
when it comes to this method is that this method is generic.
So it works against Windows, Linux, or OSX, Android,
doesn't really matter.
The only thing that you want to make sure
is the file that you're sending to the target
should work on their target operating system.
And I actually cover generating backdoors
and credential harvesters and all this cool stuff
for all operating systems in my social engineering course.
So if you're interested in that,
then check out the bonus lecture,
the last lecture of this course,
because it includes links to all of my other courses,
including the social engineering course.