Welcome to this Lexus so we have done this.
Come on or we just made this payload in the previous lecture.
Well we are going to this Gabe all the directories of the current location and we just saw in that particular
cell.
But in this lecture you can see that this is not the perfect payload.
So what we are just doing is we just basically give the information back to the client so we don't get
is is this information is a hacker.
Because this client Muhsin is not in the ss of the server.
So this is basically out of the excesses of the hacker.
So now in order to get back to this information communicated to the server or communicate it to the
hacker you have to send this information to somewhere.
So in this case we are not going to this connect to the server.
Instead we have this going to make a G.M. communication are basically communication with the e-mail
server.
So let's do that.
So before that you can see this is the command that is going into this list out all the directory and
this is not effective command because we don't have any critical information that can be gathered with
this desire command.
So next thing what you need to do is list some other command that is going to give us more information
than this desire command.
So I'm going to use this net assets as a command.
And what this does is it will just get you all information of the profiles that your communication is
happening.
On in this case.
You can see I'm just communicating with this network that is this with this name.
So it will just give all the profile that this claim computer has ever connected to.
So basically we're just getting the interfaces of the Wi-Fi connection from this command.
So what I'm going to do is so and I'll just say so before that so we have to get the blue line because
this is going to be the Wi-Fi network and we're just targeting to the Wi-Fi network.
So I'm just saying that so all the profile of that Wi-Fi network that this client is connected to.
So it'll give you the information that is saying that this is the user profile that has been connected
so disclaimed Amazon has connected to at least these two profiles.
So now let's let's copy this one and let's see the output or basically let's see the key of this profile
are basically we want to see the password of these Wi-Fi network.
So in order to do that the command will be the same as before.
But now we have to add the profile in this case the profile will be cut literally which is you can see
over here and we'll just say key So be clear in order to see the key of this profile.
So let's hit enter and let's see the password over here which is the scene here.
That is the key content saying it is the key content.
Now we can just get this critical information.
And now with this information you can send this information to the server or in this case we're going
to send this to the e-mail.
So let's configure that before.
So all you need to do is simply write that command over here.
So instead of desire now we want to execute this command which is net assets w Lan So and profile which
is referring to maybe.
So this is my command and the key should be clear.
So now we have this executed.
So let's go back again and let's see if this pillar works again or not.
So I'll just go over here list navigate to the missing.
That is the payload location.
And in this way we can use it on the Python code that is with this python cured and malware dot below
you could see our bailout is working perfectly.
It has shown us all the information of the SSD.
It is connected with and the information about the password over here.
So now what do you need to do.
It will just copy all of this information and we'll just send this information to the server.
And in this case it is going to be the e-mail server.
So it will just go back to our core.
Now this payload is going to just execute this command perfectly.
So now after the Sol process we have to now import an order module and that is going to be yes empty
life really.
So this is empty library is going to send us the e-mail.
So this is empty B library that is going to send us that e-mail.
So in this case the server will be G.M. not the Yahoo.
So we want to send the e-mail to the server which is e-mail.
So let's make the phones and to do that.
So I'm just saying send e-mail and here I want to just get the e-mail and password where it want to
send and the masses that will be displayed or that will be sent to the email account.
So we'll just get this information and over where this is going to the stake every information of the
G.M. Saab so let's make this server object first.
So in order to make that do you have to first to use this as empty B library which is responsible for
sending the mail.
And here we have this interface are you can also see the class that is going to be as empty B class.
And here you have to send the yes empty B protocol and your port number with these g mail is listening
to.
So this will be specific to the G.M..
So now I'm just going to give the G.M. port here which is this G.M. Saab recites.
So it is in this 587 port.
So after that we have to this is start this server.
So in order to start we have this command we did start.
And the less we're just starting the server now.
So after that we'll just log into the server and we have this logging method that is of this CSM to
be life ready.
So here we have to send the e-mail and the password because we will have to log in first.
So after logging we want to send the e-mail we have this send mail method in order to send the mail
in that email.
And as the same e-mail first and a password and it should be messages.
So it will just send mail to that e-mail password and the messages with the messages that is just given
with calling up these send mail.
So this message will be the result of this execution of the command over here.
So let's go down now we have to just quit the server and as this is server or quit to the server.
Now we have completed our send MMS.
So you could closely see over here.
We need the e-mail and password in order to log into that G.M. symbol.
We sent this message as a result of this execution of this command.
We have seen that this command is going to give us the information about the password of this profile
which is our Wi-Fi network and we're just going to execute that command over here.
And after that we just get the masses will descend here and it will just send that message back to this
email or this e-mail will be the e-mail of the hacker.
So let's go down and now what you need to do is we need to send e-mail.
So now instead of just running this process in the same file I will just say take output because we
don't want to run that in the cell.
So this tech output is going to just give us the result but it is not going to give us the information
in the same cell.
So why we don't want that this execution of the command will be in the same cell is because we don't
want any suspicious activity to be carried out in the client so that our payload will be more robust
and less suspicious for the client.
So what we're just doing here is we are just staking out.
That means that this command will not get the output to the client.
Instead it will just get the result and this result will be in these result variable.
So this is toward that region that is just the execution of this command will just send that result
in this result folder and you know next to what to do that is to send this result is a message to these
send mail method.
So we'll just call this send.
Mm.
Now and in this send mail you have to first give the e-mail and next should be the password.
And the next is this result.
So now this e-mail should be correct.
E-mail in a password because this is not going to work if you just saw right here.
That is the wrong mail and wrong password because you can clearly see that we have this log in with
that e-mail and password and whatever the result will be is sent to that same mail in a password that
means you have to make now new test e-mail that would be G.M. and the password and it will just put
it over here.
So in my case I have just created one zip mail for this testing purposes so I'll just put here
now after you dispute that email you have to put the password
so this is my password.
In an email and just make sure this is correct because this is going to be your server where this result
will be sent.
So make sure this email and the password is correct because you can see first of all if so log into
our e-mail and password and then it will send this e-mail.
So before sending e-mail it to this log in.
That means this password and this email account should be correct.
So we have now completed our program.
So let's save this first and let's make sure there is no any typos and everything is going to be here.
So let's save this and you could see this is the board which is 587 and this is the assembly report
for the e-mail server.
So let's save this first and let's go to our CMT where we are executing despite and file less navigate
again to the next step.
And let me say that is Python and it should be moderate or b y and so before that before executing that
wasn't one thing you have to remember is you have to first go to your e-mail account and go to the settings
and you'll see that there will be some links something like this which is in this Google account that
is in this my account the regular com and you have to make sure that this less secured app is this is
done on.
So if you just turn this off.
This is not going to work.
So you have to turn on in order to use this payload.
So after you've just done that on this go back over here they'll just hit enter.
And now our malware is ready and this has executed some command and you could see that it has raised
some eyebrows.
But see because maybe
due to the connections here.
So let's go back here and let's refreeze Alessi.
This is working or not.
So this is not working.
Let's go back and the idea here was when we just log in it was just refusing this connection.
So let's see what is happening over here.
So let's go again and take a list to replace this.
It is not working obviously.
So where the getting either.
Let's run it one more time and let's see what the eateries.
So I'll just navigate again
and the list on this myeloid so into this wait for a moment and let's see if this this is working.
So yes we just get the information and maybe it was not working for the first time but now we're getting
the information.
So what you can do is basically let's go and you can just run that one more time so you can do that
and you could see that.
Now in this case we have this e-mail and a password.
So is the password you can also send with this e-mail so you can do that.
Let me say this one more time and let's go back here unless execute this one more time so let's hit
by the malware and let's go back and let me just delete this and you can see that and not other information
is popped out.
So let me just open it the new one and you could see.
This is the information with this that is your python malware that is going to execute that command
giving information back to this account which you have just sent over here.
So this is cool isn't it.
So what we just did was we just made the use of this command.
What we just write in this malware which is this command.
So you can also use this command.
You can just copy this and you can see here that this will give this information and this information
has to send to the hacker.
So in this case we are not using the socket programming that we used in the previous section which was
making the backdoor.
But in this case we just made the use of this send e-mail.
That is the e-mail server which is this protocol.
And this is the port that Zimmer's harbor will be running which is to use this logging method and the
send mail method which is going to take this e-mail and you can see this is the e-mail but you can also
see the password that is going to work in the both case and you can see the command that is going to
execute to this take out.
So now we don't want this new open method to be executed because if users execute this be open then
it is going to execute in the cell.
So we don't want that this should be executed on the cell.
Instead we just want to grab the result and this will not be executed on the cell because that can be
suspicious for the user and they can just get information.
So basically we just want to take the output that is by this method which is take output.
Basically this will just execute on the cell and give you the result.
And we just stood over here and then we just smell that to this e-mail and the password we just sent
here.
So let's take this one more time let's see.
Again the working analysts do something like instead a now what I want is not this information I want
maybe okay not this information now low.
So let's see desired information or basically desire.
Come on.
So let's execute this again.
So let me say simply let's go back to the deck stop and let's run again.
That malware.
And if I just sit into then let's go back and let's give her time OK.
We have this information now again.
And let's take this out then you could see that this is the information that we send.
And it is saying that this volume has no level and all the information over here and this is the directory
and you could see this is the current directory we're on because you could see this is the desktop.
And if I say directly then this is all the information that we have.
And it is sent back to our e-mail.
So this is a way in which you can execute the command and the client and get the information back to
the e-mail.
So we'll just see some of the key loggers and the Bee logo and some of the other application that will
execute in the upcoming lecture and we'll just make the communication between the client and server
through this e-mail.
So soon the next one.