Welcome all
Welcome back
Anyway, we're gonna go ahead and do a release version
So we're gonna create a real version
Well, not a real version
We'll just create the one that we would normally use.
Something that we can use in a CD or in a USB
or something that we can send, etc
and then we will see one obvious problem with it
which you cannot see when you are doing this in eclipse.
It's a pretty significant problem.
There are a lot of workarounds.
The simplest workaround is simply to hide what is being shown
but perhaps not best one.
However, let's go ahead and take a look at how this example will work out.
So we have our program here
We will go on to the hammer in the upper left corner.
Go ahead and just select it.
It will be selected debug by default...
You will have debug selected
Go ahead and select release
and then go ahead and build it.
Okay, for me, it says "Nothing to build..."
but if I CTRL S save and if I do build, it has finished building it.
So what does it say?
Permission denied
Okay, so I have a keylogger running.
I almost always do these days
because I'm running a lot of test runs and testing out the code
in order to make sure that it is right for you guys.
Anyway, let's go ahead and attempt this one more time.
So, Release
Building
There you go
It finished without any problems.
Now we're gonna go ahead and minimize this.
I don't need this
I don't need this either
and let's go ahead and open up our file manager
and go into our workspace.
So it says here "Keylogger"
That's the name of our project.
I'm just go ahead and click on it
and you have a debug version
and you have the release version.
So we're gonna do release
and I already have tested it out
so I'm just gonna go ahead and delete this file
and I will go ahead and double click on this keylogger.exe file
and this window is a problem
because, you know
it's gonna sit here
and I assure you it's recording information.
Here we can do a test run.
I can open up another notepad
and I can type in "Feel free to make suggestions I will welcome them"
There you go
You can open up this file.
and you see "Feel free to make suggestions I will welcome thime"
but you see, when I made a mistake here
when I used backspaces
this is how it looks like.
So perhaps we didn't need to include a backspace
but then, it would just say T H I M E
and then E M at the end.
It would be a a little bit difficult to figure out what was the attempt.
What was supposed to be written there.
Anyway, in order to rectify this window
that is quite problematic here
and especially if it runs at boot time
you get stuck with a window like this
what do you think a normal user will do
Well, I can guarantee you that they're not going to get suspicious.
Most people don't care.
I, myself
if I was tired that day after a long day of work
or something of a kind
I would just click on X, close it
and there you go.
The keylogger program is no longer running.
It is recording nothing here.
AM I RECORDING?
Of course not
So there is nothing
because the program itself is not running.
So as you imagine, this can be problematic.
I mean, yeah
all your effort down the drain for no good reason.
That is why we're going to create a function to hide this window.
We are going to name this function simply "hide"
I can think of no a better name for it
and we're going to create a function prototype up here
and down below, I have the code listed out
because I really didn't want to write this during the tutorial
as I would make mistakes for sure
and I will explain this in a moment.
So let's just go ahead and type in "void hide"
and there we go.
Fantastic
So we're going to call this function within our main function
or we could even call it within this function.
We will see what we shall do
but let me go ahead and explain what we're doing.
So we're creating a handler called "stealth"
and you see it says "stealth=FindwindowA("ConsoleWindowClass"..."
and then "ShowWindow". it says "stealth"
and this is the handler
and then it says whether to show it or not.
It's 0, so don't show it.
It's not a good idea.
Let's go ahead and copy it.
We can just put it here.
No big deal
and now we can pack a release version.
Save it first
There you go
and if we delete this file once more
Run it
There we go
Okay, so apparently nothing happens
because I didn't do this the right way
or something of a kind.
Let's have a look
avoid, hide...
Of course it won't work
Of course
I'm a genius
I am a genius
You know there is nobody smarter than me in this world
Seriously
So let's go ahead and save it
and let's build it
and after that, we can open up our file manager
delete this file again
and start up the keylogger.exe
and you see, this appears.
We cannot see it.
You could see it in the processes.
There are ways of removing it from the processes as well
but that's kinda difficult
considering that you raise the suspicion levels with antivirus systems
and stuff of a kind.
So we'll see what we can do to bypass the antiviruses.
Although, this what we have with it now
there is a chance that it would get classified as something malicious as well.
We will later on see how to avoid antivirus detection
but you see, by creating a simple handler
and by calling the built-in Windows functions in C++
we are able...
well, they're basically using the functions from the Windows API
we are able to hide the to the window
and not display it at all.
This program is running, as you can see it here
and that's not really a good way to check it.
The best way to check it is simply to verify the functionality of the program.
So let's go ahead and write something
"i like to well i do not really know no sense"
Wow, this sentence is messy.
Okay, so "i like..."
I pressed the backspace because I'd leave something, I suppose
"to well i do not really know no sense"
and you can see that this recording
and you cannot see it unless you open a task manager and have a look there.
As I said, there are ways from even hiding it in the task manager as well
but that's really advanced stuff.
So we might get into that as well.
It's all really up to you
and how much of a demand for a course there is
and how much do you want the new videos to come.
As I said, please do not hesitate to submit as many suggestions as you like
and to ask as many questions as you like.
Of course, I cannot guarantee that I will adhere to every the single suggestion
but I definitely will.
I usually just take them, I copy/paste them into a file
and then, when I want to decide what to make
I take a look at them and I say
"Okay we're going to do this, this we can't, etc"
So as long as you guys want me to bring you new videos, I will.
So no worries there.
Also, take a look at the date when this video was published
and during this month
there's gonna be a lot more videos to come, I assure you.
Anyway, I bid you farewell
and I hope that you have enjoyed this segment
of the keylogger chapter.