Welcome to this lecture.
So from the previous couple of lectures we saw how we can execute this command that is any command in
our sale of the command prompt.
And next we saw how we can just send that report back to the server which is our e-mail server are basically
sending back to our email account.
And we also saw how we can just download some of these from the other some of the content.
And now basically we see what we can do next is after we download anything.
So instead of this link.
So let me just remove this link and so you instead of this link OK.
This is very long link.
Let me just remove everything
means remove this part.
And this too so let me say instead of this link let me do something like uh w w w dot some link and
not come in here.
I'm just taking your example.
So let me see if this is key logger that is sent for the user to download.
And let me see that now.
This is the process to download.
So basically what happens is that the result this has downloaded successfully at here.
So after this it has downloaded to the client because of this result.
And next thing we can do now is to just execute that.
So what you can do is take the Sol process.
So first of all you can just use their Sol process in here.
All you need to do is Sol process dot open
take output and after that you can simply put the result over here because in this case we want to execute
the result.
So result will be these files which is key logger.
It is simply saying that after you get that result it is just wrong that key logger which is basically
this key logger dot EMC.
So we get the result.
You can also print the result after users download it and you can simply run that key logger because
now it is inside the client.
So you can get that.
And now after that because we have the key logger you can simply get again maybe over here that can
be.
Let me see result of he logs because we are just executing this key logger.
Now we'll just get the key logs in that can be sent to the e-mail and we have seen that sending a email
is so easy.
Using this method which we have solved before that is the same method which is sent.
Mm.
So now we'll just executed all of these which we have just so in here.
And first of all the first step is to use the key logger.
So instead of just making your own key logger You can also use the application that is provided online
which is be logger.
So let me just go through the tool of that bee logger.
So first of all open your Firefox.
Let me close everything.
And here I want to just source for the blogger and this is the link you want to go which is the blogger
official Web site.
Thanks to these men.
And now you have to just suppress this green button over here saying clone or download me just copy
it for us this link and let's go back to this terminal.
Let me just open the new road Minal over here new window and what you need to do over here is you have
to first time get clone and paste that link which is the link I forget.
So let me this bastard let me just hit enter.
It is going to clone the blogger.
It will just a download that bee logo and they do this.
Give us the blogger that is installed on our machine within a minute.
So it has been successfully downloaded.
Let me just navigate.
So first of all let me list all of this and you can see there is a bee logo folder.
So let's go over Obadiah.
Let me just list everything.
And now first of all we have to install that.
So let's use this install a command or you can simply do something like yes it's and install that assets.
So let me just set into and now it is going to install everything that is needed.
So it has fits everything.
So let it give some time to the 3D.
All the packages.
And first of all it will this sink everything.
So first of all it should give us some information about this wine configuration.
So basically what happens is we're going to install all of the packages that is needed for this logo
in this wine.
So basically this is also the environment for these windows version.
So here we'll just say Windows 10.
So this spillover is not going to act on this college Linux.
Instead it is going to configured on this one machine.
So every package is that install is going to be installed in this wine.
So what happens.
Basically some of the back is like buying Stella by hook or the by 132 they are going to be installed
in this wine.
So let's.
Okay.
Just press okay.
So next thing is to just see all of the package and abalone started to point seven Voisin in my muslin.
In your case it should not have been installed so first of all you can simply install it and I'll just
press Phoenix and it is going to be installed over here and let it give it time to install
and after that let me just finish.
So next is going to be by win 32.
It is going to install this Packers again.
So let me please press next.
It is going to source for this bite indirectly with this python is downloaded and it is obviously downloaded
make is that is in the sea day in basically this is in the wine configuration.
So let me just press here.
That is next.
And next again in order to install this by in 32 and this is the package that is required to make the
key logger.
So in the python version two point seven it is no longer required.
That is by input.
We have already seen how to make the key logger with the help by input module in the previous LEXA.
But in the case of python version two point seven which is installed in this wine it is going to use
this by wing and a by hook.
So let's read this again and now establish the law by hook.
So let me press next.
And it is going to source again the same directory.
Let me this press finish and it will now check for the Pine installer.
So I have already installed a pine installer in this galley must install it has shown us that requirement
had already satisfied but in your case it will just download that file which is this by installer from
here.
So we have now installed this a blogger successfully.
Let me list all of this file and now we have again this so be it or be a file to run.
So in order to run any python file it is done with the python come.
And let's press this to be or be white.
So now we have successfully configured the bee in our Kali machine.
So let me hit enter and the key logger its two ended entered the key logger over here.
So it has given some of the information like it of last update or a fake or document.
So these all are the key logger but with the different file.
So if you download this or basically if you just made this Adobe Flash update it will be in the form
of less update but it will eventually be your key logger and you can also have this a blank executable.
So it's a normally pretty.
And let me just basics because I want this blank executable.
You can also download this fake a video file or the ball by your point file where to file everything
is available over here.
And these all are key loggers.
So let me just press six and now it will give you the information of G.M..
So in this case we don't have to manually create this send the mail method because this bill over has
this information to send that key logs that it has recorded in this python file back to the G.M. account.
So let me just say typing randomly you can just make your test email over here and you can also see
some information that is showing that don't use your personal email make a dedicated one.
That means you can just make a new email in order to test this bill be logger and the next is to type
your password.
And now you can see here is a link that is soon over here which is saying enable access to less secured
app on the G.M. account and I have told you before while making the malware in the first Alexa you have
to first of all go to this link and makes sure that this allow less secured app on your email account
is on because this is required in order to just make SS to our backdoor or basically this has to send
some key logs back to our email account and that means we have to this get these SS to our less secure
app which is this payload.
So if I just hit enter again then it is going to source this information.
If this information is correct or not I say yes and it is going to thus create another file are basically
the key logger in this dist follow.
So let me just go in the next desktop and it will be OK.
I have that installed in the home.
So it is in the home be logger and it will be installed or it'll just make that in the DEA folder which
will be just this killer.
But we are discovering the python link so that means I'm not going to use this key logger inability
so new knew how we can just make key logger with the help of this builder.
But this is the Lexus of the Python where do you want to learn all from the Python instead of making
use of this application or a simple application so we'll just make a use of now our own key logger or
we'll just make our own key logger instead of using this to be logger.
But I have already shown you how to make this so next thing what you can do is simply you can just copy
or basically get that application that is created by this blogger and let's go to the PI zoom and here
you can see replace this clover with the logo.
That is created with this blogger application that will be with excellence and Dot EMC because that
has been installed by installer.
And basically what by installer does is it will just convert the python file into the DOT EMC file which
is the executable that is required for the windows.
And after you just download it it will execute on the machine muslin and basically this is not needed
which is the sandy mill in the case of your blogger.
So this will be just your program in order to send to the blogger other key logger which is named a
blogger to the client.
But now I want to make everything from the beginning so let me just read the new file.
So instead of this I'll just create the new file and our file name will be key logger so we're not going
to use the.
OK.
I have already made the kilo or so I say Mankiller
so this will be my main killer.
So now what you need to do is create the killer put out on we have also done this in the previous Lexus.
So this will be also a quick revision.
So let me go to the settings and it's before we have to install some backers and in order to work with
these key logger we'll just see a download despite input backers.
Let me stall this and you do this install out the all of the beggars.
So for that as this execute this are basically we'll just remove this killer because we are not going
to use that.
Let me go back to the bison and it has already is downloaded pack is for us so let's import that pack
is we have downloaded and I want this by input and keyboard which is the interface that is going to
be used.
And here I want to import a trading which will support us our trading and I am already showing you how
to use the trading in the previous leg to make a difference to that letter if you get any confusion
here.
So I'll just make a class which is named is killer.
And in the object oriented programming I have already stated before the first method in this killer
can be the init method which will act as a constructor that is going to thus initialize the variables
of this class are the attribute of this class.
So I want to just make Kellogg's method over here.
So this this is a attribute not the method.
So this key Kellogg's is going to capture all the key load that these just on the client.
So let's define another method.
And this is going to be append to Kellogg's.
This is the second method.
I want to just append the string to that lug.
So in order to this is this to the class variable I have already told you before in the object oriented
section you have to make use of this self who is is pointing to the current object.
So I'll just say that Kellogg's suit have now.
That is the log which is basically that is same Kellogg's and we'll just add it to the string that is
positive because this is the work of the AP and so we just append so next once and is to process the
key or basically listen key listen.
So as I say relation or something like this.
So what we did here is we'll just make some fun sin which will just determine which key is placed in
plain sight.
And now what you gonna do is we'll just sit dry because there will be the certain cases in the case
of despite your input where it won't captures some of the characters like spaces or the character like
maybe which has the attribute data maybe something like ESB command or the control command want be captured.
So by the input keyboard will only get this key like the alphabetical key it does it but this one that
capsule like the special key which can be the control saved or EMC.
So let's do that first.
So first of all we want to capture the current key.
So this will be the current key and that current key can be first of all key and we want that character
from here.
So except is to cast the exception that can be awkward while executing discord.
So exemption here will be attributed to and if there is attributed that means we are not able to capture
some of the special key and if that is special key is you it is Biscay which is the space.
And if that is that is space key we are going to say something that is current the key now should be
a space because that is a space is there can be other key something like maybe control key EMC key in
that case we are going to get that current key and now in this case we'll just add that to the key because
that is the key now and it will just make some spaces here in order to just make something like if I
just space maybe EMC it will just spring me something that is a space first and it uses it you see any
space so this will be resolved or this will be the space to the current key.
So after that we have to now this append to the log.
So in order to append the log we have a pen to log method over here.
Let's go over here and say append to key logs and that should be with this current key.
So what we just did we just saw which is the key that is pressed in that blind side.
We just get that key and we just append over here and we just get that key logs which is obviously the
class attribute.
So we have defined it the two method that is going to append and that is going to just get that key
which is placed on the blind side.
So next thing what I want to do is basically let me just go over here and let's now start the sum of
the matter.
So before that let me say something that is I want to report the key what if I want to say something
with this key.
So let's see how we can this report are basically giving matches to the information in this case I'm
not going to send the information to the decimal that will be covered in the next lecture we have to
also cover that is just converting this to the XY files and download.
Basically we have seen it before that is how we can just make the download process zero over here that
is this you are all and basically will also cover that in the next lecture.
So before that what I need to do is go back to the KG and in this key logger I'll just say print that
is the key.
And in this case it will be self doubt key locks because these are the key logs which is the least of
a key that is placed in the client computer.
So now next thing what I want is up to you this print everything in the next case are basically in the
next loop it should be empty because we don't want to the reputation of that same key logs in the next
one is let me use the trading so let's make the timer to execute this key log.
So I listed trading DOD timer which is the module that is going to take first the time in the second
that this is going to execute.
So I want to execute that this whole code in the trade in five seconds.
So every five seconds this is going to execute and after executing we have to call this same method
that is self report it is the method of the same class.
So let me just remove this and now we are just saying that in every five second you have to call this
report because we want to print that Kellogg's that is printed in decline in every five seconds and
less.
Now use this timer and this timer is basically the method to start this thread.
So we have this to start the thread but now we have to create that thread.
So if we just remember from the previous lecture what we told in the previous lecture that there was
going to be this start method that is going to execute the trade.
So that is going to run through.
So this start method is basically the method of this trading module.
So if you go to these trading mother documentation you will see that this start method is going to run
or basically execute that trade.
But in this case we have now observed to override this estate method.
So instead of using the estimator that is defined in this trading module we are going to make our own
start method.
So that is basically your overriding.
So what we are going to do here is we are going to set a listener.
So what we have now is seen here.
That is we have seen how wide keys praised but we haven't said the listener.
So first of all and if we just remember from the previous lecture about trading the first method that
is going to be executed is this start method.
So in this start method I want to have the listener.
So I'll just say.
Keyboard and listener.
This is the basically listener for our buy input module.
So we have use this by input and the listener will be keyboard and I want to make you use up this listener
module.
And here let me just go to the documentation and let's see I think I forgot here.
That is maybe on press or on click but if that was on click it would be for the most module I think
it is on press.
So let's go over here and let's see the buy in.
Put the human creation.
Let's take this documentation here is despite input and less open this and I want to this handle the
keyboard and I want to monitor the keyboard so you could see it is the listener and it has this on this
module.
So here let's go back to our bytes I mean in this listener we have now on press and on this on Press
I want to process that key press.
So what we had doing is if any key is pressed on the keyboard we want to call this process key listen
meter so let's call that method on every key pressed on the keyboard.
So that is a process deletion method.
So we just remove this.
So we just calling this on Press argument is this on this scale is not our basically process listener.
So we just said the listener using these by input modulo by here you can take the documentation for
further reference.
So next thing what I want to do is we have to use these snot on a keyboard listener.
And with this keyboard listener I want to call some of the method.
If there is a key listener I want to call first.
The report which is basically giving every information about that key and next is I want to just make
this join because you could see this joint method is in the documentation of the byte input.
Let's take that again.
So we're just setting this listener.
So this is to collect the event until released or basically to just see or basically to just continue
to listen on the on press.
And we're just not using this unreleased because this is not important but we'll just see on praised
because this is the main importance of the key logger and allow Let's go over here again and see the
item.
So we have completed now our key logger and you can see that if I now print this which is wrong here
it is not going to do anything for us.
So if I just say main key logger and if I if I just go over here and it is not going to do or not going
to print anything for us.
And even if I just type anything my keyboard on my keyboard.
So let me just open the terminal and in this terminal let me see.
I sprays some letter.
It is not going to source anything in this output console because if you just remember from the object
oriented section one part is to create a class and another part is to create the object of this template
or a prototype or a class whatever you need to call.
So next thing is to create the object.
So let's see how we can describe the object of these key logger.
So first of all I'll just say my key logger which is the object in here first of all you have to make
the object from this key logo.
That means let me say key with a capital because you know the class starts with the capital letter.
Class name so I'll the sticky logo.
And after that if we just see that I want the key logger interface.
So basically can simply simplistic logo.
And if we just go to this init method because I have told you before that if you create the object the
first method that is going to be invoked are the automatically calling of this you need method or the
constructor will happen.
So basically we when we just create this object of this class the first method that is going to be called
are invoked automatically is this constructor.
So now we have this automatically call that constructor.
Let me just.
Ron that start method because that is the method that is going to do everything for us.
So if we just see this is going to have the listener it is going to call this process Gillison method
this method on every key press which is with this argument and with every key press it is going to send
that back to us with this report method.
And basically this is the way to this create the killer.
So let's see now if this works or not.
So let me just run this first and you can also say something like in this report you can this is something
that is the message giving that closure is a start error or something like that but it is not necessary
for now.
So let me just run this man key logger.
Let's run this and let's go over here and open this maybe here and let's see if this works or not.
So you could clearly see if I just press back these spaces because I was opening our bicycle I was closing
that to what whatever what is written in this.
So it has shown us that it has placed a key dart Backspace.
So let's type something over here.
So let me say this is our key law.
Go to led you to give it time and you could see in every five second because we have this given the
time period over here from the trading if you see here was the time maybe it was that time over here.
So we had given this five seconds so it is going to capture in every five seconds.
So we have seen here that is I have written this is our key logger and if I use this type backspace
again that is going to sprint us every that is written over here.
So this type this is are these two four key logger use.
So it is going to this grab everything over here and we have made our killer now.
So next this step is now I have told you before that we can also do this by using the bee logger but
I just made a decision in order to the salon this spy logo or basically the way to learn is simply creating
our own.
So instead of just making by some application we just created the key logger by our own Python skill.
So let me just close this key logger first.
So next thing what you can do now and what we'll be doing in the next lecture is to just convert this
key lower into the executable as well just submit something that is this download in order to make download
of this skill either directly to the client and the next thing what we also can do is use that simple
in order to send that key logger pressed back to our server.
So that will be covered in the next lecture.
See you in the next one.