Welcome all to this tutorial.
Today we're going to actually start building out keylogger.
I will make the basic and most primitive of keyloggers.
It will have some inherit logical flaws, such as maxing out CPU
What I would like you to do is go into discussion section
and simply suggest what sort of abilities would you like me to give to this keylogger.
For example, somebody would say "Well, I would like to hide it, you know"
and somebody else could say "Well, I would like it to be able to have an emailing function of a sort"
and another person could say "Well, I would like it to have an FTP function"
"I would like it to be configurable in this way or in that way"
and "I would like to use it for this purpose and for that purpose"
Make sure it's all legal when you ask me about it
because I will not assist anything that is against regulation so I'm giving you the freedom
the choice to ask me I can't promise that I will fulfill your wishes I will
try I will have a look if there are lots of suggestions I hope that there will be
able pick a few and I'll see what I can do but you don't have to worry about it
I will add more functionality is over time as well
anyway let's go ahead and begin doing this
begin to begin writing the codes of the first to get real going to need are two
header files so windows . age and when user . age because we want to be using
some functions we age for which that those are the requirements anyway so
let's go ahead and type in char C we will declare one character variable and
clear another one which will be C-one
a charge can have as I said before E
letter which it but we can actually assigned a number as well so let this be
a and let this the 67 I believe this is the ASCII table sure to in a moment
let's go ahead and write see out see and and c1 let's see what we will get can
you guess it
oh yeah well though he can get so this is a and we are signing a numerical
value to each character type variable if you do this this will because this will
be taken from BS this this is actually a numerical representation of a character
from the ASCII table and 67 corresponds to dealer tate's let her eight so
assigning a like this and assigning 67
this is pretty much the same thing let's go ahead and see
go lol total missed their by the way it's not sixty seven but you can see
that it's thought 67 here either it's a capitalist who see so you are not
expected to know the ASCII table by heart here I have one in the net hundred
of them feel free to look for it we just go
step back I just taken one hundred and ninety ASCII table what had denied
because I want to get an extended one but you don't need to open one hundred
and ninety go ahead and click on it what was referring to an able to 180 I wanted
to have one hundred and ninety members that 180 characters minimum so I was
hoping it would help the out there anyway
lower case is a 97 and 67 as you can see is the capital of Terry see interesting
right kept illiteracy is 67 that's where I listed and lower case is 97 so it's
gonna change it
87% wait for it and there you go
a no big deal not a bigger air it's all fine and dandy and it all works out says
he can see 2012 4567 so on 255 you have each character has a numerical
representation the first call you see the one that at selecting downward says
characters down below its 200 know and dead characters the third coat the Turk
Cullen is a description which has no character start heading to start of
texts except as a descriptive values does not value the descriptions and on
the left side those are valleys so let's go ahead and you can find the
presentations fuski tables around the net so no worries there they will read
to look at as much as you want you don't need anything extra there that's public
domain basically anyway let's go ahead and delete this declaration that these
signed a lease because we don't need them or 1 p.m. at the moment and we
don't need to see out
statement idea what we need to do now is create an infinite loop and we could
have created it because we want to keylogger to be running continuously so
we don't want it to stop until the user actually stops it so let's go ahead and
let's go ahead and do that I will tape in while this is what we are doing yet
this is a mother a similar way of doing it but if you want to create an infinite
loop would've for it open for open semicolon semicolon dentists will create
an infinite loop with 40 just something I just a new piece of information that I
wanted to give you also we will need a loop within a loop so we will need
nested loops here will need to use them in order to accomplish our goal our
second loop will be defining the character the range of characters that
we are interested in why you say well are you interested in this to you at two
hundred and nineteen is this interesting to you in any way or this pipe looking
like thing at 205 or this health thing or reverse te at 193 or something like
that
those characters I don't know I guess you can include them but I don't think
it's a good idea that or I sometimes to think I include once 222 but I think
that 190 should be optimal even though you're gonna still includes characters
that you're never gonna get but doesn't really matter anyway let's go let's go
and open up clips back let's go back there so how do we stop before we
actually specified the range with me to show what a nested loop is Sophie taken
here in equals
0 is less than three plus and here yet another loop so for in 20 GA is a less
then just three who cares for us and for the sake of orientation group with the
curly brackets ears and CEO second and then I want you value of J
to be printed out as well and then I would like a new line thank you and I
will go outside of the second group and will go into the first and will take his
see out first and here we would like the value of I go it'll be a deal there
anyway the logic of this is following this for loop will begin once it begins
it will start to evaluating the conditions laid out within it if it
violates the true so if it is indeed less than three it will start the
execution of whatever code is within within the curly brackets off the for
loop and here we have another full loop which is nested here what that means is
that now the program will simply start shooting this loop and it will not it
will continue to execute it until it finishes it so what happens here is that
this for lou
sorry evaluating this condition here and for as long as this condition here is
true it's gonna keep on printing this when it becomes false ben je mange
becomes greater or equal to 3 will start exit the second loop and enter the first
loop again that it will print our central print this out first and go back
to evaluating this condition is this condition turns out to be true again
then this loop will start over and so on three times so basically this loop
starts over as everything has resided here Jays again
0 so it will repeat three times again just secretly how that works out to
sprinting sewed onto the screen no big deal there I am second 0 I am second one
I am sickened too because the situation goes 01223 times and then it exists as I
said here in it says I first heard it's zero here so this is the first iteration
you can see it's that it starts the second loop again and it starts to say I
am second 0 I am sick and one second to see how the numbers reset and then it
goes I am first one because this is the second pass and the second pass again we
have the same situation I am second 05 second one and 2nd do and so on and so
forth until the end hopefully this this is clear if not well you have the
discussions I am gladly answered queries their semi colons and now we need to go
ahead and basically specified the range of the character is that we would like
to
get four and let's use the character which we have declared up above the
beginning just go ahead and use it and say that it will be equal to eight so
those are that that's the beginning of our range and the very end of our range
can be out two hundred and twenty to say let's be a little bit greedy though is
there really a point for it at all
yes actually there is there is a point so sequels 28 C is less or equal to 22
to my colon and C plus it's open curly brackets now we know we actually do need
curly brackets
there for statics or orientation or anything of a kind and you see what a
key is pressed there is a system interrupt system interrupt is is it you
can represent the number so it's 32767 looks like we need to create a
conditional if statement to know when somebody presses a key on the keyboard
and if somebody presses a key on the keyboard please do something with it so
ok let's create a tad condition we need a function get get the surprise the
tickets until the outrageous functions but ok sometimes there a little bit of
course bailout get key state Salesi
and after the sea compare it 2-3 2767
and if that is true we are going to do something with it anyway
over here we have the range that we are checking so disparate groups conducting
checks and this one is figuring out if the key if there was an interrupt so if
there is an interrupt for a particular key then that key then we will do
something with it what shall we do with it I don't know what save it to a file
actually that could be that could be interesting so once again this is the
interim so if there is an interrupt the character will be store that with the
character will be stored and we will be able to do something with it so let's go
ahead and type in stream right but this and let's just go ahead and created in
our workspace directory so no need to go anywhere else was
in court txt and there is one more thing disappear into a taping and I S colon
colon what we are specifying what we're dealing with this is that we don't want
her file to be re-written every single time somebody presses a key because if
we didn't specify this last part here it would quite literally mean that once it
gets recorded and the next time somebody presses a key the file will be reopened
again and at that point of time whatever is contained within that file will get
overwritten with new content every every previous he would get overwritten by a
new key which would be pretty stupid so let's just do it doesn't Appian right
now we're gonna whatever gonna break right character see that's it
place a semicolon at the end and that is all we need to do in order to start
recording characters before implementing any sort of putting in any sort of a
filtration system in which we will absolutely need to do
press Ctrl F 11 to run this list where is the error ok so we have not included
the necessary header files for this to be possible what have we learned before
include stream very simple forgot to include Adobe deal happens all the time
go through it through it to exit so the program is running but you can't really
see this does running anywhere can you can you if you rented from the council
you probably could like this
this is the console and Eclipse you can it doesn't really matter because it is
better display anyway we don't want to be able to see anything however I assure
you this is functional so let's go ahead and type in Skype something into our
opened up a CMD you can open up whatever you want your browser if you want
actually that might be a good idea
yahoo.com and I still haven't removed this fasting thing ok and what's a sign
in
they've been the username user password will be worried I don't even need to
click Sign in or anything of a card we can just go ahead and open up our
project so once again you were project files by default are located in C users
and then choose the user name of the current user here but his creator and
then go to work space and select your project here which mine is key logger
and select the file hirsute says he record txt that's how we have names are
file and there you go I have taped in Yahoo and didn't record it thought so we
need to fix that I don't know what the space here is probably a tad it is a tab
so we need to have filtered out through and make it better so you see if they
put in username and password i mean this is a tuzla through the different example
let's use let's use Sean though that'll be my username and password
probably a little bit confusing when I type in the username and password with
when I feel username password with you
and password at system of record and their ago you have john doe there are
some additional characters here but we need to create a filtration system for
this anyway all farewell